Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 00:51 22 Apr 2026 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 : NEO 6 GPS UNITS NOT OUTPUTTING NMEA

     Page 1 of 2    
Author Message
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1048
Posted: 12:22am 11 Apr 2026
Copy link to clipboard 
Print this post

I purchased some GPS modules from AE and have found that they don't output NMEA. From my research it is possible they are outputting UBX. Are these units usable at all with MMBASIC ?

OA47
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3156
Posted: 12:55am 11 Apr 2026
Copy link to clipboard 
Print this post

It depends on how the module configures the NEO-6 chip.
  Quote  1.15Configuration
1.15.1 Boot-time configuration
NEO-6 modules provide configuration pins for boot-time configuration. These become effective immediately
after start-up. Once the module has started, the configuration settings can be modified with UBX configuration
messages. The modified settings remain effective until power-down or reset. If these settings have been stored
in battery-backup RAM, then the modified configuration will be retained, as long as the backup battery supply is
not interrupted.
NEO-6 modules include both CFG_COM0 and CFG_COM1 pins and can be configured as seen in Table 6.
Default settings in bold.
Table 6: Supported COM settings
CFG_COM1 CFG_COM0 Protocol Messages UARTBaud rate USB power
1 1 NMEA GSV, RMC, GSA, GGA, GLL, VTG, TXT 9600 BUS Powered
1 0 NMEA GSV, RMC, GSA, GGA, GLL, VTG, TXT 38400 Self Powered
0 1 NMEA GSV14, RMC, GSA, GGA, VTG, TXT 4800 BUS Powered
0 0 UBX NAV-SOL, NAV-STATUS, NAV-SVINFO, NAV-CLOCK, INF, MON-EXCEPT, AID-ALPSERV 57600 BUS Powered

Elsewhere in the data sheet it says the COM pins can be configured for SPI instead of TTL serial.

Try to get some data about the module configuration or circuit from the seller or manufacturer.

Armed with that it may be possible to modify the module to output NMEA on TTL serial.
I don't think MMBasic built-in functions can use anything else.

Edit.
I notice all the GPS() functions that have been removed from the MMBasic manual have not been added to the GPS and Astronomical Commands Reference PDF.
Edited 2026-04-11 11:44 by phil99
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11215
Posted: 07:57am 11 Apr 2026
Copy link to clipboard 
Print this post

  Quote  I notice all the GPS() functions that have been removed from the MMBasic manual have not been added to the GPS and Astronomical Commands Reference PDF.

They are in the Option_GPS_User_Manual
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3156
Posted: 08:33am 11 Apr 2026
Copy link to clipboard 
Print this post

Thank you, my mistake.
Looked down the file list to "G" and stopped.
 
Sasquatch

Guru

Joined: 08/05/2020
Location: United States
Posts: 385
Posted: 06:17pm 11 Apr 2026
Copy link to clipboard 
Print this post

  OA47 said  I purchased some GPS modules from AE and have found that they don't output NMEA. From my research it is possible they are outputting UBX. Are these units usable at all with MMBASIC ?


It sounds like you may have purchased some used modules that may have a custom configuration stored in flash memory.  Note that there are also fake modules coming out of China that may not be fully compatible with a genuine u-Blox module.  Some of the fakes are so good that you may never know or care.

The easiest way to configure your NEO-6 module is by using the free u-Blox u-center software.  The first thing I would do is to restore the module to factory default state.  This will give you a known starting point and should give you NMEA messages at 9600 baud.  You should also be able to update the module to the latest firmware version.

Then you can use u-center to change the baud rate, NMEA messages, and other configuration to suit your needs.  If you store your configuration changes in flash memory, they will be restored each time the module starts up.  These GPS modules have lots of configuration settings (probably over 100) and some of them are inter-dependent. The u-center software will also display the byte sequence for each configuration change in hex format.  Otherwise you would need to hand-code each message using the documentation and calculate the checksum.

