I think @Ian100768 is on the right track here. When you reflash the Meshtastic firmware the Pico still retains all its previous settings. If you have incorrectly set something, then it will keep these settings and you will need to factory erase (or as some people call it, use the nuke file), then give the Meshtastic firmware a go.
If you want to connect your Pico to your phone you should be able to plug it in to your phone’s port. If your phone is USB-C, you will just need a micro-USB to USB-C cable. If you plug it in, the app should automatically recognise it!
In Meshtastic[CLI] Is there a way to store a local config for a node connected via wifi?
For instance I can run this to get a connection meshtastic --host xxx.xxx.xxx.xxx
But if I want to then run a command like meshtastic --nodes it will time out because it can’t find a connection. I think it’s defaulting to serial or maybe localhost.
This ofcourse works meshtastic --host xxx.xxx.xxx.xxx --nodes. So I’m having to reform the connection every time. Surely there is a --cliconfig or --sethost ya know?
Can’t see anything in the docs.
Anyone got a solution? Am I going to have to write a wrapper? Please no
I haven’t had much experience with that, but as far as I’m aware, there isn’t a client config or any way of storing a default like that and that every CLI starts fresh. I also think the CLI tries to auto-detect serial first as well and then falls back to localhost (don’t quote me on that, it’s been a while).
I think a wrapper might be the go here.
If you really wanna get an answer, I’d check out the Meshtastic Discord. Chances are you can get an answer directly from the devs and might even be able to suggest a feature implementation.
Without too much thought, I was thinking you have the program “meshtastic” that you are running with the options to select the host and what a list of nodes from.
so, for example, on a windows PC you could run a batch file with the command being
meshtastic --host xxx.xxx.xxx.xxx --nodes
then when you run the batch file, it would run what you want.
Assuming its running on python and/or different OS, you would tune the batch/scripts file to match
Brian, from everything I have seen and tested, mestastic is a 1 radio to 1 controller, anything else will become some custom firmware that you would need to develop.
If your talking about 1 radio with say 2 different channels, then since its only 1 radio you would be constantly switch between channel 1 and 2 (and tracking and states). This jumping between the two would increase the chance of missing a transmission. If you are in full control the you may be able to work around any issues.
I think a more detailed description of what you are thinking about is needed to be able to give a better response.
Hi I’m trying to follow your guide for the pico and the waveshare hat. I have not been able to get the pico to send messages that come in on the uart. However the meshtastic web interface works fine. I’ve tried a couple of different picos but no joy. Any ideas? Known issues?
Hi there, @David306898, and welcome to the forum. Glad to have you here.
Are you receiving any error codes or are you just not getting a response?
There could be a couple of different things going on with your setup. Would you be able to provide some pictures of your setup so that we can confirm that everything is connected as it should be?
I’m just following the tutorial so I have the exact setup for two Picos and a Waveshare Lora. As in the tutorial, the meshtastic pico is configured to use the serial port and the other pico is sending the test message using the UART. I’ve checked the obvious things like Tx and Rx switched etc. But nothing jumps out. The meshtastic device does not appear to be transmitting the messages. I have a second pico with a waveshare radio set up with meshtastic and I was able to use the web UI to send messages between the two but the serial interface doesn’t work. I’ll send pictures shortly.
Here is my setup. I have Thonny running the little test script you provide on the pico at the bottom right. I have GP8 and GP9 connected on the bottom left meshtastic unit to gp9 and gp8 on the unit on the right. I’m using the unit on the upper right to monitor transmissions. I used the web interface to configure the meshtastic unit to use the serial interface. I can send messages using the web interface but it does not transmit anything coming in on the serial port .
Strange issue, but I feel like there is a single silly setting or something set wrong - very easy to do and I did it quite a bit in making the course .
Let me know if I’m getting this right. You have 2 meshtastic Picos and can send messages between them through the web UI (great, channel configs are fine here), but you are running code on the 2nd Pico, which sends UART messages to the Meshtastic Pico, but they aren’t being broadcast?
If this is the issue, I would start by going through and ensuring that your config in the Serial module is correct. Double check that:
The module is enabled
The receive and transmit pins have the correct pin numbers
The baud rate is set to the same number as the baud rate in the code of the 2nd pico
The mode at the bottom is set to “Textmsg”
If these are all set (and saved, so many times I’ve left config without saving), then it should broadcast any message through UART.
If this still doesn’t work, maybe also give another set of UART pins a go. Swap over to tx=4, rx=5, update the code to use these pins, and also the Serial module to use these as well.
Hey Jaryd,
Thanks so much for getting back to me. First let me say that I really enjoyed your course. One of the best, if not the best, how to videos I’ve found. Kudos!
Your suggestions make total sense and I was hoping it might be something about the version of Waveshare Lora module I’m using or something of that nature. I have a feeling at this point it is something weird about the grounding of the two picos. I am powering themed from two separate USB extenders. It seems that having the two grounds connected via the pico itself might be causing some kind of issue.
Anyway I removed the waveshare module and am just going to see if the two Picos talk to each other via the serial connection. That should clear it up i would guess.
Thanks again for the video and the helpful suggestions. Make on!
Best,
Dave
That was going to be my next suggestion to check, wanted to check the settings first before making you reflash the Meshtastic firmware. The good news is that im 80% sure when you reflash the Meshtastic firmware, it will retain all your settings.
Sounds like you are already all over it though, let us know if you find something!
One more thing to just check, in case there is something goofy going on, at the bottom of the written guide is settings for completely nuking and resetting your Pico and Meshtastic to give you a fresh slate to try from again. It might be a 1-in-a-million chance that something weird is going on.
In terms of the LoRa module, if it sends messages between the devices, it should be fine. Thats the only thing I would worry about there.
Hey Jaryd,
Well, sorry to say it works, but I don’t know why! After checking the serial port function (it was fine) I just reflashed and reset both meshtastic picos, as well as the serial test unit for good measure. Then it started working.
So I guess I must have had a bad setup somewhere in there. In any event, your excellent tutorial really made the difference, and I’m very glad I had it.
From memory when you flash meshtastic to a controller, it can leave old settings in place. As such you may have cleared the old settings and give the the fresh/new ones, thus working…