Originial Espruino and GPS Module

Posted on
  • https://www.espruino.com/GPS

    Hi! I recently purchased an Ublox NEO6MV2, an Original Espruino Board, and an Espruino Pico after reading the webpage linked above. I connected the Original Espruino Board to the Ublox GPS Module. I connected VCC to BAT, tx to C10, rx to C11, and GND to GND. The red light on the Ublox GPS module blinks every second or so; however, I entered the code shown below, and this error message pops up: "Uncaught InternalError: setDeviceClockCmd: Unknown Device 816 at line 1 col 35 Serial4.setup(9600,{tx:C10,rx:C11})." After trying it again a few other times, a different error message that simply reads "undefined" shows up.

    This is the code I entered:

    Serial4.setup(9600,{tx:C10,rx:C11});
    var gps = require("GPS").connect(Serial4, function(data) {
    console.log(data);
    });

    I have also tried Serial3, Serial 2, B10/B11, and A2/A3, but they all don't work as well. I'm also doing this near a window. What am I doing wrong? Is there something wrong with the code I'm entering in? Can someone please help me? Thanks!

  • What version is Espruino? There were serial setup issues in the past... but that was a while ago.

  • Sun 2019.01.20

    Hello @user97113

    @allObjects was inquiring as to whether a re-flash to a more recent version of Espruino had been performed, and what is that version.

    Would you please post the results of entering in the IDE:

    process.env


    http://www.espruino.com/Reference#t_l_pr­ocess_version

    Knowing that tidbit may garner some insight into the serial setup issue.


    How are you powering these two boards? Do you have a way to measure the voltage at Vcc?

    'I connected VCC to BAT, tx to C10, rx to C11, and GND to GND'

    Please check your Tx Rx connections. Compared with the table on the GPS doc page, they seem opposite.

  • Would you please post the results of entering in the IDE: process.env

    Here are the results:

    ={
    "VERSION": "1v80",
    "BUILD_DATE": "Aug 7 2015",
    "BUILD_TIME": "11:30:04",
    "GIT_COMMIT": "44f2fc15e94e3eac6cb0cbd908b66ec8886e9d8­8",
    "BOARD": "ESPRUINOBOARD",
    "CHIP": "STM32F103RCT6",
    "CHIP_FAMILY": "STM32F1",
    "FLASH": 262144, "RAM": 49152,
    "SERIAL": "39ffe105-47483537-09671543",
    "CONSOLE": "USB",
    "EXPORTS": { "jsvLock": 95777, "jsvLockAgainSafe": 95763, "jsvUnLock": 95739, "jsvSkipName": 48017,

    "jsvMathsOp": 83813, "jsvMathsOpSkipNames": 103165, "jsvNewFromFloat": 43857, "jsvNewFromInteger": 43899, "jsvNewFromString": 193573,
    "jsvNewFromBool": 43877, "jsvGetFloat": 70037, "jsvGetInteger": 192485, "jsvGetBool": 83453, "jspeiFindInScopes": 63905,
    "jspReplaceWith": 127945, "jspeFunctionCall": 53589, "jspGetNamedVariable": 112893, "jspGetNamedField": 112749, "jspGetVarNamedField": 112349,
    "jsvNewWithFlags": 193369 }
    
  • 1v80 is pretty outdated, and exactly with that (and some few other) versions there was this issue: https://github.com/espruino/Espruino/iss­ues/559 that you face: setDeviceClockCmd: Unknown Device.

    As @Robin hints, update - re-flash - your Original Espruino board. In the IDE, click the Gear / Settings Icon and then choose Flasher from SETTINGS menu.

    Instructions how to re-flash you can find at https://www.espruino.com/Original , section Firmware Updates.

    Amazing how reliable Murphy works! What are the odds to get exactly that version... - Sorry for that, I know how it is when starting with something and that something just walks sidewards instead of forward.

  • Just as @allObjects says, if you update the Espruino version on your board you will probably find that everything works great!

  • @Gordon
    @allObjects
    @Robin

    Thanks, guys! It is now kind of working. However, "NaN" is showing up for lat and lon:

    "time": "02:57:23",
    "lat": NaN, "lon": NaN, "fix": 0, "satellites": 0, "altitude": NaN }

    Why is this happening and how can I fix it?

  • Mon 2019.01.21

    It appears you may have a successful re-flash. What version is now installed?

    Also, as I mentioned in #4 was it possible to verify that the Tx Rx lines cross as shown in table from your GPS link in #1 above?

    I don't have a Ublox NEO6MV2 GPS board to verify, but . . .

    Assumption here, if 0 satellites is the actual number detected, that might explain why the data is invalid, e.g. NaN

  • Yep, I believe it'll just return NaN until it's got enough Satellites in range to give you a proper reading. You can check with isNaN(fix.lat)

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

Originial Espruino and GPS Module

Posted by Avatar for user97113 @user97113

Actions