-
Notifications
You must be signed in to change notification settings - Fork 117
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
Crazyradio driver #21
Comments
There seems to be a standard API to access USB from java: JSR 080. However it is best concentrating on Android first. Original Comment By: Arnaud Taffanel |
I think the most elegant solution would be to move everything related to USB (and therefore depending on Android) completely out of the link implementation into the suggested core functionality bundle. Just provide some static methods for searching for a attached Crazyradio in the core class and pass an instance to the constructor of the Link implementation instead of the USB managers. The whole Java library could then be reused on non-Android systems if we provide a second version of only that single core functionality class - I don't have any experience with it but it looks like accessing USB with Java outside of Android is quite different. Original Comment By: Sebastian Sams |
Implemented in the radio link by pull request #1. What about moving the core functionalities in something like se.crazyflie.crazyradio.Crazyradio in a way similar to crazyradio.py? This would allow for using the crazyradio in other projects and would simplify the CrazyradioLink file. I can handle it if there is no objection. Original Comment By: Arnaud Taffanel |
I just edited the "radio protocol" section of this page that was empty: http://wiki.bitcraze.se/projects:crazyradio:protocol?&#radio_protocol The USB link is supposed to be a direct connection to the Crazyflie (the crazyflie CPU has USB device capability), not via radio, I will clarify that as well :-). The radio chip handles all sync and checksum so the only thing sent in the packet is the CRTP packet (header and data). Original Comment By: Arnaud Taffanel |
At the moment the wiki just says TODO in the USB section, but your information is already very helpful. For me the commands sent look rather similar to the serial communication (for this the packet format is documented in the wiki), just without the sync token and the checksum - can you confirm this? edit: think I misread the documentation, I looked at the physical layer section. Now had a look at the CRTP packet structure, should be able to work with that :) Original Comment By: Sebastian Sams |
What are you missing on the usb page? The usb protocol is fully documented there as far as i know. For every packet sent an ack is received. When reading the ack packet from the dongle (bulk in) you also get the ack payload which is the downlink packets. In the client we send periodic crtp null packets (0xff) to pull the downlink. Above that the protocol is CRTP with log, param, commander&co. Original Comment By: Arnaud Taffanel |
started development of this in a new fork. initial separation of the android application code and the python like API code was rather easy but the activity code needs some cleanup after the changes. Next step after this would be implementation of real two-way communication to get access to parameters and the log. The communication protocol documentation for USB is currently missing in the wiki - is there any other place where some information about it can be found? Otherwise I'll try to 'reverse engineer' the python library... Original Comment By: Sebastian Sams |
crazyradio.py-like java driver to easily use the Crazyradio functinalities.
The text was updated successfully, but these errors were encountered: