• Sat 2019.03.30

    Finally found some time to play with the NEO-6M GPS module connected to a MDBT42Q breakout. An hour of wire prep and soldering, along with coding the examples, surprisingly was up and running with no fuss.

    http://www.espruino.com/GPS
    https://github.com/espruino/Espruino/blo­b/master/libs/js/GPS.min.js
    http://www.espruino.com/MDBT42Q



    Now, Is it possible to modify the NEO-6M configuration data?

    Goal is to play with standby mode to improve battery life, along with learning what else might be accomplished in data selection, packet reduction, update interval etc.



    While I wade through the 200+ page specification doc, and search for related web site content, just wondering if anyone has done this and could provide a snippet or page links to get me over the hump?

    https://cdn.sparkfun.com/datasheets/Sens­ors/GPS/760.pdf

    Some great links to visualizing software

    http://acoptex.com



    EDIT:
    Looks like U-Center software (Windows only) might work, but would like to emulate that interface with Javascript code lines via the WebIDE

    How to change U-Blox GPS default baudrate and data rate
    https://freematics.com/forum/viewtopic.p­hp?t=1759

    and this looks promising, but in C

    ublox NEO 6m: UBX command sanity check (with Fletcher checksum!)
    stackoverflow.com

  • I don't see why you couldn't - I haven't personally done it.

    It all seems to be very well documented in https://cdn.sparkfun.com/datasheets/Sens­ors/GPS/760.pdf including pseudo-code

  • Sat 2019.04.06

    After two weekends of reading, trial and error, screaming, swearing and hair pulling, [I'm now bald ;-)] finally made progress.

    EDIT Sat 2019.04.13
    Clarification here: My frustrations were not with Espruino, but with U-Center and FX2 drivers using Windows10. After leaving my PC on overnight, the next morning, my COM port became deaf and dumb. Hours of online search to see how to hack the registry, along with multiple un-install and re-install of the drivers and U-Center app, left me with having to launch FX2 before the WebIDE. Not a perfect solution, but it does work.

    Simple answer, yes it is possible to modify the configuration settings.

    Things to watch out for, when block copying code, remember to double check pin references, especially when trying new physical pin connection locations. When connecting the USART, make sure physical connections Tx -> Rx and Rx -> Tx are in fact swapped. The default Baud rate is 9600 and the suggestion is to leave it at that. NEO-6M commands need valid check sums. Make sure you have an authentic Ublox manufactured board and not a knock-off. Read, re-read and read again the spec. Hex values are not ASCII chars. (e.g. 0xA9 !== 'A9')

    When everything falls into place, the code to access is rather simple. I found a known command sequence that the NEO-6M will respond to, when using the UCenter application send message dialog, with accepted known check sum values. No calculation needed.

    From UCenter
    View >> Message View

    UBX msg starts with B5 62
    1By Class 0A
    1By ID of class 04
    2By Len
    2By CkSum
    
    0000  B5 62 0A 04 00 00 0E 34 
    

    This command string will return the firmware version, the NEO-6M ships with:

    0x0A are UBX class MON
    p.83

    https://cdn.sparkfun.com/datasheets/Sens­ors/GPS/760.pdf
    157 MON-VER 0x0A 0x04 70 + 30*Num Answer to Poll Receiver/Software/ROM Version

    The expected result will be in the form:

    p.192 doc
    Ublox 6 Standard firmware versions

    u-blox 6 FW 7.03 ROM CORE 7.03 (45969) Mar 17 2011 16:18:34
    u-blox 6 EXT CORE 7.03 (45970) Mar 17 2011 16:26:24 ROM BASE x.xx ...
    u-blox 6 FW 7.01 ROM CORE 7.01 (44178) Nov 30 2010 11:40:16
    u-blox 6 EXT CORE 7.01 (44179) Nov 30 2010 11:49:29 ROM BASE x.xx ...
    u-blox 6 FW 6.02 ROM CORE 6.02 (36023) Oct 15 2009 16:52:08
    u-blox 6 EXT CORE 6.02 (36023) Oct 15 2009 16:51:54 ROM BASE x.xx ...
    


    I used an 8ch logic analyzer to view the output. But in order to locate the sent data from the NEO-6M, I found it useful to create a visible output indicator, and place a monitor on that pin. In this way, we have a reference in which to compare the output pulse train. The default output burst is ~400msec and occurs every second. So creating a simple square wave reference of 500msec is a good viewable choice. We need an external GPIO pin in order to hang a probe on.

    // D14 - pin 8 CW 5 O'Clock pos 
    digitalWrite(D14,1);
    
    
    Serial1.setup(9600,{tx:D6,rx:D8});
    var gps = require("GPS").connect(Serial1);
    gps.on('line', function(line) {
      console.log(line);
    });
    
    
    var intervalID = {};
    
    function ci() { clearInterval( intervalID ); }
     
    // msec 
    var delay = 500;
    var nTimes = 6;
    
    function st() {
    
      var toggle = false;
      
      intervalID = setInterval(function () {
    
        Serial1.write([0xB5,0x62,0x0A,0x04,0x00,­0x00,0x0E,0x34]);
      
        digitalWrite(D14,toggle);
    
        toggle = toggle ? false : true;
      
      }, delay);
     
    }
    



    NEO-6M data packets at Espruino MDBT42Q USART pins D6 and D8

    Blu D6 is MDBT42Q breakout board pin D14
    Red D2 is the NEO-6M Tx and MDBT42Q pin D8 Rx
    Yel D4 is the NEO-6M Rx and MDBT42Q pin D6 Tx

    Note the 500msec on then 500msec off at Blue D6 set by code Line #28 pin D14



    400msec burst of NMEA response data

    From Red D2 at 250msec interval


    WebIDE output - Note as I archived this image, the NEO-6M temporarily stopped translating received data. I didn't notice that until I posted the image above. See the $GPRMC packet that matches the image decoder values.

    (7.03 (45969)00040007
    $GPRMC,,V,,,,,,,,,,N*53
    $GPVTG,,,,,,,,,N*30
    $GPGGA,,,,,,0,00,99.99,,,,,,*48
    $GPGSA,A,1,,,,,,,,,,,,,99.99,99.99,99.99­*30
    $GPGSV,1,1,03,22,,,23,23,,,27,24,,,31*7B­
    $GPGLL,,,,,,V,N*64
    


    Outbound firmware version request to NEO-6M

    From Yel D4 at 750msec interval

    Note code Line #26 writes the data on Yel D4 MdBT42Q Tx then ~600usec (around 6 bits at 9600) later code Line #28 toggles D14 on Blu D6



    NEO-6M response to firmware version request

    From Red D2 at 775msec interval

    Note that the output doesn't exactly match the spec
    We have: FW 7.03 (45969)




    Complete Project kit available

    Espruino MDBT42Q Breakout board
    Ublox NEO-6M GPS Module
    YP-01 USB-TTL Converter - needed to access U-Center App
    FX2 Logic Analyzer
    3.3V 800mA Voltage Regulator
    5V 2000mA Micro USB Power Adapter






    References:

    U-Center application

    https://www.u-blox.com/en/product/u-cent­er

    ASCII

    http://www.asciitable.com/

    NMEA - National Marine Electronics Association - GPS packet output

    http://www.gpsinformation.org/dale/nmea.­htm#GGA

    Identify fake NEO-6M

    https://fpvlab.com/forums/showthread.php­?50918-How-to-indentify-FAKE-ublox-GPS-c­hips

    Edit default output blocks

    https://www.monocilindro.com/2016/03/28/­reading-gps-data-using-arduino-and-a-u-b­lox-neo-6m-gps-receiver/
    'for RMC, this can be done by sending to the GPS receiver the command: $PUBX,40,RMC,0,0,0,0*47'
    'then polls the info (time, position, speed) by using the proprietary $PUBX,00*33'

  • Brilliant - glad you got it working!

    Did you manage to send any commands other than the one asking for the firmware version?

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Programming the Ublox NEO-6M GPS configuration - is this possible?

Posted by Avatar for Robin @Robin

Actions