Hello, I’m a new user of SocketCAN and I’m working on an embedded system with
built-in CAN-controller. I have to realize a system which has to act as a
communication interface between two busses, analyze/filter values coded into
these messages and respond with calculated values.

My first Test-C-Programs for RAW and BCM Sockets work fine, so my hardware is
supported by SocketCAN.

My problem:
I always power up the bus manually using ifconfig.
Now I’m wondering how I could detect in my program if the bus is already powered
up or if not.  
When I use socket() bind()/connect() everything seems to work well also if the
bus is shut down. Normally I would expect to get an error (-1) calling these
functions. The error comes later when I try to use sendto(), recvfrom()…

Is this the normal behavior of SocketCAN and is there a possibility to easily
(and securely!) detect a shut down bus?

If possible I would also like to power up/down the bus and set its bitrate
directly in my C-program. Surely I could do it with a system call. But maybe
this functionality is already built in the SocketCAN library and accessible in 
C?

Thank you for your ideas/proposals! 


_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to