semuconsulting / PyGPSClient

Python Graphical GPS Client Application supporting NMEA, UBX, RTCM3, NTRIP & SPARTN Protocols
BSD 3-Clause "New" or "Revised" License
493 stars 98 forks source link

Configuration Save to File #36

Closed AgileEngineeringLLC closed 1 year ago

AgileEngineeringLLC commented 1 year ago

Is your feature request related to a problem? Please describe. no A clear and concise description of what the problem is e.g. I'd like to be able to do this [...] I'd like to be able to save the configuration to a file, and then be able to load that configuration back later (or to a second device)

Describe the solution you'd like I'd use the current menus to configure the device (I use F9Ps), and then I'd like to store that configuration to a file. This would allow me to quickly configure that same device or another device to my saved configuration. Thx!

A clear and concise description of what you want to happen.

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Would you be willing to contribute a test device?

If the request relates to a specific u-blox device that is not currently supported, would you be willing to contribute a device to the project for testing purposes?

Additional context

Add any other context about the feature request here.

semuadmin commented 1 year ago

Hi @AgileEngineeringLLC,

This is not the first time I’ve had a request for such a feature, but unfortunately there is no trivial solution here. To the best of my knowledge, even u-blox’s own u-center tool does not support this facility.

PyGPSClient does already partially support this requirement via its User-Defined Preset facility, which allows users to store their own sequences of UBX queries or commands in a ubxpresets file and send these to any number of compatible devices via a single mouse-click. However, this does require a certain amount of ‘hand-cranking’ to set up the presets in the first place, which I appreciate is not ideal.

Short of interacting with the GNSS device at the hardware level (i.e., interrogating & programming the MCU and/or EEPROM, which is beyond the scope of a UBX protocol parser), the only way of reproducing the current configuration of a u-blox GNSS device via the UBX protocol is to poll every possible configuration parameter using a series of CFG- GET queries, and then “replay” these as a series of CFG- SET commands.

For Generation 9+ devices such as the NEO-M9N, ZED-F9P, etc., legacy CFG- messages are deprecated in favour of the newer CFG-VALGET, CFG-VALSET and CFG-VALDEL message types. You can only poll up to 64 parameters in a single CFG-VALGET message. Given there are over 1,200 possible configuration parameters in the latest configuration database (not all are applicable to all devices*), a complete configuration dump would involve around 20 individual queries.

Since the UBX protocol does not support explicit synchronous message acknowledgement, there is no absolute guarantee that each CFG poll would receive a timely asynchronous response, especially if the device is already processing high navigation message rates. So you may have to 'retry' some of the polls to ensure you have a complete set of parameters to replay.

But this is not beyond the realms of possibility and I'm happy to put it on the feature backlog for further investigation, but it'll probably be a while before I get to it.

In the short term, I recommend you take a look at PyGPSClient's User-Defined Presets facility and the example ubxpresets file to see if it can meet at least some of your needs. If you need any assistance in configuring the ubxpresets file, get back to me.

Purely out of interest, are you able to give me a flavour of the sort of configuration(s) you would be looking to apply to multiple u-blox devices? In my experience, most working configurations typically involve changes to no more than 20 default settings, so performing a complete dump of all 1,200 parameters may be overkill.

AgileEngineeringLLC commented 1 year ago

