|
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: AustraliaPosts: 1048 |
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: AustraliaPosts: 3156 |
It depends on how the module configures the NEO-6 chip. 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 KingdomPosts: 11215 |
They are in the Option_GPS_User_Manual |
||||
| phil99 Guru Joined: 11/02/2018 Location: AustraliaPosts: 3156 |
Thank you, my mistake. Looked down the file list to "G" and stopped. |
||||
| Sasquatch Guru Joined: 08/05/2020 Location: United StatesPosts: 385 |
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: AustraliaPosts: 1048 |
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: AustraliaPosts: 8 |
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: AustriaPosts: 450 |
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: AustraliaPosts: 8 |
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: AustraliaPosts: 3156 |
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. 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: AustraliaPosts: 8 |
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: AustraliaPosts: 2980 |
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: AustraliaPosts: 1048 |
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 KingdomPosts: 11215 |
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: NetherlandsPosts: 5859 |
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: AustraliaPosts: 3156 |
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: AustraliaPosts: 1048 |
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: AustraliaPosts: 8 |
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: AustraliaPosts: 3156 |
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: AustraliaPosts: 8 |
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 |
|||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2026 |