-
Notifications
You must be signed in to change notification settings - Fork 190
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
Error when using: network.scanner.search() #369
Comments
The code in According to the python-can API the
Please try changing this code in with self.send_lock:
self.bus.send(msg, timeout=0.01) |
GIT1RWM2AR, change your transmit buffer length in socketcan to something like 1000. |
Hello Svein,
For Info: Here I show the startup-commands for Thomas Fischl: USBtin and Linux-CAN-HW-Interface:
|
I'm not really familiar with SLCAN and I don't know if the underlying hardware is very capable. |
Hello Samuel, sudo ip link set slcan0 txqueuelen 1000 it is working perfectly. I tested it down till 115. sudo ip link set slcan0 txqueuelen 130 Thank you very much! PS. |
Hello to all,
I find an error, fixed it with a workaround,
but maybe the CAN, CANopen specialists know
the correct solution.
network.scanner.reset()
network.scanner.search() ---> Error
slcan0 75B [1] 7F
slcan0 60A [8] 40 00 10 00 00 00 00 00
slcan0 58A [8] 43 00 10 00 00 00 00 00
slcan0 601 [8] 40 00 10 00 00 00 00 00
slcan0 602 [8] 40 00 10 00 00 00 00 00
slcan0 603 [8] 40 00 10 00 00 00 00 00
slcan0 604 [8] 40 00 10 00 00 00 00 00
slcan0 605 [8] 40 00 10 00 00 00 00 00
slcan0 606 [8] 40 00 10 00 00 00 00 00
slcan0 607 [8] 40 00 10 00 00 00 00 00
slcan0 608 [8] 40 00 10 00 00 00 00 00
slcan0 609 [8] 40 00 10 00 00 00 00 00
slcan0 60A [8] 40 00 10 00 00 00 00 00
slcan0 60B [8] 40 00 10 00 00 00 00 00
slcan0 60C [8] 40 00 10 00 00 00 00 00
slcan0 60D [8] 40 00 10 00 00 00 00 00
slcan0 587 [8] 43 00 10 00 00 00 00 00
slcan0 588 [8] 43 00 10 00 00 00 00 00
slcan0 58A [8] 43 00 10 00 00 00 00 00
slcan0 707 [1] 7F
File "/home/ar/Schreibtisch/WING-Test-1/Wing-Main-1.py", line 75, in
network.scanner.search()
File "/home/ar/.local/lib/python3.10/site-packages/canopen/network.py", line 404, in search
self.network.send_message(0x600 + node_id, sdo_req)
File "/home/ar/.local/lib/python3.10/site-packages/canopen/network.py", line 216, in send_message
self.bus.send(msg)
File "/home/ar/.local/lib/python3.10/site-packages/can/interfaces/socketcan/socketcan.py", line 774, in send
sent = self._send_once(data, channel)
File "/home/ar/.local/lib/python3.10/site-packages/can/interfaces/socketcan/socketcan.py", line 791, in _send_once
raise can.CanOperationError(
can.exceptions.CanOperationError: Failed to transmit: No buffer space available [Error Code 105]
Workaround: time.sleep(0.001)
Is there a better solution?
Thank you in advance;
You did a great job!
Best regards
Armin
@christiansandberg: Can I send you a direct E-Mail for some other questions?
Thanks
The text was updated successfully, but these errors were encountered: