Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By andre_teprom
#73343 Okay, I give up!

The ESP8266 do not support (user handled) Serial ISR for Arduino, end of the thread...


I'll have a look at "HardwareSerial.cpp" to see if the Buffer size allows (much) more than 255 bytes that will be needed to cover a frame assynchronously took from RX containing a continous NMEA sentence of interest, $GPVTG.
User avatar
By btidey
#73347 In an Arduino environment on the ESP8266 it IS perfectly feasible to write your own isr to handle the serial hw uart rx isr. You would just disable the standard isr, and attach your own. You can even use the code in uart.c as a starting point for your own code.

I guess what the others here have been saying is that, in reality there is not much benefit in doing that.

As a concrete example NeoGPS handles characters one at a time using the decode_t handle( uint8_t c ); routine. As stated it could be called from an isr. It could also be called as characters become available from the standard serial FIFO. The standard buffering ensures that characters will not get lost providing that characters are checked and processed in a sensible fashion. For example, if you have a function that is called periodically that sends as many characters to the GPS handle as are available then that function would only need to be checked fairly infrequently and would be very low overhead.
User avatar
By tele_player
#73421 I received a cheap Ublox GPS module($12 on Amazon), and using a cheap NodeMCU, software serial, and an I2C 128x64 OLED display, found it very easy to handle the data stream from the GPS.

A few things that are good to know:
- the GPS has simple commands to disable messages which aren’t needed
- TinyGPS++ works great
- Software Serial has default buffer of 64. This is easily increased by an argument to the constructor.

The demo program I linked to in an earlier message works as-is. However, adding a bit of instrumentation shows that it occasional misses NMEA sentences. TinyGPS has a counter for checksum errors. Ideally, this would usually stay at 1.

These missed messages are caused by the OLED updates, and the default GPS config sending more message types than are needed.

With a little tuning of serial buffer size, GPS messages, and only updating display when serial buffer is near empty - checksum errors become very rare.

Next, I’ll spend a few minutes moving the display from OLED to a web page, but I don’t foresee any problem running this in either STATION or AP mode.
User avatar
By andre_teprom
#73424 Perhaps I have overlooked something trivial due it has shown compilation errors to me, but it is nice to see that you are able to compile with the ESP8266 core, now I'm encouraged to make more attempts.

tele_player wrote:the GPS has simple commands to disable messages which aren’t needed


In my case, unhappily as the PCB was already made there was no TX pin available on ESP8266 (which was used for another purpose), so that I would not have how to eliminate unwanted sentences.

tele_player wrote:Next, I’ll spend a few minutes moving the display from OLED to a web page, but I don’t foresee any problem running this in either STATION or AP mode.


I look forward to seeing the result of this test.