send ubx commands to a gps module
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
Re: send ubx commands to a gps module
[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.
Re: send ubx commands to a gps module
Thank you for your help. but I can't send these bytes correctly via HSEROUT command. Could you give me an example please. Thanks
Re: send ubx commands to a gps module
Code:
hserout[$b5, $62, $06, $01, $08, $00, $f0, $08, $00, $01, $00, $00, $00, $08, $60]
Re: send ubx commands to a gps module
now it works wonderfully well. Thank you very much, I was wrong about one small detail that kept me stuck for days.