I am currently learning about Meshtastic and I have just added a U-blox Neo-6M gps to one of my Pico/SX1262 LoRa nodes. The light is flashing so it is working and has a lock.
However I cannot get anything out of it ie I am seeing no time or position info at all on the OLED screen.
I believe I have it set up in the Position part of Config. I have tried GPIO 0 and 1 and also 8 and 9.
I assume the pin settings of 0 in Meshtastic Config indicate that the GPIO pins are auto detected but I have also tried setting them to the actual GPIO pin numbers. I think the instructions on the Meshtastic site are as clear as mud in this area and do not even seem to correspond with what I see on client.meshtastic.org.
Will I see output on the OLED if the GPS is connected properly but has no lock?
Any ideas? Does anyone know definitely which pins should be used?
Any help would be great.
Ian
I had a play with this for the first time today, and can see that its not as clear as it could be.
I assume you selected some “free pins” for the TX/RX and connected the gps TX/RX to those pins.
In the client you would then set the GPS TX/RX pins. For me the GPS TX pin went to the meshtastic board “RX” pin. (and visa versa). the client reads like its asking for the pin you connect to the GPS RX, so if it does not work, try and cross over the TX/RX pins or remap in software.
Next I just let it run for a while just to see if it settles down or needed time.
On my display I can see the circle and the last node contact. then at center bottom there is 6 dots. the 6 dots is saying there are 6 screens, so now you need to work out how to switch between screens. I could not find an simple way i.e. no button or touch screen… so in the client i turned on "Auto screen carousel) to 5 seconds (in the “Display Config” menu section).
then when it got the the last screen I could see the GPS information.
(Note: I blanked out the finer detail for my location)
Note 2: See the 6 dots on the bottom, showing the GPS data is on the last screen/dot.
Hi Michael,
Thanks for the reply. I only started on this a few days ago myself.
I did work out the carousel setting.
I have used gpio pins 4 and 5 for the OLED screen and 0 and 1 for the GPS.
I have tried reversing the GPS pins to no effect.
Did you enable the Serial output in Config/Module config and set the baud rate to 9600? Some instructions say you have to and others don’t.
I get 4 dots normally and 5 if I send the node a message. I have never seen 6 dots. I have let the node with the GPS run for hours with a GPS lock the whole time with no result.
I am guessing it is a communication problem as I can get output from the GPS module when using one of Jaryd’s demo programmes from the Core website.
I have even tried the previous version of Meshtastic as I got sick of all the issues with keys needing to be renewed with all my swapping around which is apparently a known issue with the current version.
Its probably a dumb mistake I cant see but it is frustrating when all is working except the GPS which, as far as I can see, seems to be pretty necessary to have on at least one node.
Thanks for your help.
Ian
I have note enabled serial output, I believe that is more for text debug output. I have done that for debug logging, but not for this GPS test (so I would treat the two as separate things)
Im still learning as I go, so the number of dots may be linked to the number of messages seen as well and/or some other limit.
I don’t have the same setup as you, but the concept should be the same.
The only real settings I made were under position.
- I set the GPS update interval to 10 seconds (just so it would be more frequent while I was playing.
- I set the TX and RX pins for my board/setup.
Note: I left the PIN_GPS_EN as default.
Note that I did spend time checking what pins where being used and what was free, as there will be the lora module pins as well as anything else needed for your module to work, like the serial/usb interface (for programming)
I have an actual module that come with a display but no gps and then flashed with the firmware for that module.
I will assume that the GPS module is running at 9600 bps. That module should default to 9600, but if you have a uart to serial/rs232 module you could check the board in a terminal program.
I am also assuming your GPS module has a common ground with the pico ?
Outside of all that, I really will be guessing. e.g. Can you flash firmware without the GPS support…
That said, the main thing I think worth checking is exactly what pins are in use as the choice of RX/TX pins my clash with something ?
Assume your using the module as per core’s setup guide, the pins used are
Keep in mind that Im not a user of the Pico’s so happy to be corrected.
From what I read, there is a stdio “uart” mapped to the USB, then you have
UART0 - Mapped to one of (1,2 - 12,13 - 16,17)
UART1 - Mapped to one of (4,5 - 8,9)
src: Raspberry Pi Pico Supported Peripherals | Meshtastic
Recommends to use 8 and 9
I am reading bits that indicate “currently” but no date reference, that the pico can only support 1 uart on the pico. If that is the case, then I would ensure any other serial is turned off / disabled and then focus on 8/9 for the GPS
Thanks for persisting. I previously found a reference that said use 8 and 9 and tried with no success.
I have turned off the serial module and entered 8 and 9 in Position and changed the update interval to 10 seconds and tried the connection to 8 and 9 both ways around. Still no go.
4 and 5 are used for the OLED and that works so I assume all is OK with UART1.
I have just changed the patch wires as well. Still nothing.
OK I built this on my 2040 Pi Pico.
Same issue as you, everything looks ok, but not gps.
While searching I found this.
src: Raspberry Pi | Meshtastic
So it looks like the official firmware does not have GPS support for the 2040 (I have not checked others).
There may be some custom firmware that does, not sure.
Gee that’s disappointing. You are obviously better at research than me!
I guess I did not check as there are lessons on how to add GPS to a pico on the Core website. I never thought to check that that applied to Meshtastic.
I guess I will have to add another type of node and hopefully that can supply time etc to the nodes I have.
Thanks very much for your help.
In theory there is no reason why it should not work, just that its currently not supported.
I note the d/l firmware was about 1.5Meg, so maybe they are trying to keep the compiled code size down to ensure it fits (guess); but I would not have expected the code to read the GPS input to be too big.
I suspect someone will have completed their own compile and enabled it for the Pico, just does not seem to be enabled for the official release.
Im still slowing looking into this one (Since I have it setup at home now).
I found some 3rd party firmware that is meant to have GPS support enabled (same issue so far); excpet this time I get a “no gps connected” message on the screen; which is meant to mean that its expecting to see the NMEA packets, but none yet seen.
Looking at the meshtastic source code, I can see its trying to configure the GPS to the correct baud (so that would imply that its scanning diffent baud rates) to 9600 (which the gps is aleady at). It then sends commands in an attempt to limit the GPS packets to just the ones it needs (this makes sense as it will keep the work load lighter).
My next move will be to wire up some test gear to see if I can see any chit/chat on the GPS pins from the pico. If I can find that, then that should confirm some things for us.
Not sure how long it will take me; so if someone else has already got this working, feel free to chime in.
Wow, I am so impressed by your knowledge, persistence with someone else’s problem and generosity with your time.
Did I read right from your partial co-ordinates that you are in Victoria somewhere?
I live in eastern Victoria in the foothills of the Snowy Mountains. Its a long way to the nearest Meshtastic install that I am aware of.
Thanks again Michael.
Ian
Yeah, they are close, just not my exact home
Pakenham, Vic. Im really a Bairnsdale boy, but you need to go where the work is.
I pick and choose what I will play with and most of the time it will be linked to something I want to know about. Im looking into lora at different levels, base lora to lora WAN. I find getting something to work is a good way to learn something about it. So really we are just down to time now. From what I can see, just looking and reading I would not be surprised if its not added as standard soon as there seems to be references to it being support in some edge cases.
I suspect there is something not 100% with the way the mestastic code is working with the serial port setup. I can see some references to Serial1 and Serial2, which I suspect are mestastic reference to “the UARTS” the are mapped to.
The Serial over USB is working as thats the way the web client is talking to the pico node. But I suspect the onboard uarts are getting setup correctly.
I had a play with the “serial” port for debugging and could not get that to work either and every now and then I would set something that would lockup the unit; so nuke flash and try again
So my probing for the uart it was talking to for the GPS did not yeild much… so moving on to setting up the dev environment and compile my own code… When I get that working I will find a way to send debug output to the display. From there it should just be a case of drilling in and finding where its failing to work.
But given others have it working in the “pico slow clock” variant, and the variant really just looks like a settings file, I cant see why it cant work.
Lets see where we get to.
Look forward to hearing your results. I live on a small property north of Buchan in a place called W Tree. 100Km from Bairnsdale. I too take on things to learn about them. This all started a few months ago when I decided to learn Python as a distraction from an unwelcome life event.
I have enjoyed learning how to interact with devices through the microPython language. I haven’t done any coding for 35 years since my days at the Atomic Energy Commission (as it was then).
Back then it was Fortran IV and stuff like Turbo Basic. A very different world. I remember standing next to the huge hard disk drives in the mainframe building and feeling the floor shake as the heads accessed the massive disks.
Still have testing to do, but I now have GPS data on the pico.
(Some digits blacked out to remove my exact location)
I ended up using Pins 0 and 1 seems UART0 is coded somewhere for the GPS.
Great progress! I’m impressed.
Pins 0 and 1 were the ones I was trying to use and 4 and 5 for the OLED.
Yep, I think I have used all the same pins for my setup. While Im not using the lora hat, its the same module/chip with the same pins. So in theory, if I give you the firmware as is, it should just work (outside of some other setting you may have that is not default)
But this is why we play and test
Thats fantastic Michael. Happy to do any testing. How do you want to send the firmware?
If you like, we can setup a zoom session and I can go over what I have done and we can test on your end (and see if there are any issues)
Normally after 7:30pm (Victorian Time) during the weekdays.
Sounds good. I am retired so just about any time is OK with me with some warning.
I can be available to suit you after tomorrow. (Currently have a visitor)
OK, lets meet back here Friday about 7:30pm and I will temporary post a link.