Thx for the info! It does sound more complex that i anticipated, yikes. I'm doing some work for a client (Axiom Space) where i need to setup F9Ps to the following:L1C only (no other GNSS signals enabled)Log NMEA GGA, NMEA GSA, RXM-RAWX, RXM-MEASXLog rate is NMEA at 250ms, RXM at 1000ms if feasibleI collect mobile data and static data with two F9Ps running concurrently, then process the parsed UBX file data in matlab (and C++) to test out flight nav filter designs. DonDon KellyLinkedIn: www.linkedin.com/in/kellydakCell: 281-221-28534403 Orange Leaf CourtHouston, TX 77059On Dec 26, 2022, at 3:29 AM, SEMU Admin @.**> wrote: Hi @AgileEngineeringLLC, This is not the first time I’ve had a request for such a feature, but unfortunately there is no trivial solution here. To the best of my knowledge, even u-blox’s own u-center tool does not support this facility. PyGPSClient does already partially support this requirement via its User-Defined Preset facility, which allows users to store their own sequences of UBX queries or commands in a ubxpresets file and send these to any number of compatible devices via a single mouse-click. However, this does require a certain amount of ‘hand-cranking’ to set up the presets in the first place, which I appreciate is not ideal. Short of interacting with the GNSS device at the hardware level (i.e., interrogating & programming the MCU and/or EEPROM, which is beyond the scope of a UBX protocol parser), the only way of reproducing the current configuration of a u-blox GNSS device via the UBX protocol is to poll every possible configuration parameter using a series of CFG- GET queries, and then “replay” these as a series of CFG- SET commands. For Generation 9+ devices such as the NEO-M9N, ZED-F9P, etc., legacy CFG- messages are deprecated in favour of the newer CFG-VALGET, CFG-VALSET and CFG-VALDEL message types. You can only poll up to 64 parameters in a single CFG-VALGET message. Given there are over 1,200 possible configuration parameters in the latest configuration database (not all are applicable to all devices), a complete configuration dump would involve around 20 individual queries. Since the UBX protocol does not support explicit synchronous message acknowledgement, there is no absolute guarantee that each CFG poll would receive a timely asynchronous response, especially if the device is already processing high navigation message rates. So you may have to 'retry' some of the polls to ensure you have a complete set of parameters to replay. But this is not beyond the realms of possibility and I'm happy to put it on the feature backlog for further investigation, but it'll probably be a while before I get to it. In the short term, I recommend you take a look at PyGPSClient's User-Defined Presets facility and the example ubxpresets file to see if it can meet at least some of your needs. If you need any assistance in configuring the ubxpresets file, get back to me. Purely out of interest, are you able to give me a flavour of the sort of configuration(s) you would be looking to apply to multiple u-blox devices? In my experience, most working configurations typically involve changes to no more than 20 default settings, so performing a complete dump of all 1,200 parameters may be overkill.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

semuadmin commented 1 year ago

Hi Don,

Ok so this is a fairly straightforward configuration on the F9P, either using legacy CFG-* commands or the equivalent CFG-VALSET configuration database keys. I’m not sure how familiar you are with the UBX protocol so apologies if I’m stating the obvious here:

Legacy configuration commands:

1) Set the measRate to 250ms using the CFG-RATE command (the default is 1000ms). 2) Set the message rate for the requisite NMEA messages/ports to 1 (that is, one every navigation solution, or every 250ms) using the CFG-MSG command. Set all other NMEA message rates to 0 if you want them suppressed. 3) Set the message rate for the requisite RXM messages/ports to 4 (that is, one every 4th navigation solution, or every 1000ms (250ms * 4)) using the CFG-MSG command. 4) Filter the requisite GNSS constellation and signal types using the CFG-GNSS command. So if, for example, you wanted only the GPS L1C signal, you would set gnssId = 0 (GPS), enable = 1, sigCfgMask = 0x01. Refer to the UBX F9P Interface Specification for details of other sigCfgMask settings.

Equivalent CFG-VALSET configuration database keys (assuming protocol HPG 1.30 or later and device is connected via USB port):

1) Measurement rate: CFG-RATE-MEAS 2) Message rate NMEA: CFG-MSGOUT-NMEA_ID_GGA_USB, CFG-MSGOUT-NMEA_ID_GSA_USB and so on... 3) Message rate RXM: CFG-MSGOUT-UBX_RXM_MEASX_USB, CFG-MSGOUT-UBX_RXM_RAWX_USB 4) GNSS signal filter: CFG-SIGNAL-GPS_ENA, CFG-SIGNAL-GPS_L1CA_ENA

