ok, I googled a little bit on this topic: SocketCAN documetation on kernel.org reads: 4.1.3 RAW socket option CAN_RAW_LOOPBACK To meet multi user needs the local loopback is enabled by default (see chapter 3.2 for details). But in some embedded use-cases (e.g. when only one application uses the CAN bus) this loopback functionality can be disabled (separately for each socket): int loopback = 0; /* 0 = disabled, 1 = enabled (default) */ setsockopt(s, SOL_CAN_RAW, CAN_RAW_LOOPBACK, &loopback, sizeof(loopback));...
thanks Edwin, adding [CmpSocketCanDrv] Loopback=1 in /etc/CODESYSControl_User.cfg does the trick... still - two questions remain: 1) why isn't that enabled by default? IMHO SocketCAN behaves just like a (hardware-)bus: everything that is on the line should be seen by every device attached to it. what reason is there that the CodeSys-CanDriver even has the option of disabling this behavior at all?! 2) why do you advise do "remove it later after finishing this dump investigations"? I actually do need...
Hi All, I'm using CodeSys on a Raspberry Pi. I successfully use the CANbus library/module to read an write messages using SocketCAN and an attached CAN-hardware (MCP2518FD) in CodeSys I use: can0: CAN.CANBus_11bit the driver is initialized with the following config: can0Config: CAN.DRIVER_CONFIG := (usiNetwork := 0, uiBaudrate := 500, ctMessages := 200); the driver is opened/started with: can0(DriverConfig:= GVL.can0Config, eError=> ); ...and as mentioned initially: everything works - almost! the...
Hi All, I'm using CodeSys on a Raspberry Pi. I successfully use the CANbus library/module to read an write messages using SocketCAN and an attached CAN-hardware (MCP2518FD) in CodeSys I use: can0: CAN.CANBus_11bit the driver is initialized with the following config: can0Config: CAN.DRIVER_CONFIG := (usiNetwork := 0, uiBaudrate := 500, ctMessages := 200); the driver is opened/started with: can0(DriverConfig:= GVL.can0Config, eError=> ); ...and as mentioned initially: everything works - almost! the...
Hi All, I'm using CodeSys on a Raspberry Pi. I successfully use the CANbus library/module to read an write messages using SocketCAN and an attached CAN-hardware (MCP2518FD) in CodeSys I use: can0: CAN.CANBus_11bit the driver is initialized with the following config: can0Config: CAN.DRIVER_CONFIG := (usiNetwork := 0, uiBaudrate := 500, ctMessages := 200); the driver is opened/started with: can0(DriverConfig:= GVL.can0Config, eError=> ); ...and as mentioned initially: everything works - almost! the...
Hi All, I'm using CodeSys on a Raspberry Pi. I successfully use the CANbus library/module to read an write messages using SocketCAN and an attached CAN-hardware (MCP2518FD) in CodeSys I use: can0: CAN.CANBus_11bit the driver is initialized with the following config: can0Config: CAN.DRIVER_CONFIG := (usiNetwork := 0, uiBaudrate := 500, ctMessages := 200); the driver is opened/started with: can0(DriverConfig:= GVL.can0Config, eError=> ); ...and as mentioned initially: everything works - almost! the...
Hi All, I'm using CodeSys on a Raspberry Pi. I successfully use the CANbus library/module to read an write messages using SocketCAN and an attached CAN-hardware (MCP2518FD) in CodeSys I use: can0: CAN.CANBus_11bit the driver is initialized with the following config: can0Config: CAN.DRIVER_CONFIG := (usiNetwork := 0, uiBaudrate := 500, ctMessages := 200); the driver is opened/started with: can0(DriverConfig:= GVL.can0Config, eError=> ); ...and as mentioned initially: everything works - almost! the...