PlatformIO build instructions using GUI

hi,

I am part of a group of 4x4 enthusiasts who travel through unpopulated areas in Africa and it would be very useful to equip each vehicle with a TBeam to know the position of each one as quickly as possible because there are times that some vehicle “gets lost”

The position update frequency is “slow” for my purpose. I know how to change the frequency in MeshRadio.h but I don’t know where to change the coordinate update frequency.

Maybe it could be dedicated in some environment variable?

Thanks,
Julio, EB4CUV

there is a setting variable (that is saved in flash) made available to the apps to change. Alas, the android app doesn’t have a GUI for doing this yet. But the python client does have a command line (–setpref)

Thanks for your time geeksville. You speak of an environment variable. What file is it in and what is it called? I could change that variable and compile meshtastic via platformio adapted to my needs.

On windows, just use the following commands in an admin cmd prompt to set the environment variables:

setx COUNTRY EU865 /M
setx APP_VERSION 0.9.6 /M
setx HW_VERSION 1.0-%COUNTRY% /M

after that restart VS Code to make sure it recognises the new env variables.
You can check the env vars in a new (non admin) cmd prompt window with:

echo %COUNTRY%
echo %APP_VERSION%
echo %HW_VERSION%

Only #define HW_VERSION_EU865 did work for my, but the radio properties in the app were set to Connected to radio (tbeam unset/unset) and blank/nothing on the screen.

But I think the easiest way is to edit platformio.ini:

-DHW_VERSION_EU865      //mandatory
-DAPP_VERSION=0.9.6     //just for LCD and app info
-DHW_VERSION=1.0-EU865  //just for app info
4 Likes

I am setting up the region settings… but…
I can not find a cloned configuration.h file in the project.
The file meshRadio.h seem to have been replaced by something called userpreferences (I don’t know what that means)
Does the changes you reference to the platformio.ini provide all that is needed to pick up frequencies from somewhere?

I have VScode on windows, Do I set the environment variable from the ‘terminal’ of platformIO ? I tried them in an admin powershell command ( they say saved, but the echo does not refect that )

I have no idea why you are missing those header files, but you could check the git status of your repo to see why the files changed.

regarding the environment variables:
Yes, you need to run the commands in a windows terminal console. I didn’t try the powershell, but if it says saved, then it should work for you

Did you restart your powershell and vscode after setting the variables? After that the echo cmd should work for you.

Thank you, I exited the powershell and now the variables seem to be set. as reflected from ‘control panel’, system, advanced

1 Like

Hi,

I am not able to have the EU865 frequency on my device, despite writing #define HW_VERSION_EU865 in configuration.h
Any idea on how to solve this issue ?

Thanks.

(edit: yes I’ve tried to change the sysenv variables, but didn’t changed anything unfortunately :/)

First I would like to say hello to everyone 0/ and then I would like to add I am by no means a programmer but I have made a simple python GUI that uses the Meshtastic API. It of course is not 100% as I do not know how to use the API fully but I plan and adding features as I learn how to use the API myself.

My Repo is located:
ZebusJesus/Meshtastic-PyGUI: Python Based GUI that uses the Meshtastic API (github.com)

This was made for Windows systems since that is what I am using but it also works with my Linux test as I tried to make sure to only use python-based code. It uses PySimpleGUI for the interface and that makes it pretty portable.

Dependencies:
It requires python of course as well as the esptool, git for windows, PySimpleUI and Meshtastic
esptool · PyPI
Git - Downloads (git-scm.com)
PySimpleGUI · PyPI

Environmental Variables:
You will need to have your Meshtastic, Python, and Git in EV Path. Just remember that if you use Visual Studio with Python Support, Microsoft moves your Python path to a shared location in the Visual Studio install folder. You will need to make sure all of the tools installed for Meshtastic and esptools are copied to this shared location. If you used pip3 as I did then you just need to copy the files and folders under:

C:\Users%user%\AppData\Local\Programs\Python\Python39\Lib\site-packages

By copying the contents of this folder into the shared path you will be able to use Windows default settings including IDLE which will also have issues finding modules if you use pip3 and have Visual Studio installed.

I just launch the script MeshtasticGUI.py and

When it comes to the flash part, you will need the scripts in the repo but they are just from the firmware download liked in Meshtastic. the script uses .sh so that is why Git for windows is needed and needs to be in your EV that way windows will be able to handle the script that is made by the devs and no modification to it is necessary.

When it comes to adding more features well Iust need to know the commands for the API, I’ve worked out some but I don’t know enough to get super far. I would like to be able to configure everything possible with my GUI because I think it will help get others using Meshtastic if there is a GUI for setting up the radios. I know it’s not hard but it does take a bit of typing and this will save some people that at the very least.

Like I said I’m no programmer so please be nice but I would love feedback and of course feel free to check out the repo, I’m new to really using Git-Hub like it was intended so I’m also open to suggestions for properly setting up my repo since that seems to be its own thing.

7 Likes

Nice work! I would suggest making this into it’s own post for visibility/posterity. I only clicked through to this thread by chance, if it were it’s own post with a descriptive title you’d definitely get more users/feedback.

2 Likes

Thanks, done and done.

Meshtastic GUI - A Python Script Based GUI that uses the Meshtastic API and PySimpleGUI for the interface - Development - Meshtastic

2 Likes