FYI the F9P Interface Specification has a cross-reference of legacy vs. modern configuration commands in section 6.10.

Hope this helps. If you need pointers setting up these commands as PyGPSClient user-defined preset strings, give me a shout.

AgileEngineeringLLC commented 1 year ago

Thx, this helps a lot. I had most of the settings, but struggled with a couple. Thx again!

Don

Don Kelly

LinkedIn: www.linkedin.com/in/kellydak Cell: 281-221-2853 4403 Orange Leaf Court Houston, TX 77059

On Dec 26, 2022, at 11:35 AM, SEMU Admin @.***> wrote:

Hi Don,

Ok so this is a fairly straightforward configuration on the F9P, either using legacy CFG-* commands or the equivalent CFG-VALSET configuration database keys. I’m not sure how familiar you are with the UBX protocol so apologies if I’m stating the obvious here:

Legacy configuration commands:

Set the measRate to 250ms using the CFG-RATE command (the default is 1000ms). Set the message rate for the requisite NMEA messages/ports to 1 (that is, one every navigation solution, or every 250ms) using the CFG-MSG command. Set all other NMEA message rates to 0 if you want them suppressed. Set the message rate for the requisite RXM messages/ports to 4 (that is, one every 4th navigation solution, or every 1000ms (250ms * 4)) using the CFG-MSG command. Filter the requisite GNSS constellation and signal types using the CFG-GNSS command. So if, for example, you wanted only the GPS L1C signal, you would set gnssId = 0 (GPS), enable = 1, sigCfgMask = 0x01. Refer to the UBX F9P Interface Specification for details of other sigCfgMask settings. Equivalent CFG-VALSET configuration database keys (assuming protocol HPG 1.30 of later and device is connected via USB port):

Measurement rate: CFG-RATE-MEAS Message rate NMEA: CFG-MSGOUT-NMEA_ID_GGA_USB, CFG-MSGOUT-NMEA_ID_GSA_USB and so on... Message rate RXM: CFG-MSGOUT-UBX_RXM_MEASX_USB, CFG-MSGOUT-UBX_RXM_RAWX_USB GNSS signal filter: CFG-SIGNAL-GPS_ENA, CFG-SIGNAL-GPS_L1CA_ENA FYI the F9P Interface Specification https://content.u-blox.com/sites/default/files/documents/u-blox-F9-HPG-1.32_InterfaceDescription_UBX-22008968.pdf has a cross-reference of legacy vs. modern configuration commands in section 6.10.

Hope this helps. If you need pointers setting up these commands as PyGPSClient user-defined preset strings, give me a shout.

— Reply to this email directly, view it on GitHub https://github.com/semuconsulting/PyGPSClient/issues/36#issuecomment-1365300485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGWZFYBHPHLHK6MTNJRAYTWPHJPRANCNFSM6AAAAAATITSE7E. You are receiving this because you were mentioned.

semuadmin commented 1 year ago

Hi @AgileEngineeringLLC ,

For what it's worth, I've added a couple of command line examples which illustrate how one might save and reload a complete set of configuration parameters from one Generation 9+ GNSS device to anothe (e.g. NEO-M9N or ZED-F9P).

The save and load processes typically take between 15 and 30 seconds to complete via USB - maybe quicker if you're using a high baud rate UART port.

https://github.com/semuconsulting/PyGPSClient/blob/rc-1.3.14/examples/ubxconfigsave.py https://github.com/semuconsulting/PyGPSClient/blob/rc-1.3.14/examples/ubxconfigload.py

If these are of any use, I can consider adding this functionality to PyGPSClient in due course.

AgileEngineeringLLC commented 1 year ago

