Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:08 11 May 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Poll GPS Module

Author Message
edu001
Regular Member

Joined: 14/07/2014
Location: United Kingdom
Posts: 82
Posted: 01:31am 28 Jul 2014
Copy link to clipboard 
Print this post

Hi

I am getting close to the end of building a GPS based tracker

I Have sent a command to the uBlox GPS module on com2 using this which I think should have worked

UBX$ = "BB56206242400FFFF060300000000102700000500FA00FA0064002C0100 0000000000000000000000000016DC"
5005 FOR A=1 TO 44
5010 'DO
5020 Hax$ = MID$(UBX$, A*2, 2)
5040 PRINT #1, ; Hax$
5050 PRINT ; Hax$
5060 '
5070 'LOOP
5080 NEXT A
5090 PRINT ; "DONE UBX"
6000 RETURN

Now I need to poll com2 for the confirmation

Any Ideas
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 03:11am 28 Jul 2014
Copy link to clipboard 
Print this post

At first glance, your mid$ statement will send '56' on its first iteration. If you want 'BB' to be sent first then you need to stick in two dummy characters (these will be skipped) OR change either your formula and/or your for/next counter.

Next point, are you wishing to send these as hex bytes? Your routine currently will send the hex value of each character i.e. two bytes per 'pair' of characters. So '56' will be sent as two bytes &h35 and &h36. Is this what the uBlosGPS requires?

WW
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2927
Posted: 03:17am 28 Jul 2014
Copy link to clipboard 
Print this post

You may have mistyped the 'string' but I seem to be counting 44.5 pairs of characters! Could be my eyes but have got same results five counting attempts in a row.
 
edu001
Regular Member

Joined: 14/07/2014
Location: United Kingdom
Posts: 82
Posted: 03:23am 28 Jul 2014
Copy link to clipboard 
Print this post

This is the output I get the first B is a Dummy Character

I have just printed it to confirm what is being sent

> RUN
B5
62
06
24
24
00
FF
FF
06
03
00
00
00
00
10
27
00
00
05
00
FA
00
FA
00
64
00
2C
01
00
00
00
00
00
00
00
00
00
00
00
00
00
00
16
DC
DONE UBX
$$$$EDUHABP,1,13:17:21,5232.32403,-152.685,08,146.0,25.25
$$$$EDUHABP,2,13:17:22,5232.32385,-152.685,08,145.8,25.25
$$$$EDUHABP,3,13:17:27,5232.32358,-152.685,07,145.4,25.25
$$$$EDUHABP,4,13:17:40,5232.32365,-152.685,07,145.4,25.25
>
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025