Note that MM-Basic only uses the $GNGGA (or $GPGGA)  and $GNRMC (or $GPRMC) NMEA messages, disabling the other NMEA messages will reduce the serial traffic and parsing overhead.
-Carl
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1048
Posted: 05:00am 12 Apr 2026
Copy link to clipboard 
Print this post

  Quote  It sounds like you may have purchased some used modules that may have a custom configuration stored in flash memory.


It was unexpected as the solder pins seemed to be unused, but playing around last night I found 2 units responded at 115K with a mass of $GP strings that I had not seen before, so it seems you are right.

Thankyou
OA47
 
Michael
Newbie

Joined: 14/04/2026
Location: Australia
Posts: 8
Posted: 05:51am 14 Apr 2026
Copy link to clipboard 
Print this post

Hi all, I'm new here today, and really green with mm-basic. I'm wondering how you got on with the GPS and the GPS() commands. I have tried both without luck, two different GPS boards(one was NEO-6M), two different pico's.
When I open COM1 as a file I can see all the NEMA strings so the gps is sending, but neither GPS functions give me valid answers. GPS(VALID)=0, GPS(TIME)=00-00-00 with funny chars on the end of the string.
Appreciate any help or answer, thanks.
Michael.
 
ville56
Guru

Joined: 08/06/2022
Location: Austria
Posts: 450
Posted: 06:58am 14 Apr 2026
Copy link to clipboard 
Print this post

  Quote  
Note that MM-Basic only uses the $GNGGA (or $GPGGA)  and $GNRMC (or $GPRMC) NMEA messages, disabling the other NMEA messages will reduce the serial traffic and parsing overhead.


did you see this messages in the raw data? Did the module already do a sat-fix?
                                                                 
73 de OE1HGA, Gerald
 
Michael
Newbie

Joined: 14/04/2026
Location: Australia
Posts: 8
Posted: 07:07am 14 Apr 2026
Copy link to clipboard 
Print this post

Yes, the NEO-6 has a led that blinks when it has a fix. And yes I did read that message, as I said if I open COM1 as a #file, I can INPUT and see all 5/6 NEMA strings so the GPS has a fix and is transmitting NEMA. However both the GPS function don't work. Thanks for reply, Michael.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3156
Posted: 08:10am 14 Apr 2026
Copy link to clipboard 
Print this post

Welcome to the forum.
There are at least 2 ways to access GPS data in the PicoMite.
One is via OPTION GPS and the other is via the OPEN command.
As you can see the serial data try the second one.
  manual p155 said  OPEN comspec$ AS GPS [,timezone_offset] [,monitor]
Will open a serial communications port for reading from a GPS receiver.
See the GPS function for details. The sentences interpreted are GPRMC, GNRMC, GPGGA and GNGGA.
The timezone_offset parameter is used to convert UTC as received from the GPS to the local timezone. If omitted the timezone will default to UTC. The timezone_offset can be a any number between -12 and 14 allowing the time to be set correctly even for the Chatham Islands in New Zealand (UTC +12:45).
If the monitor parameter is set to 1 then all GPS input is directed to the console. This can be stopped by closing the GPS channel.


Eg. this is from a program I am using.
SetPin GP0,GP1,COM1 : Open "COM1:9600" As GPS,10 '+1 '<--remember to add DST to Time Zone.

Then you can use the GPS Functions.
Print GPS(valid), GPS(time), GPS(date), GPS(altitude)
etc.

User Manual V6.02.00 p189 and Option_GPS_User_Manual.pdf in Extra Documentation folder.
Edited 2026-04-14 22:45 by phil99
 
Michael
Newbie

Joined: 14/04/2026
Location: Australia
Posts: 8
Posted: 03:39am 15 Apr 2026
Copy link to clipboard 
Print this post

Thanks for the welcome, and yes I have read the GPS_User_Manaul.
I have tried your exact commands without luck, with the only difference being:
1. I used separate lines;
2. I see you use GP0 for receive ( I did SETPIN, GP1, GP0, COM1)
Does the 10 mean you are in SA ?
When I do print GPS(valid) I get 0, and GPS(time) shows zero, see results below
'    
GPFLAG = 0
00:00:0                 ☺               ☻   ☼
'
How did you add the blue text boxes ?
Interesting when I do this:
OPEN "COM1:9600" AS GPS,10,1 I get all the NEMA strings on the concole.
So the GPS() is working for you ! because I'm at a loss.
Appreciate your reply.
 
