I’m trying to use one of my tbeams as a fixed base station, so I’m trying to set the coordinates to a fixed position so there won’t be a delay showing up on the map while the GPS tries to get a fix.
meshtastic --info
Connected to radio
preferences {
ls_secs: 300
region: US
gps_operation: GpsOpTimeOnly
fixed_position: true
}
My question is - is this all that’s needed to prevent it from trying to get a GPS lock? It seems like it’s still not using the fixed coordinates that I entered, though --info also isn’t showing the coordinates or altitude setting, only the gps_operation. Currently in the node list on my mobile tbeam, it shows my base station recently online, but the coordinates are xx.x9023, xx.x0313.
I also tried to disable sleep by setting device sleep period to 0 in advanced settings, but that setting doesn’t seem to have saved. I basically want to turn off any power saving measures. I’m not 100% sure if it’s the same as ls_secs, since there is no description on the protobuf docs for that parameter: Meshtastic-protobufs/docs.md at master · meshtastic/Meshtastic-protobufs · GitHub
Thanks for the link, though it doesn’t give much info on parameters that affect sleep - “go back to sleep until we sleep for ls_secs” suggests that ls_secs is the duration of light sleep, but if that’s true, shouldn’t setting ls_secs to 0 disable sleep?
ls_secs 0 would set to default which according to the protobufs is 3600.
Have you checked whether set is_router true would satisfy your needs for power management. I believe router mode is BT off, deep sleep off, light sleep 24 hours, gps 24 hours (from the comments in NodeDB.h)
I wanted to avoid is_router since that seemed to assume you want to conserve power - I would want BT on 24/7 since it’s plugged into the wall, and it seemed simpler to set BT always on and turn sleep off instead of using is_router and then undoing some of the things is_router sets.
Also wouldn’t light sleep 24 hours make it sleep for 24 hours?
Yes, that seemed to have already set to true after I set the coordinates. But for some reason the coordinates showing on the map don’t match the ones I passed in, so I assume it’s still getting a GPS lock and sending those instead.
Even when I’m connected to the stationary node itself, the app shows a location near me instead of the coordinates I put into the CLI, so I don’t think it’s stale info.
But it also suggests GpsOpMobile (2) with gps_update_rate of 1 day, so maybe I’ll try that.
Edit: I suspect that gps_update_rate is supposed to be gps_update_interval on the page I linked, since I got an error Can't set gps_update_rate due to 'UserPreferences' object has no attribute 'gps_update_rate'
I know what light sleep is, I just want to disable it as well as deep sleep since my node is plugged into wall power so there’s no point.
Also it looks like gps_operation 2 and gps_update_interval 86400 did the trick for fixing the coordinates, the location on the map now shows the coordinates I passed to the python cli.
Now I just have to make sure it never goes to sleep, since having to wait for it to wake up when using the app is kinda annoying.
Edit: Just kidding - for some reason after power cycling to move the node to my window, the location appears to have switched back to a GPS location instead of the coordinates I gave. It looks like all the settings are still set, so I’m not sure what’s wrong:
Hi, my results from setting location below. It does work, but the odd thing was that it reports the longitiude correctly as 'longitudeI': 133877360 but no latitiude
meshtastic --version
1.2.12
meshtastic --setlat -23.69792
meshtastic --setlon 133.87736
meshtastic --setalt 298
Connected to radio
Fixing altitude at 298 meters
Setting device position
… connection appeared to hang here - probably not relevant,
… pressed the centre button, then had to start a new cmd session Transition powerFSM transition=Press, from=POWER to=POWER
Then I thought I would do a factory reset to clear any odd gps/location settings, but after that it does not recognise as v1.2.11. (Is this another bug?) It was fine after a power-off restart.
meshtastic --set factory_reset true
Connected to radio
Set factory_reset to true
Writing modified preferences to device
meshtastic --port COM3 --info
Traceback (most recent call last):
...
File "c:\users\xx\appdata\local\programs\python\python39\lib\site-packages\meshtastic\__init__.py", line 641, in _waitConnected
raise self.failure
Exception: This version of meshtastic-python requires device firmware version 1.2 or later. For more information see https://tinyurl.com/5bjsxu32
Did the restart, and then I repeated the test but sending commands as follows, and it worked fine. So maybe the reset is important, or sending --set gps_operation 1 first?