PDA

View Full Version : send ubx commands to a gps module



mombasa
- 21st May 2025, 10:42
Hello. I need to send ubx commands to change the gps module settings. I copied the sequence from U-Center (B5 62 06 01 08 00 F0 08 00 01 00 00 00 00 08 60) but I can't encode it correctly to send it to the module. I have no problem receiving and I use HSERIN. I imagine that to send I have to use HSEROUT but despite various attempts I can't solve it. Help would be appreciated. Thanks

HenrikOlsson
- 21st May 2025, 19:47
[B5 62] = Header
[06] = Class
[01] = ID
[08] = LENGTH (8 bytes)
[00 F0 08 00 01 00 00 00] = 8 bytes of payload

But then there supposed to be two bytes checksum but you show three bytes:

00 08 60

I went thru the checksum calculation and 0x08, 0x60 seems correct so to me it looks like the first 00 doesn't belong in there.

mombasa
- 21st May 2025, 20:07
Thank you for your help. but I can't send these bytes correctly via HSEROUT command. Could you give me an example please. Thanks

HenrikOlsson
- 21st May 2025, 20:18
hserout[$b5, $62, $06, $01, $08, $00, $f0, $08, $00, $01, $00, $00, $00, $08, $60]

mombasa
- 21st May 2025, 22:22
now it works wonderfully well. Thank you very much, I was wrong about one small detail that kept me stuck for days.