How to write to Bangle2 GPS?

Posted on
  • Hi,
    I want to set some configuration to Bangle2 GPS.
    Should I send commands to Serial1 or something else?
    thanks,
    Mark

  • I've got it. It is Serial1.

  • Yes, That's right. If you've got some commands that work it'd be great to see them and have a play.

  • you can try enabling glonass as per http://forum.espruino.com/conversations/­369403/#16285535 if you get better/faster fixes

  • Yes, I also found couple of docs on web. Chinese ones and translated. Like Multimode_satellite_navigation_receiver_­cn.pdf
    Or this one http://wless.ru/files/GPS/Neoway/G7A/Neo­way_G2_and_G7A_Commands_Manual_V1_0.pdf

    I use CAS commands from it.
    Yes it is possible to turn on/off types of NMEA messages, change frequency of them, select constellations etc.
    Regarding turning on/off types of NMEA messages (CAS03) the chip that is in Bangle2 is configured slightly different then it is documented in the docs I've found. It would be nice to find the doc for the actual chip/firmware.

    I am going to create some Setup GNSS app or at least an example in Wiki.

    Also I am looking to try CASIC binary format instead of NMEA for logging, probably it will be more efficient from space and performance perspective.

  • Regarding turning on/off types of NMEA messages (CAS03) the chip that is in Bangle2 is configured slightly different then it is documented in the docs I've found.

    just checked my comments I no longer remember what they mean exactly and there are more columns for PCAS03 than documented in chinese doc, at least 12

    // PCAS03,0,0,0,0,0,0,0 - frequency of GGA,GLL,GSA,GSV,RMC,VTG,ZDA in periods set by PSCAS02 (0-9)
    // "PCAS03,,,,,,,,,1,," GNHV
    // "PCAS03,,,,,,,,,,,1" GPSTXT,01,01,02,MS=3,9,28855810,23,0,000­00000,20,1,00000008
    

    the B5 firmware has a string "$PCAS03,0,0,0,0,0,0,0,0,0,0,0,0* and method that based on bits passed to it rewrites 0 to 1 before sending

    EDIT: oh your second pdf has even more columns there, great :-) The Chinese one has only 8 fields there.

    EDIT2: I had old chinese version they updated it in 2020 and there are more fields there too

  • And BTW the message GPSTXT,01,01,02,MS=3,9,28855810,23,0,000­00000,20,1,00000008 is some status about AGPS/satellite data freshness(?) because there is code in B6 firmware that basically checks if fifth field is less than 9 and if yes then feeds the GPS some long buffer from SPI flash

    Hmm, I guess I could flash the firmware back and check the spi flash what is there after the android app downloads agps data. Even now I still should have something there in flash. will check when I get back home.


    1 Attachment

    • Capture.JPG
  • yeah, I also was puzzled regarding this "$GPSTXT,01,01,02,MS=..." sentence. It looks like it is indicator how stale is AGPS data?
    I doubt though it is that simple "basically checks if fifth field is less than 9 "
    What are FUN_00037c4c and FUN_00037cbc ? the latter one calls iVar2=FUN_00037cbc(msg + iVar2). like it reads a char with some shift from the msg? weird.

  • Just to resurrect this thread (I'm not sure if there's a better one?) I updated the Bangle.js reference with more info on GPS commands. Until it updates on the main site you can see it on GitHub:

    https://github.com/espruino/EspruinoDocs­/blob/master/boards/Bangle.js2.md#advanc­ed-gps

    Looking at this again (manually copy/pasting from the most recent CASIC reference I can find) there do seem to be some interesting binary commands like NAV-TIMEUTC that might speed up time to fix.

    I implemented PCAS60 as a test (the text version) but as far as I can tell it's not implemented on our software version

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

How to write to Bangle2 GPS?

Posted by Avatar for Mark_M @Mark_M

Actions