On 11/17/2011 05:25 PM, Kurt Van Dijck wrote:
> On Thu, Nov 17, 2011 at 05:14:33PM +0100, Oliver Hartkopp wrote:
>> On 17.11.2011 12:24, Kurt Van Dijck wrote:
>>
>>> On Thu, Nov 17, 2011 at 07:49:43AM +0100, Heinz-Jürgen Oertel wrote:
>>>>
>>>> Danke Oliver,
>>>>
>>>> for now I decided to use something like
>>>>
>>>> system("echo \"i 0x4914 e\" > /dev/pcan0");
>>>>
>>>> Unfortunately at the moment I have  no idea how to determine if I'm just 
>>>> talking to an Peak or an EMS interface  to select the method of setting 
>>>> the bit rate.
>>>
>>> Maybe
>>>
>>> $ ip -d link show can0
>>>
>>> will show differently?
>>
>>
>> No.
>>
>> The PEAK driver does not use the candev framework (drivers/net/can/dev.c).
>> Therefore you won't see anything beyond up/down state and tx_queue_len, etc.
>> Not bitrate settings :-(
> My idea was to use this 'lack of information' to auto-decide if it's an EMS 
> or PEAK
> interface. But Heinz-Jürgen already pointed out that using some /proc file, 
> you
> can also see if a device is a PEAK device.

The best solution would be to provide a *real* Socket-CAN driver for the
PEAK USB devices instead of continuing with this mixed net-char-dev
crap. Well, it does work basically but it's not what users nowadays want.

Wolfgang.
_______________________________________________
Socketcan-users mailing list
Socketcan-users@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to