very nice, thx for the update!DonDon KellyLinkedIn: www.linkedin.com/in/kellydakCell: 281-221-28534403 Orange Leaf CourtHouston, TX 77059On Jan 6, 2023, at 4:54 PM, SEMU Admin @.***> wrote: Hi @AgileEngineeringLLC , For what it's worth, I've added a couple of command line examples which illustrate how one might save and reload a complete set of configuration parameters from one Generation 9+ GNSS device to anothe (e.g. NEO-M9N or ZED-F9P). The save and load processes typically take between 15 and 30 seconds to complete via USB - maybe quicker if you're using a high baud rate UART port. https://github.com/semuconsulting/PyGPSClient/blob/rc-1.3.14/examples/ubxconfigsave.py https://github.com/semuconsulting/PyGPSClient/blob/rc-1.3.14/examples/ubxconfigload.py If these are of any use, I can consider adding this functionality to PyGPSClient in due course.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

AgileEngineeringLLC commented 1 year ago

Hi,I've started using the ublox SPARTN corrections with a D9S connected to an F9P. The SPARTN keys must be loaded to the F9P by U-Center every time the F9P is powered up. This is done by just pointing U-Center to where you have the text file containing the key code. It'd be terrific if this could be done in pygpdclient!By any chance have you considered adding SPARTN key loading / configuration capability to pygpsclient? Thx!DonDon KellyLinkedIn: www.linkedin.com/in/kellydakCell: 281-221-28534403 Orange Leaf CourtHouston, TX 77059On Dec 26, 2022, at 11:35 AM, SEMU Admin @.**> wrote: Hi Don, Ok so this is a fairly straightforward configuration on the F9P, either using legacy CFG- commands or the equivalent CFG-VALSET configuration database keys. I’m not sure how familiar you are with the UBX protocol so apologies if I’m stating the obvious here: Legacy configuration commands:

Set the measRate to 250ms using the CFG-RATE command (the default is 1000ms). Set the message rate for the requisite NMEA messages/ports to 1 (that is, one every navigation solution, or every 250ms) using the CFG-MSG command. Set all other NMEA message rates to 0 if you want them suppressed. Set the message rate for the requisite RXM messages/ports to 4 (that is, one every 4th navigation solution, or every 1000ms (250ms * 4)) using the CFG-MSG command. Filter the requisite GNSS constellation and signal types using the CFG-GNSS command. So if, for example, you wanted only the GPS L1C signal, you would set gnssId = 0 (GPS), enable = 1, sigCfgMask = 0x01. Refer to the UBX F9P Interface Specification for details of other sigCfgMask settings.

Equivalent CFG-VALSET configuration database keys (assuming protocol HPG 1.30 of later and device is connected via USB port):

Measurement rate: CFG-RATE-MEAS Message rate NMEA: CFG-MSGOUT-NMEA_ID_GGA_USB, CFG-MSGOUT-NMEA_ID_GSA_USB and so on... Message rate RXM: CFG-MSGOUT-UBX_RXM_MEASX_USB, CFG-MSGOUT-UBX_RXM_RAWX_USB GNSS signal filter: CFG-SIGNAL-GPS_ENA, CFG-SIGNAL-GPS_L1CA_ENA

FYI the F9P Interface Specification has a cross-reference of legacy vs. modern configuration commands in section 6.10. Hope this helps. If you need pointers setting up these commands as PyGPSClient user-defined preset strings, give me a shout.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

semuadmin commented 1 year ago

Don,

Hi again.

If I understand correctly, the SPARTN keys you’re referring to are the decryption keys for an encrypted SPARTN service (e.g. u-blox’s proprietary PointPerfect service). AFAIK they’re not needed for an unencrypted service. See section 3.1.6 of the F9P Integration Manualhttps://content.u-blox.com/sites/default/files/ZED-F9P_IntegrationManual_UBX-18010802.pdf.

I believe they’re sent to the receiver via an RXM-SPARTN-KEY message, so in theory it’s just matter of obtaining the keys, populating a RXM-SPARTN-KEY message and sending it to the receiver in the normal manner.

