Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to set CAN socket name via ioctl() #30

Open
wuxiaohua1011 opened this issue Dec 14, 2022 · 1 comment
Open

Failed to set CAN socket name via ioctl() #30

wuxiaohua1011 opened this issue Dec 14, 2022 · 1 comment

Comments

@wuxiaohua1011
Copy link

Hi
Thanks for writing this library.

I wanted to try out CAN for my project but am encountering the following error:

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [socket_can_receiver_node_exe-1]: process started with pid [85606]
[socket_can_receiver_node_exe-1] [INFO] [1671057528.227663086] [socket_can_receiver]: interface: /dev/ttyUSB0
[socket_can_receiver_node_exe-1] [INFO] [1671057528.227695404] [socket_can_receiver]: interval(s): 0.010000
[socket_can_receiver_node_exe-1] [INFO] [1671057528.227701450] [socket_can_receiver]: use bus time: 0
[socket_can_receiver_node_exe-1] [ERROR] [1671057528.470725617] [socket_can_receiver]: Error opening CAN receiver: /dev/ttyUSB0 - Failed to set CAN socket name via ioctl()
[ERROR] [launch_ros.actions.lifecycle_node]: Failed to make transition 'TRANSITION_CONFIGURE' for LifecycleNode '/socket_can_receiver'
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[socket_can_receiver_node_exe-1] [INFO] [1671057530.174106048] [rclcpp]: signal_handler(signal_value=2)
[INFO] [socket_can_receiver_node_exe-1]: process has finished cleanly [pid 85606]

Physical setup:
I have an Arduino Due with SEEED studio can bus.

I have the a USB to CAN connector plugged into the computer.

I believe the CAN port is showing up as /dev/ttyUSB0 because when I unplug it, it was the only one that disappeared.

Could you help me identifiy what is the possible issue?

Thanks!
Best,
Michael Wu

@JWhitleyWork
Copy link
Collaborator

If it is enumerated as /dev/ttyUSB0 then it is a serial interface, not SocketCAN. The module you link to is USB to RS485, which is not CAN. It does not look like the CAN adapter board is compatible with SocketCAN and must be programmed to interact with the CAN bus through the Arduino.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants