Hi all,
        I was wondering if anyone knew what system calls one used to get a list 
of CAN devices that are up and running via SocketCAN?

        I have a cross-platform[1] GUI application (Qt-based) that allows 
configuration of some motor controllers via CANbus.  The CAN interfacing 
is done at the moment via an in-house developed library (which I call 
"libcan") which started its life out as a heavily hacked-up version of a 
Microchip MCP2515 CAN device driver and API written for MSP430 by 
Tritium[1].

        Since then, it has been reworked many times, gaining support for the 
CAN module built into the TI TMS320LF2406A DSP, Lawicel's CANUSB devices 
on Windows, and the SocketCAN interface... with a planned new driver for 
Luminary Micro Stellaris controllers coming.  Ultimately I hope to 
release it as BSD or LGPL someday.  It supports one device at a time... 
and at the moment, the interface to use is either picked semi-random or 
hard-coded.

        I'd like to have it provide a list of possible interfaces to the 
application for display so that the user can choose at runtime where 
appropriate.  Ideally a meaningful description would be helpful (e.g. 
"vcan0 - Virtual CAN Device" or "slcan0 - Lawicel CAN232 on 
/dev/ttyUSB0") but I'm not sure that information is exposed anywhere, 
just the device name itself ("vcan0" or "slcan0" in this example) would 
suffice.

        Is it possible to generate such a list, and how would I go about it?
Regards,
-- 
Stuart Longland (aka Redhatter, VK4MSL)      .'''.
Gentoo Linux/MIPS Cobalt and Docs Developer  '.'` :
. . . . . . . . . . . . . . . . . . . . . .   .'.'
http://dev.gentoo.org/~redhatter             :.'

I haven't lost my mind...
   ...it's backed up on a tape somewhere.

1. http://www.tritium.com.au -- "libcan"'s grandaddy is the firmware for 
the TRI63 "Driver Controls" module.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to