Two challenges here, one trivial, one not so trivial:

  1. Firstly, I’ve only just realised I have omitted the RXM-SPARTN-KEY GET/SET message definition from the pyubx2 library, despite it being clearly documented in the F9P HPG 1.3n interface specification. That should be a trivial fix in pyubx2 and I’ll get on that.
  2. Secondly, the relevant encryption keys are ONLY available via u-blox (or one of their partners) so you’d need to continue to use their service to obtain the keys in the first place, and somehow transfer them over to PyGPSClient under your own steam. There may be some devil in the detail, but AFAICS it should be relatively easy to provide a utility service in PyGPSClient to upload the key and populate a RXM-SPARTN-KEY message automatically. BUT while the SPARTN protocol itself is open source, I’d need to ensure I’m not falling foul of any proprietary u-blox IP.

So the answer is a yes to (1) and a tentative future yes to (2).

-- semuadmin

From: Don Kelly @.> Date: Monday, 23 January 2023 at 02:58 To: semuconsulting/PyGPSClient @.> Cc: semuadmin @.>, State change @.> Subject: Re: [semuconsulting/PyGPSClient] Configuration Save to File (Issue #36) Hi,I've started using the ublox SPARTN corrections with a D9S connected to an F9P. The SPARTN keys must be loaded to the F9P by U-Center every time the F9P is powered up. This is done by just pointing U-Center to where you have the text file containing the key code. It'd be terrific if this could be done in pygpdclient!By any chance have you considered adding SPARTN key loading / configuration capability to pygpsclient? Thx!DonDon KellyLinkedIn: www.linkedin.com/in/kellydakCell: 281-221-28534403 Orange Leaf CourtHouston, TX 77059On Dec 26, 2022, at 11:35 AM, SEMU Admin @.**> wrote: Hi Don, Ok so this is a fairly straightforward configuration on the F9P, either using legacy CFG- commands or the equivalent CFG-VALSET configuration database keys. I’m not sure how familiar you are with the UBX protocol so apologies if I’m stating the obvious here: Legacy configuration commands:

Set the measRate to 250ms using the CFG-RATE command (the default is 1000ms). Set the message rate for the requisite NMEA messages/ports to 1 (that is, one every navigation solution, or every 250ms) using the CFG-MSG command. Set all other NMEA message rates to 0 if you want them suppressed. Set the message rate for the requisite RXM messages/ports to 4 (that is, one every 4th navigation solution, or every 1000ms (250ms * 4)) using the CFG-MSG command. Filter the requisite GNSS constellation and signal types using the CFG-GNSS command. So if, for example, you wanted only the GPS L1C signal, you would set gnssId = 0 (GPS), enable = 1, sigCfgMask = 0x01. Refer to the UBX F9P Interface Specification for details of other sigCfgMask settings.

Equivalent CFG-VALSET configuration database keys (assuming protocol HPG 1.30 of later and device is connected via USB port):

Measurement rate: CFG-RATE-MEAS Message rate NMEA: CFG-MSGOUT-NMEA_ID_GGA_USB, CFG-MSGOUT-NMEA_ID_GSA_USB and so on... Message rate RXM: CFG-MSGOUT-UBX_RXM_MEASX_USB, CFG-MSGOUT-UBX_RXM_RAWX_USB GNSS signal filter: CFG-SIGNAL-GPS_ENA, CFG-SIGNAL-GPS_L1CA_ENA

FYI the F9P Interface Specification has a cross-reference of legacy vs. modern configuration commands in section 6.10. Hope this helps. If you need pointers setting up these commands as PyGPSClient user-defined preset strings, give me a shout.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/semuconsulting/PyGPSClient/issues/36#issuecomment-1399725763, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGZ7C336EQSHXOQPATGPFYLWTXXVJANCNFSM6AAAAAATITSE7E. You are receiving this because you modified the open/close state.Message ID: @.***>

semuadmin commented 1 year ago

@AgileEngineeringLLC,

FYI I’ve uploaded an example command line script to the pyubx2 library \examples folder which illustrates how to populate and upload an RXM-SPARTN-KEY message.

https://github.com/semuconsulting/pyubx2/blob/master/examples/spartnkey.py

To run it, download the script and type:

python3 spartnkey.py

The script prompts you to enter the two SPARTN keys (current and next, normally 16 chars each) and their associated Valid From dates (week number Wno and Time of Week Tow)

Values for Wno and Tow for any given date can be obtained from this GPS Calendar site: https://navigationservices.agi.com/GNSSWeb/ (Wno = “Full GPS week since 1st epoch”; Tow = “seconds of week at midnight for that day”)

You may care to test this out using your D9S / F9P setup. If it works, it would be a relatively simple task for me to incorporate this functionality into PyGPSClient.

Hope this helps

AgileEngineeringLLC commented 1 year ago

Awesome, thanks!

I may be able to try it out later today, altho weather has not been RTK-friendly the last day or so!

Thx!

Don

Don Kelly

LinkedIn: www.linkedin.com/in/kellydak Cell: 281-221-2853 4403 Orange Leaf Court Houston, TX 77059

On Jan 25, 2023, at 9:10 AM, SEMU Admin @.***> wrote:

Don,

FYI I’ve uploaded an example command line script to the pyubx2 library \examples folder which illustrates how to populate and upload an RXM-SPARTN-KEY message.

https://github.com/semuconsulting/pyubx2/blob/master/examples/spartnkey.py

To run it, simply type python3 spartnkey.py at the command line.

The script prompts you to enter the two SPARTN keys (current and next, normally 16 chars each) and their associated Valid From dates (week number Wno and Time of Week Tow)

Values for Wno and Tow for any given date can be obtained from this GPS Calendar site: https://navigationservices.agi.com/GNSSWeb/ (Wno = “Full GPS week since 1st epoch”; Tow = “seconds of week at midnight for that day”)

You may care to test this out using your DS9 F9P setup. If it works, it would be a relatively simple task for me to incorporate this functionality into PyGPSClient.

Hope this helps

-- semuadmin

From: Don Kelly @.> Date: Monday, 23 January 2023 at 02:58 To: semuconsulting/PyGPSClient @.> Cc: semuadmin @.>, State change @.> Subject: Re: [semuconsulting/PyGPSClient] Configuration Save to File (Issue #36) Hi,I've started using the ublox SPARTN corrections with a D9S connected to an F9P. The SPARTN keys must be loaded to the F9P by U-Center every time the F9P is powered up. This is done by just pointing U-Center to where you have the text file containing the key code. It'd be terrific if this could be done in pygpdclient!By any chance have you considered adding SPARTN key loading / configuration capability to pygpsclient? Thx!DonDon KellyLinkedIn: www.linkedin.com/in/kellydakCell: 281-221-28534403 Orange Leaf CourtHouston, TX 77059On Dec 26, 2022, at 11:35 AM, SEMU Admin @.**> wrote: Hi Don, Ok so this is a fairly straightforward configuration on the F9P, either using legacy CFG- commands or the equivalent CFG-VALSET configuration database keys. I’m not sure how familiar you are with the UBX protocol so apologies if I’m stating the obvious here: Legacy configuration commands:

Set the measRate to 250ms using the CFG-RATE command (the default is 1000ms). Set the message rate for the requisite NMEA messages/ports to 1 (that is, one every navigation solution, or every 250ms) using the CFG-MSG command. Set all other NMEA message rates to 0 if you want them suppressed. Set the message rate for the requisite RXM messages/ports to 4 (that is, one every 4th navigation solution, or every 1000ms (250ms * 4)) using the CFG-MSG command. Filter the requisite GNSS constellation and signal types using the CFG-GNSS command. So if, for example, you wanted only the GPS L1C signal, you would set gnssId = 0 (GPS), enable = 1, sigCfgMask = 0x01. Refer to the UBX F9P Interface Specification for details of other sigCfgMask settings.

Equivalent CFG-VALSET configuration database keys (assuming protocol HPG 1.30 of later and device is connected via USB port):

Measurement rate: CFG-RATE-MEAS Message rate NMEA: CFG-MSGOUT-NMEA_ID_GGA_USB, CFG-MSGOUT-NMEA_ID_GSA_USB and so on... Message rate RXM: CFG-MSGOUT-UBX_RXM_MEASX_USB, CFG-MSGOUT-UBX_RXM_RAWX_USB GNSS signal filter: CFG-SIGNAL-GPS_ENA, CFG-SIGNAL-GPS_L1CA_ENA

FYI the F9P Interface Specification has a cross-reference of legacy vs. modern configuration commands in section 6.10. Hope this helps. If you need pointers setting up these commands as PyGPSClient user-defined preset strings, give me a shout.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

— Reply to this email directly, view it on GitHubhttps://github.com/semuconsulting/PyGPSClient/issues/36#issuecomment-1399725763, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGZ7C336EQSHXOQPATGPFYLWTXXVJANCNFSM6AAAAAATITSE7E. You are receiving this because you modified the open/close state.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/semuconsulting/PyGPSClient/issues/36#issuecomment-1403768491, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHGWZFZ6CKKGKT5KXYG6KETWUE65BANCNFSM6AAAAAATITSE7E. You are receiving this because you were mentioned.

semuadmin commented 1 year ago

you probably need to update your version of pyubx2 to the latest 1.2.21 (I only recently added RXM-SPARTN-KEY support):

python3 -m pip install --upgrade pyubx2

Try this and let me know how you get on

semuadmin commented 1 year ago

Like anything accessing a serial port, the script will require SOLE ACCESS to the serial port so, yes, you'll need to disconnect anything else that's currently accessing the same port, including PyGPSClient.

Also, are you sure that's the correct serial port designation? Typically you'd want something like "/dev/tty.usbmodem2101" (tty rather than cu - there is a subtle difference). But try both.

Ths simple script script runs 'blind', as it were, and you won't immediately see any acknowledgement.

If you want to see whether the upload was successful, you can poll the RXM-SPARTN-KEY message in PyGPSClient or u-center. Alternatively, the RXM-COR message will report whether you are receiving and decoding corrections from the D9S correctly.

semuadmin commented 1 year ago

By the way, I'd be careful about broadcasting your SPARTN keys in plain text - Thingstream may not appreciate that!

Please redact them first if you need to send me any further diagnostics.

Also, the keys should be 16 bytes in length - you've entered the hexadecimal version instead. If you bear with me a second, I can update the script to accept the hexadecimal and convert it to bytes.

semuadmin commented 1 year ago

@AgileEngineeringLLC OK I've just this minute uploaded an updated version of the spartnkey.py script which accepts the key as hexadecimal characters. It also simplifies the entering of the From date - simply enter the date in YYYYMMDD format.

https://github.com/semuconsulting/pyubx2/blob/master/examples/spartnkey.py

Download this updated version and see if you get any joy.

semuadmin commented 1 year ago

Don - you do realise this conversation is in the public domain, right? :-)

AgileEngineeringLLC commented 1 year ago

Thanks, I had not realized they were getting posted, so I've deleted certain ones. Thanks.

semuadmin commented 1 year ago

If you want to contact me directly, use the email address at the foot of the PyGPSClient README.

-- semuadmin SEMU Consulting https://github.com/semuconsulting


From: Don Kelly @.> Sent: Wednesday, January 25, 2023 10:06:16 PM To: semuconsulting/PyGPSClient @.> Cc: semuadmin @.>; State change @.> Subject: Re: [semuconsulting/PyGPSClient] Configuration Save to File (Issue #36)

Thanks, I had not realized they were getting posted, so I've deleted certain ones. Thanks.

— Reply to this email directly, view it on GitHubhttps://github.com/semuconsulting/PyGPSClient/issues/36#issuecomment-1404288065, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGZ7C3Y3ZCBHGIWRARP2BPLWUGPVRANCNFSM6AAAAAATITSE7E. You are receiving this because you modified the open/close state.Message ID: @.***>

AgileEngineeringLLC commented 1 year ago

In pyGPSClient, at the very top right of the GUI should I be seeing"fix:3D" go to "fix:FLOAT" or "fix:FIXED" when we're in RTK lock? I'm wondering what's the easiest means to tell if the solution is actually using SPARTN corrections.

AgileEngineeringLLC commented 1 year ago

Looks like I can check the GGA messages for the quality flag...

semuadmin commented 1 year ago

As I mentioned above, you could poll the RXM-COR message, which should tell you what corrections you're receiving. I presume you have good L-band antennae and a goid signal for both the D9S and the F9P? And I presume you've checked this all works OK using u-center? PS It's very PM on this side of the pond, so I'll leave you to it for now. Can pick up tomorrow if you're still having issues.

-- semuadmin SEMU Consulting https://github.com/semuconsulting


From: Don Kelly @.> Sent: Wednesday, January 25, 2023 10:16:05 PM To: semuconsulting/PyGPSClient @.> Cc: semuadmin @.>; State change @.> Subject: Re: [semuconsulting/PyGPSClient] Configuration Save to File (Issue #36)

In pyGPSClient, at the very top right of the GUI should I be seeing"fix:3D" go to "fix:FLOAT" or "fix:FIXED" when we're in RTK lock? I'm wondering what's the easiest means to tell if the solution is actually using SPARTN corrections.

— Reply to this email directly, view it on GitHubhttps://github.com/semuconsulting/PyGPSClient/issues/36#issuecomment-1404300131, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGZ7C36SRVF36RZGFAQTZZ3WUGQ2LANCNFSM6AAAAAATITSE7E. You are receiving this because you modified the open/close state.Message ID: @.***>

AgileEngineeringLLC commented 1 year ago

Roger, thanks much. I'll keep trying some things. It does seem to be staying in 3D/DGPS mode only, never going to Float or Fixed (per the GGA NMEA message). I have it working well via U-Center, so still likely something I've not enabled correctly.

semuadmin commented 1 year ago

FYI I've just uploaded the same key values myself into my ZED-F9P using a PyGPSClient user present (which the script generates) and sent an RXM-SPARTN-KEY poll to confirm that they have been uploaded successfully:

rxmpoll

So the keys are definitely being uploaded OK. I don't have a D9S to hand at the moment so can't test a SPARTN feed.

Just a thought, but the Valid From dates you've entered into the script appear to correspond to dates 11th Feb 2023 (2248 518418) and 11th Mar 2023 (2252 518418), in which case neither of the two keys you're using are actually valid yet. Are those the dates that Thingstream quoted?

AgileEngineeringLLC commented 1 year ago

Yes, those dates work in U-Center and with an Arduino script I can run (provided by Sparkfun).

semuadmin commented 1 year ago

ok bizarre - maybe I have an incorrect understanding of 'Valid From' date!

AgileEngineeringLLC commented 1 year ago

It's an expires date

semuadmin commented 1 year ago

The ZED-F9P actually needs to know when the keys are valid FROM, rather than when they expire. Each key is valid for four weeks, so we need to work backwards 4 weeks from the expiry date quoted. It's possible that u-center is doing this automatically, so if you enter a date of 11th Feb 2023 it automatically winds this back to 11th Jan 2023. I can easily do the same in the script if this is the case.

The way to check would be to upload the keys in u-center and then poll for a RXM-SPARTN-KEY message yourself. If the wno and tow are 4 weeks earlier than the date you entered (e.g. 2244 259218 rather than 2248 518418), then we know that's what's happening.

If you want to try this in PyGPSClient, add the following line to the ubxpresets file in your home directory, then restart PyGPSClient:

Poll RXM-SPARTN-KEY, RXM, RXM-SPARTN-KEY, , 2

You can then select this command from the UBX Configuration panel Presets dropdown list. You should see a response similar to the screen shot I posted earlier.