support for UDP ublox update protoco #120
Replies: 10 comments 2 replies
-
the key changes I have made are:
|
Beta Was this translation helpful? Give feedback.
-
status of the implementation at https://github.com/tridge/junkcode/blob/master/u-blox-fw-update/ubx_update.py is
I'll do some testing on other models soon. I have a drawer full of various uBlox modules to test. I suspect using the chiperase may need a relatively recent receiver (otherwise why would they make it optional in uCenter?) so may need to use the slower sector erase for older modules |
Beta Was this translation helpful? Give feedback.
-
Hi @tridge Thanks for taking the time to share this with the community – much appreciated. Drone pilot configuration is a popular use case for these Python GNSS utilities, and I'd be more than happy to enhance pyubx2's utility in this area. This is not the first time functionality like this has been requested (see earlier feature requests and discussions here and in PyGPSClient). There are, however, a number of potential issues with the changes you're proposing:
Finally, a couple of pedantic procedural points:
Hope this makes sense. Any queries or comments, don’t hesitate to get back to me. |
Beta Was this translation helpful? Give feedback.
-
Out of interest, how do ArduPilot users do firmware updates now? If it's not possible to remove the GNSS core and update via UART, does the vendor not provide an alternative mechanism? |
Beta Was this translation helpful? Give feedback.
-
I did not realise that - respect!
Fair comment - I'm probably being unduly cautious (FYI I'm currently working on a SPARTN protocol parser and I have had some pushback in certain areas precisely because I used WIreshark to deduce some implementation details which are poorly documented - this has hampered testing efforts). As I say, simply having the payload definitions in pyubx2 shouldn't ruffle too many feathers, and the end user implementation is down to others.
That would be the intention - to implement any timeout or EOF handling in the wrapper. I'm conscious my Be a shame to have to go down another UBX parser route here (and not just for personal vanity reasons ;-) ) - let me review formally next week and I'll get back to you - I normally try to keep weekends clear. That is a sweet UAV - what sort of endurance do you get, if you don't mind me asking? PS - be interested to see how your auto-bauder works out - I did originally have something very similar in PyGPSClient but it proved more trouble than it was worth at the time. |
Beta Was this translation helpful? Give feedback.
-
no problem, I'm suffering from the usual new-plane urge to show it off :-) |
Beta Was this translation helpful? Give feedback.
-
btw, you might be interested in this: |
Beta Was this translation helpful? Give feedback.
-
FYI I've had the following feedback from u-blox's EU agent: "Unfortunately, u-blox would not be amenable to these restricted UDP* payload definitions being incorporated into the open-source pyubx2 library. These payload definitions are explicitly restricted for non-public customer use (i.e. using them to configure the module in your product) only. So, unfortunately, I'm not able to include these restricted UPD* payload definitions at this time. |
Beta Was this translation helpful? Give feedback.
-
@semuadmin no problem, and I understand your position |
Beta Was this translation helpful? Give feedback.
-
@tridge I'd be happy to assist with your project as best I can - do you have a direct contact address? |
Beta Was this translation helpful? Give feedback.
-
As suggested by @semuadmin in PR #119 this is a discussion on the UPD UBX sub-protocol.
The motivation for this addition for me is supporting ArduPilot users (see https://ardupilot.org ) to update their uBlox firmware. The uBlox module is frequently embedded deep in the aircraft and we would like to avoid the user having to take it out and change cabling. This is especially the case when the uBlox receiver is part of a DroneCAN peripheral and thus the UART is not exposed at all.
For pyubx2 I'm just contributing back a few changes that were needed to allow UDP to work. The actual fw updater is currently in my junkcode repo as a staging point before it is incorporated into ArduPilot MAVLink GCS and the DroneCAN gui tool. For MAVLink and DroneCAN the UBX protocol is tunnelled over MAVLink and DroneCAN tunnelling sub-protocols.
The key reason we can't use uCenter is uCenter can only connect to remote devices over TCP, and TCP doesn't carry the needed baudrate changes. By re-implementing the protocol ourselves we can add the required tunnelling wrappers to carry both the bytes and the baudrate changes.
Note that I am not under NDA to u-blox in any way and don't have access to any secret information (eg leaked specs). I noted that u-blox says they can give details on the update protocol under NDA, but I didn't ask them for it as that would likely prevent an open implementation.
The history of working out the protocol is that another ArduPilot developer worked out the basics of the protocol by watching wire traffic when uCenter does an update, then I completed that work yesterday to work out the final pieces. It is really a quite simple protocol. I captured the bytes and baudrate changes using a modified version of ArduPilot which can do port forwarding, I just added logging of the bytes along with the baud changes. The actual capture I used is here:
http://uav.tridgell.net/tmp/ublox-fup4.dat
If you'd prefer not to have UPD in pyubx2 that is fine. I can just do my own UBX parser and generator for this project, but I thought it may be of interest.
Beta Was this translation helpful? Give feedback.
All reactions