# What am I doing wrong?

**URL:** <https://community.sparkfun.com/t/what-am-i-doing-wrong/64816>\
**Category:** GPS/GNSS\
**Created:** [April 26, 2025, 5:27pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816 "2025-04-26T17:27:49Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![rgsparber](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@rgsparber](https://community.sparkfun.com/u/rgsparber)\
**Post date:** [April 26, 2025, 5:27pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/1 "2025-04-26T17:27:49Z")

</div>

I have a Pro Micro connected to a uBox neo M10 from Sparkfun with TX on the PM connected to the GNSS via a voltage divider so the 5V level on the PM is 3V on the GNSS.

I run Paul’s code to stop all NEMA sentences and poll for just GGA and it works fine. This proves that my Pro Micro TX to GNSS RX path is OK.

Then I want to change from the default CFG-NAVSPG-UTCSTANDARD from PORT to AIR1 so I get altitude data above 12,000 meters. Others have used Paul’s code to make this change and it worked. I want to directly change this parameter by sending the GNSS the proper sequence of bytes to prove to myself that I understand the spec sheet.

I sent the following hex values to the GNSS:

B5 62 06 8A 09 00 01 00 00 20 11 00 1C 06 ED BA

but I get no ACK response.

Where did I go wrong?

Thanks in advance,  
Rick

---

<div class="post-metadata">

**Author:** ![clive1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/clive1/32/6396_2.png) [@clive1](https://community.sparkfun.com/u/clive1)\
**Post date:** [April 26, 2025, 6:11pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/2 "2025-04-26T18:11:04Z")

</div>

It’s CFG-NAVSPG-DYNMODEL, and the key# is encoded little-endian  
So “21 00 11 20 06”  
I didn’t check the fletcher sums, but if those are wrong the packet will be ignored.

> <https://github.com/cturvey/RandomNinjaChef/blob/main/uBloxHABceiling.c#L23>

---

<div class="post-metadata">

**Author:** ![clive1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/clive1/32/6396_2.png) [@clive1](https://community.sparkfun.com/u/clive1)\
**Post date:** [April 27, 2025, 1:40am UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/3 "2025-04-27T01:40:09Z")

</div>

Sum/Form is also wrong. The length of 9 bytes is encoded as 16-bit, not 8-bit

---

<div class="post-metadata">

**Author:** ![rgsparber](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@rgsparber](https://community.sparkfun.com/u/rgsparber)\
**Post date:** [April 27, 2025, 2:07am UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/4 "2025-04-27T02:07:15Z")

</div>

I now see all of my mistakes and it now works.

Thank you for your invaluable assistance.

Rick

---

<div class="post-metadata">

**Author:** ![rgsparber](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@rgsparber](https://community.sparkfun.com/u/rgsparber)\
**Post date:** [April 30, 2025, 4:42pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/5 "2025-04-30T16:42:56Z")

</div>

I have documented what PaulZC and Clive1 have taught me plus a few other insights about sending commands to this GNSS:

> **[neoM10.pdf](https://rick.sparber.org/neoM10.pdf)**
>
> 480.64 KB

I welcome your corrections and comments.

Rick

---

<div class="post-metadata">

**Author:** ![clive1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/clive1/32/6396_2.png) [@clive1](https://community.sparkfun.com/u/clive1)\
**Post date:** [April 30, 2025, 6:03pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/6 "2025-04-30T18:03:16Z")

</div>

[https://rick.sparber.org/neoM10.pdf#page=6](https://rick.sparber.org/neoM10.pdf#page=6)

> [@rgsparber PDF](#):
>
> 0x09 Length (MSB)  
> 0x00 Length (LSB)  
> Note that the number of bytes in the payload, Length, is sent with the Most  
> Significant Byte first and the Least Significant Byte second. We will later explain  
> where this number comes from.

09 is the LSB (least significant byte) of the length. The entire UBX packet is little endian, its not flipping around, the checksum is of the bytes composed and bytes sent, in machine order. The payload length field is 16-bit, this I would say is the most often misunderstood and perhaps a tad ambiguous in u-Blox’s documentation.

The payload of the keys is more free-form in nature, as the high-order byte of the key determines the field types/sizes. Some have IEEE-754 float and double forms.

Covered checksumming here, generally computing on-the-fly

> <https://github.com/cturvey/RandomNinjaChef/blob/main/uBloxChecksum.c>

Covered sending a sub-set of values here, quickly, so not float, double, 64-bit or ASCII types

> <https://github.com/cturvey/RandomNinjaChef/blob/main/uBloxConfig.c#L207>

Compound VALSET here

> <https://github.com/cturvey/RandomNinjaChef/blob/main/M10_gnss.c>

---

<div class="post-metadata">

**Author:** ![clive1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/clive1/32/6396_2.png) [@clive1](https://community.sparkfun.com/u/clive1)\
**Post date:** [April 30, 2025, 6:39pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/7 "2025-04-30T18:39:39Z")

</div>

The u-Blox 6 Series devices there’s a bigger structure, for UBX-CFG-NAV5, where I can just send the Dynamic setting via bit field flag. The 9 and 10 Series use the individual keys for configuration items, so the compound structures can be deprecated.

> <https://github.com/cturvey/RandomNinjaChef/blob/main/uBloxHABceiling.c#L11>

> <https://github.com/cturvey/RandomNinjaChef/blob/main/uBloxAirborne4Gdynamic.c>

---

<div class="post-metadata">

**Author:** ![clive1](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/clive1/32/6396_2.png) [@clive1](https://community.sparkfun.com/u/clive1)\
**Post date:** [April 30, 2025, 10:12pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/8 "2025-04-30T22:12:02Z")

</div>

From page 15, this is an ACK-ACK response to UBX-CFG-VALGET (0x06 0x8B) request, checksums are correct

```auto
unsigned char data[] = {
0xB5,0x62,0x05,0x01,
0x02,0x00,
0x06,0x8B,
0x99,0xC2
};

```

---

<div class="post-metadata">

**Author:** ![rgsparber](https://avatars.discourse-cdn.com/v4/letter/r/c67d28/32.png) [@rgsparber](https://community.sparkfun.com/u/rgsparber)\
**Post date:** [April 30, 2025, 11:47pm UTC](https://community.sparkfun.com/t/what-am-i-doing-wrong/64816/9 "2025-04-30T23:47:21Z")

</div>

I think I understand your comments and have updated the document to version 1.0.1.

Thanks!

Rick
