-
Notifications
You must be signed in to change notification settings - Fork 65
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
Does not work with 4 crazyradios #263
Comments
Can you post the output of |
lsusb: Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub dmesg: |
Looks all good. You could try re-adding the cout in https://github.com/bitcraze/crazyflie-link-cpp/blob/fcde6a0850f2f3127fb5f65b76aaabda530d7cd9/src/USBManager.cpp#L197, to see if the dongle is found correctly. |
The system still only registered 3 crazyradio only. Below is the error message: crazyflie_server-3] added new 21E7A98056 0 │ |
Strange! Does the radio |
Yes, the dongle works by itself. Seems like the fourth crazyradio is unable to detect. Always only able to detect 3 crazyradio only. And also the fourth radio shows as Nordic Semiconductor ASA and not the same as the other three which is Nordic Semiconductor ASA Crazyradio PA USB Dongle |
From the above:
Device 058 doesn't seem to be detected correctly as the name is "Nordic Semiconductor ASA" instead of "Nordic Semiconductor ASA Crazyradio PA USB Dongle"
It is also the one that is not detected. |
Fixed the above with https://askubuntu.com/questions/1397139/usb-devices-often-named-incorrectly so all are showing "Nordic Semiconductor ASA Crazyradio PA USB Dongle" now. But still not always able to detect 4 radios. The radio that is not detected will have its red LED constantly on. |
Sounds like the naming issue is a bug of lsusb, not of libusb (which we directly rely on). If they are all on the same USB hub, does it help to perhaps put 2 on one hub and 2 on another hub (connected to a different USB port on the computer)? |
We have tried a few combinations, such as 3 radios on a USB hub and 1 radio directly connected, or all 4 directly connected, but it can still happen. |
This almost sounds more like an issue of libusb, rather than crazyflie-link-cpp. Perhaps upgrading your OS (and thus libusb) will improve the situation. |
Thanks, will give it a try. |
Isn't libusb linked to crazyflie-link-cpp as a submodule? |
Yes, but only for the Windows build, on Linux it uses the system version, see https://github.com/bitcraze/crazyflie-link-cpp/blob/master/CMakeLists.txt#L31-L53. Might be easy to switch to a newer version by removing the if on Linux, but I have not tried that. |
I see, thanks. I'll give it a try. |
Applying the fix in #265 (reply in thread) seems to have solved this. The radio does not get stuck and undetectable anymore. When it is stuck, it always runs into problems getting the serial number of the radio (https://github.com/bitcraze/crazyflie-link-cpp/blob/9a6ce544e3dbb3d59825fac8c01f218d75c835cd/src/USBManager.cpp#L132C9-L132C9) and returns an empty string which then causes the radio not to be added. In that case, |
Very strange. I had another look at the code and detecting radios is done at the very beginning, even before any threads should have been started. As you noted in the other discussion, there might be a race condition in the code. |
Yes this is strange to me as well. The race condition should only stop data from being sent or received. This is something different. It could be the safelink firmware bug you are thinking of. What I suspect is that repeat calls to the radio's send and receive API without any delay might trigger some problem that causes the firmware to be stuck. Once it is stuck, the red LED remains lit. Even if we terminate Crazyswarm2, the red LED remains lit and subsequently, Crazyswarm2 or any other application (reboot/battery) cannot detect the radio anymore. This does not happen with the cflib python library, so maybe it is slower and does not cause the problem as you suggested, or it is because broadcast is not used with cflib. |
Hi,
I have used 4 crazyradios to connect to 20 drones, but noticed that there is always this error that say no crazyradio with ID3 found. This error appears when the crazyradio ID is more than 2. Can you kindly advise me on this error?
The text was updated successfully, but these errors were encountered: