• 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

    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 
    var gps = require("GPS").connect(Serial1);
    gps.on('line', function(line) {
    var intervalID = {};
    function ci() { clearInterval( intervalID ); }
    // msec 
    var delay = 500;
    var nTimes = 6;
    function st() {
      var toggle = false;
      intervalID = setInterval(function () {
        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

    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


    U-Center application




    NMEA - National Marine Electronics Association - GPS packet output


    Identify fake NEO-6M


    Edit default output blocks

    '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'


Avatar for Robin @Robin started