bigmik

Guru

Joined: 20/06/2011
Location: Australia
Posts: 2980
Posted: 05:43am 15 Apr 2026
Copy link to clipboard 
Print this post

Hi Michael,

I cannot help with the GPS commands but to get the `blue boxes' simple select the CODE button above and type/paste your message in between the
controls

Regards,

Mick  (The BIG one)



.
Mick's uMite Stuff can be found >>> HERE (Kindly hosted by Dontronics) <<<
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1048
Posted: 06:03am 15 Apr 2026
Copy link to clipboard 
Print this post

Still  have some issues with these NEO-6 units. After working out that they are set to 115200 baud, I can read info using INPUT$ but not using the OPTION GPS code.
Here are some snippets:
> SETPIN GP5,GP4,COM2
> OPEN "COM2:115200" AS #1
> ? INPUT$(255,1)
6,E,0.00,0.00,150426,,,A*70
$GPGGA,054952.000,************************,E,1,09,0.9,206.2,M,0.0,M,,*73
$GPRMC,054952.000,************************,E,0.00,0.00,150426,,,A*73
$GPGGA,054953.000,************************,E,1,09,0.9,206.2,M,0.0,M,,*72
$GPRMC,05495


The code above proves the GPS unit is functioning with the following OPTION LIST.  

> OPTION LIST
PicoMite MMBasic RP2040 V6.02.01
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP26,GP27
OPTION AUTORUN  ON
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL ILI9488, RLANDSCAPE,GP15,GP14,GP13,GP17
OPTION TOUCH GP12,GP11
GUI CALIBRATE 0, 156, 156, 1243, 867
OPTION SDCARD GP22
OPTION AUDIO GP2,GP3', ON PWM CHANNEL 1


When I set the OPTION GPS the code returns "GPS not activated" and the OPTION LIST comes up with a baud rate of 49664.

> OPTION GPS GP4,GP5,115200
WAITING FOR GPS FIX....
[138] Do While GPS(VALID)=0
Error : GPS not activated
> OPTION LIST
PicoMite MMBasic RP2040 V6.02.01
OPTION SYSTEM SPI GP18,GP19,GP16
OPTION SYSTEM I2C GP26,GP27
OPTION AUTORUN  ON
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
OPTION LCDPANEL ILI9488, RLANDSCAPE,GP15,GP14,GP13,GP17
OPTION TOUCH GP12,GP11
GUI CALIBRATE 0, 156, 156, 1243, 867
OPTION SDCARD GP22
OPTION AUDIO GP2,GP3', ON PWM CHANNEL 1
OPTION GPS GP4,GP5, 49664


Has anyone got any clues?
OA47
Edited 2026-04-15 16:19 by OA47
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 11215
Posted: 07:39am 15 Apr 2026
Copy link to clipboard 
Print this post

This is a current limitation. The GPS baudrate is limited to 65535 (16-bit value).
115200-65536=49664
Try changing the GPS to 38400 or below
Edited 2026-04-15 17:40 by matherp
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 5859
Posted: 07:56am 15 Apr 2026
Copy link to clipboard 
Print this post

Hi OA47,

Must be a calculation error...

115200 - 49664 = 65536 = 16 bit.

I think the baud variable is defined as a 16 bit value, and should be a 32 bit or 64 bit value. Peter must fix this. -or- alternatively, use the COM2 interface to change the baudrate to 38400 on the GPS module, then OPTION GPS GP4,GP5,38400 might work.

Regards,

Volhout

EDIT: Peter was there before me. !@#$%
Edited 2026-04-15 17:59 by Volhout
PicomiteVGA PETSCII ROBOTS
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3156
Posted: 08:27am 15 Apr 2026
Copy link to clipboard 
Print this post

Hi Michael,
1. I used separate lines;
2. I see you use GP0 for receive ( I did SETPIN, GP1, GP0, COM1)
3. Does the 10 mean you are in SA ?
4. When I do print GPS(valid) I get 0, and GPS(time) shows zero, see results below
'    
GPFLAG = 0
00:00:0                 ☺               ☻   ☼

1) The colon separating statements is the same as separate lines to MMBasic.
2) I don't think it matters what order the pins are in, MMBasic knows which is Rx and Tx.
3) 10 is for the eastern states (except for a pocket of NSW around Broken Hill = SA), SA & NT are 9.5, WA is 8 and a pocket on the Bight between SA and WA is 8.75. If my memory is right.

4) That looks like the baud rate is wrong.
Which is odd as I assume you are using the same setting for "As #1" and "As GPS".
That is they are both OPEN "COM1:9600". If not change the 9600 to what works for #1.

I have never seen the GPFLAG come up before.
Are you also using OPTION GPS? If so perhaps that is confusing it.
I think it needs to be one or the other, not both.
Edited 2026-04-15 18:30 by phil99

Footnote added 2026-04-16 11:45 by phil99
Going by recent posts maybe there are problems with GPS in recent Beta firmware.
I am using GPS with PicoMite MMBasic RP2040 V6.02.01.

Post your OPTION LIST and your program, or the relevant parts if it is a big program.
As Mick wrote paste between [code]...[/code] tags. When CODE & /CODE are upper case the content is in a code box. Click the Preview Post at the bottom to see what it looks like before posting.
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 1048
Posted: 01:03am 16 Apr 2026
Copy link to clipboard 
Print this post

  Quote  This is a current limitation. The GPS baudrate is limited to 65535 (16-bit value).
115200-65536=49664
Try changing the GPS to 38400 or below


Thankyou Peter,

Unfortunately, I think I have two issues. Even when I reduce the BAUDRATE to 9600 the OPTION GPS does not like a COM2(GP4,GP5) port but works on a COM1 (GP0,GP1) port. If I use OPTION GPS GP4, GP5 it is accepted but when I test Do While GPS(VALID)=0 the response is GPS not activated.

OA47
 
Michael
Newbie

Joined: 14/04/2026
Location: Australia
Posts: 8
Posted: 04:10am 16 Apr 2026
Copy link to clipboard 
Print this post

Hi phil99, answers to your questions:
2) the manual says Rx is first which should be GP1 (?)
4) yes same 9600 for everything I have tried
See program for GPFLAG. I have tried both and after OPTION GPS I did OPTION GPS DISABLE
Version is V6.02.00 see list.

Here is my OPTIONS list and the RUN output. (My GPS does not show a lock today but the output is consistent with everything I've been trying for 2 weeks now, I will replace tonight)

> OPTION LIST
PicoMite MMBasic RP2040 V6.02.00
OPTION AUTORUN  ON
OPTION COLOURCODE ON
OPTION CPUSPEED (KHz) 200000
>
> RUN
COM1 CONFIGURED on GP0,GP1
5 SECONDS
10 SECONDS
15 SECONDS
END OF TIMER LOOP
GPFLAG = 0
TIME (UTC): 00:00:0                 ☺               ☻   ☼
00:00:0                 ☺               ☻   ☼
GPFLAG = 0
TIME (UTC): 00:00:0                 ☺               ☻   ☼
00:00:0                 ☺               ☻   ☼
>


This is my program - note I'm really green with mmbasic and you will see I have tried all sorts of things to get time from a gps module.

'GPS OPTIONS NEEDED IF USED
'OPTION GPS GP0, GP1   TO DISABLE=OPTION GPS DISABLE


OPTION EXPLICIT
OPTION BASE 0
OPTION DEFAULT NONE   'All variables must be defined
OPTION AUTORUN ON
DIM INTEGER GPFLAG,I,POS1
DIM string RXGP,DAT,TMP,VAR1
'CONST TX = MM.INFO$(PINNO GP0),RX= MM.INFO$(PINNO GP1)
'SETPIN GP0,DIN,PULLUP
'setpin RX, TX, com1   '(Rx,Tx)Configure Serial Interface COM1       ~1
setpin GP1,GP0,com1 : OPEN "COM1:9600" AS GPS,10
'GP1=Rx GP0=Tx
PRINT "COM1 CONFIGURED on GP0,GP1"
'PRINT "GPS IS CONFIGURED ON COM1 USING OPTION"option list
'OPEN "COM1:9600" AS #1
'PRINT "COM1 OPENED AS DEVICE #1"
'OPEN "COM1:9600" AS gps,10
'PRINT "COM1 OPENED AS GPS"

'CHEW UP 20 SECONDS, WAIT FOR GPS TO GET A LOCK
TIMER=0
DO WHILE TIMER < 20001
 I=TIMER
 IF I = 5000 THEN
   PRINT "5 SECONDS"
 ELSEIF I = 10000 THEN
  PRINT "10 SECONDS"
 ELSEIF I = 15000 THEN
   PRINT "15 SECONDS"
 ELSEIF I = 20000 THEN
   PRINT "20 SECONDS"
 ENDIF
 PAUSE 1
LOOP
PRINT "END OF TIMER LOOP"

'FOR I=1 TO 5
' OPEN "COM1:9600" AS #1
 'DAT$=INPUT$ (255,#1)
 'TMP$=left$(DAT$,12)
' PRINT TMP$
 'IF loc(#1) <> 0 THEN
  ' POS1=instr(DAT$, "GPRMC") 'tring to search for nema GPRMC
  ' PRINT "POS = " POS1
 'ELSE
 '  PRINT "LOC = 0"
 'ENDIF
 'PRINT DAT$
  'PRINT "RECEIVED NO. CHARS " LOC(#1)
 ' CLOSE #1
'NEXT
'CLOSE #1
'
pause (1000)
'PRINT "WAITING FOR GPS FIX.."
'DO
'  WHILE GPS(VALID)=0
'  PAUSE 1000
'LOOP
'PRINT $GNRMC
'DO
'  PRINT "TIME (UTC): " + GPS(TIME)
'  PRINT "DATE      : " + GPS(DATE)
'  PAUSE 1000
'LOOP
'CLOSE GPS

DO
 GPFLAG=GPS(VALID)
 VAR1=GPS(TIME)
 PRINT "GPFLAG =" GPFLAG
 PRINT "TIME (UTC): " + GPS(TIME)
 PRINT VAR1
' PRINT "DATE      : " + GPS(DATE)
'IF GPS(VALID) THEN
'    PRINT "GPFLAG =" GPFLAG
'   PRINT GPS(DATE), GPS(TIME), GPS(FIX)
' ELSE
'   PRINT "NO FIX YET"
'ENDIF
'DAT$=INPUT$(10,#1)
'PRINT "1 " + DAT$
PAUSE (5000)
loop

P.S. The open #1 does show the NEMA strings. Cheers, Michael.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 3156
Posted: 07:21am 16 Apr 2026
Copy link to clipboard 
Print this post

Loaded your program and here is the output:-
COM1 CONFIGURED on GP0,GP1
5 SECONDS
10 SECONDS
15 SECONDS
END OF TIMER LOOP
GPFLAG = 1
TIME (UTC): 17:02:12
17:02:12
GPFLAG = 1
TIME (UTC): 17:02:17
17:02:17
GPFLAG = 1
TIME (UTC): 17:02:22
17:02:22
GPFLAG = 1
TIME (UTC): 17:02:27
17:02:27
GPFLAG = 1
TIME (UTC): 17:02:32
17:02:32
GPFLAG = 1
TIME (UTC): 17:02:37
17:02:37

GPS Tx connected to GP1 (Rx). It doesn't matter if GPS Rx is connected or not.
 
Michael
Newbie

Joined: 14/04/2026
Location: Australia
Posts: 8
Posted: 07:31am 16 Apr 2026
Copy link to clipboard 
Print this post

Phil99 your killing me. So it's the module, or the firmware version as I note you are using V6.02.01.
Are you using the NEO-6M-0-001 module ?
Thanks for taking an interest, I have been tearing my hair out with this.
Yes I swapped 1 & 0 to see if that changed and same result.
Regards, Michael.
 
     Page 1 of 2    
Print this page
The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2026