ServiceClient timeot

Hi!

I am performing a client service call to a service server with default timeout settings.
When I look in gui tool I see that the call and response looks normal, no long delay in between. However, I get a timeout on the client side (looking in uavcan::ServiceCallResult& result.getStatus() when callback is fired).

I am performing other client calls to the same server with good results (no timeout), but those responses are smaller in size.

I am using the performBlockingServiceCall() method described in tutorials to perform the calls.

Am I missing something?

Kind regards

EDIT: The other call I am doing is GetNodeInfo
Setup: Client app — Beaglebone (Debian) — LAWICEL dongle (slcan) — PC running Ubuntu as VM — Server app
The GUI is running in Ubuntu on PC

I just noticed that if I reduce the amount of data in the response from server, it works!

Can it be a buffering issue in LAWICEL CANUSB dongle?
Has someone encountered similar issues?

After further investigation, I notices that one server response CAN frame is missing on client side.
In the screendump: candump tool on client side is telling me that one frame is missing (red arrow).

Looks like your SLCAN adapter is losing frames. Which is unfortunate but I can’t immediately find a robust solution, the only thing that comes to mind is to somehow throttle the data that is sent to the adapter. Consider either adding a throttling option to the PyUAVCAN SLCAN driver (a PR would be useful for people with similar issues), or just complaining to the vendor of your adapter.

Yes it looks like so… I will replace my PC node with another embedded device to confirm it. Perhaps you suggested adapter works better? The one from 8…something…

Thanks for the reply!

Off the top of my head I can suggest 8devices USB2CAN and of course Zubax Babel.

Thanks! :+1:

A short update on this issue.
According to the vendor of the USBCAN adapter, it has an internal buffer of 32 CAN frames. Since windows is scanning COM port once/ms it does not empty the buffer fast enough. Therefore I loose frame as illustrated in earlier image.

EDIT: After testing 8devices and LAWICEL CANUSB against each other I have concluded that LAWICEL has problems when TX many frames within a short time. Some frames are dropped and never reaches receiving side on bus. This regardless of platform Linux/Windows, however more severe in Windows. Do knot know if it is because of SLCAN or if the problem is in HW though… Using 8devices works fine in linux, but cannot be tested in windows using pyuavcan.

Regards

1 Like