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:
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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Sat 2019.04.06
After two weekends of reading, trial and error, screaming, swearing and hair pulling, [I'm now bald ;-)] finally made progress.
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
This command string will return the firmware version, the NEO-6M ships with:
0x0A are UBX class MON
p.83
The expected result will be in the form:
p.192 doc
Ublox 6 Standard firmware versions
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.
NEO-6M data packets at Espruino MDBT42Q USART pins D6 and D8
400msec burst of NMEA response data
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.
Outbound firmware version request to NEO-6M
NEO-6M response to firmware version request
Complete Project kit available
References:
U-Center application
ASCII
NMEA - National Marine Electronics Association - GPS packet output
Identify fake NEO-6M
Edit default output blocks