moshe-braner / Open-Glider-Network-Groundstation

Open Glider Network Receiver based on TTGO T-Beam ESP32 hardware.
https://ros-it.ch/open-glider-network-base-station/
GNU General Public License v3.0
7 stars 4 forks source link

Installation issue #10

Closed Meisterschueler closed 1 year ago

Meisterschueler commented 1 year ago

I have a problem with the software installation. I am working with a T-Beam (T22_V07 20180711) with latest SoftRF installed ("1.2 ESP32").

I start the web based Firmware update with "ognbase-MB102-TBEAM.bin". After this I switch to the OGNbase wifi and select the modified config.json. Since the config.json template is not included in the firmware zip file I took it from github repository. I just replaced the wifi with my home wifi (name and password). After uploading config.json the problems start: the T-Beam doesnt connect to my home wifi. After a while it shows me again the upload page. Now i upload the index.html and style.css and update.html but always the OGNbeam wifi disapperars and reapears after a while. For me it seems like there is a problem connecting with my home wifi but I cannot figure out what exactly is the problem.

moshe-braner commented 1 year ago

One step at a time.

"After this I switch to the OGNbase wifi" you mean the Wifi network that OGNbase creates when it cannot connect to an external network?

Yes you can get the config.json and index.html files from: https://github.com/moshe-braner/Open-Glider-Network-Groundstation/tree/main/ognbase/data

You should edit more than your WiFi in the config.json, e.g., station name and location. But for the WiFi test this should not matter. Then you uploaded your config.json. You should also upload the index.html file. The style.css file is optional but makes it look nicer. Without index.html it cannot show its "home page". Be sure to read the documentation file.

Without an index.html file it always will go to the upload page, so you cannot see within the web interface what the settings are.

After it does not connect to your home wifi, do you get its internal network? Or are you seeing the upload page via the home network?

What does the OLED display show? It has several pages (rotating slide show), and will say whether you are connected to an external network.

JacquesGr commented 1 year ago

I Have the same issue. If you upload the index.html and reboot and reconnect and enter your wifi details manually so it seems the issue is uploading the config.json

I have 3 different boards, same with the 3 of them.

moshe-braner commented 1 year ago

JacquesGr: are you saying that if you edit your wifi SSID and password in the status (home) page then it does connect to your wifi (after "save")? But to get to the status page you need to first upload config.json and it needs to then actually exist within the flash memory file system (SPIFFS). How do the SSID and password appear in the status page before you edit them manually?

Meisterschueler commented 1 year ago

@moshe-braner : Yes, by "OGNbase wifi" I mean the wifi network that OGNbase creates. And as you said: I uploaded the config.json, then index.html, then style.css, then update.html. Always after (or during?) the upload, the OGNbase WLAN disappears and then reappears. I always connect to OGNbase via "OGNbase wifi". In parallel, I monitor my home WiFi to see if the OGN base is connecting to the home WiFi, but this is not happening. When I connect to OGNbase (via OGNbase wifi) I always see the upload page.

I don't have an OLED display on my T-Base.

moshe-braner commented 1 year ago

The OGNbase WLAN disappearing temporarily is normal when it reboots. After uploading one file it should not reboot yet though. Do not upload "update.html", that is some old remnant that I should remove, and I am not sure if it may cause a problem. If you upload only config.json, index.html and style.css and then reboot, it should show the "home page" if the uploads worked.

One possible issue: maybe the config.json or index.html are older versions, OGNbase rejects them if they don't have the current "version". The ones in https://github.com/moshe-braner/Open-Glider-Network-Groundstation/tree/main/ognbase/data are up to date, I think: the index.html file has this line: meta name="OGNbase-Version" content="MB100" and config.json has: "version":"MB100"

Those MB100 versions of the files still work with OGNbase firmware version MB103. I have some plans for MB104 which will then require new config.json and index.html files: the change will offer a button for DOWNloading the config.json, which may help figuring out problems. But for now MB100 is OK. Of course you can't simply edit that line, you need to start with the right template, then edit your SSID, station name, etc.

Another possible explanation is that OGNbase reboots before the upload is complete. Try and upload only config.json. Then wait. Does the WLAN disappear (as it reboots)? It should not reboot at that point, unless it has crashed for some reason.

Without the OLED, it is hard to see what is happening. It is better if you add it. Or, connect a USB cable to a computer and run a terminal program on the computer so that you can see messages sent by OGNbase to the serial port. (The computer needs to have the right driver to treat the USB port as a serial port.) If it reboots, for example, that will be obvious in the output. If the version of the config.json is wrong, it will say that in the serial output.

But somebody has set up OGNbase (version MB103) recently and reported it worked easily. So there shouldn't be a problem in the posted program itself, and the posted config.json?

Maybe your T-Beam is too old? I see you said it is "T22_V07 20180711" - all the ones I have used are V1.1. I don't know why that would matter, but maybe? If you can get a V1.1 T-Beam to test, that may answer the issue. JacquesGr: what version is your T-Beam?

And note, it has to be a T-Beam (if using the "TBEAM" firmware). Meisterschueler: you said "T-Base", I don't know what that is, I thought you meant T-Beam. For ESP32 hardware without PSRAM and without GNSS use the TTGO firmware, not the TBEAM firmware. But I believe "T22_V07" is a T-Beam - just an older version of it, that I am not familiar with.

moshe-braner commented 1 year ago

Reading the initial issue again: "After a while it shows me again the upload page. Now i upload the index.html and style.css and update.html but always the OGNbeam wifi disapperars and reapears after a while. For me it seems like there is a problem connecting with my home wifi but I cannot figure out what exactly is the problem."

If you uploaded both config.json and index.html then next time it reboots it should show the status (home) page, even if it is still the OGNbase wifi network. If it does not, then the problem is with the upload, not the wifi.

What device do you use for the upload? A computer? A phone? I have used both, but only an Android phone, are you using iOS? Which browser on the phone (or computer)?

moshe-braner commented 1 year ago

Now posted version MB104. Same as MB103, except that the file uploads (config, html, css) are more transparent: it lists which files are already there (and how large), and you can download the config.json file if you want to see what's in it (or edit and re-upload).

Note that you'll need new config & html files to go with this new firmware version. Use the new templates in the ognbase/data folder.

And one more thought: after uploading these files, reboot. Do not click "save", if you are looking at the status (home) page! That would overwrite the config.json you uploaded with a new one generated from the settings you see on that page. (If you can only see the upload page, because no valid files have been uploaded yet, then there is no "save" button.) After reboot, the new configuration takes effect. It worked nicely for me, but I may not understand what you are doing differently.

JacquesGr commented 1 year ago

acquesGr: are you saying that if you edit your wifi SSID and password in the status (home) page then it does connect to your wifi (after "save")? But to get to the status page you need to first upload config.json and it needs to then actually exist within the flash memory file system (SPIFFS). How do the SSID and password appear in the status page before you edit them manually?

If I copy style.css and index.html and restart then I have a blank config and can enter the wifi settings in the GUI using the local AP.

moshe-braner commented 1 year ago

JacquesGr: If you then enter your house wifi SSID and password in the GUI (web page) and click "save", and reboot, does it then connect to your house wifi? If so, it sounds like the original config.json you uploaded had some error in its syntax and was rejected. It is strict, a missing comma can cause that. You can now download the internally generated (when you click "save") config.json, and edit it from there as needed.

JacquesGr commented 1 year ago

Hi Moshe,

Thank you for doing OGNBase, it is great software with lots of potential.

I had a number of problems but I now have it seems to be running.

  1. I was using the wrong image TTGO instead of TBEAM.
  2. It did not connect properly to my wifi, if I power on 2 units only one would connect and pinging I would have like 90% packet loss. When I turn the good one off the bad one starts to work. In the end I reduced the WIFI channel width to 20Khz on my wifi and both connect.
  3. When saving from the GUI, it truncates the Lat and Lon, I logged an issue for it, this is still happening.

Now they seem to connect and behave properly, I am still trying to understand how the remote works, for example I have the LCD display that increases RX but the web GUI says zero. Maybe it is because the tracker is not moving and the updates are only sent now and then, I will work out what happens.

I used to run the old OGNBase from Roema and the range I was getting was about 40km with a 9Dbi antenna, LNA made no difference.

https://ognrange.glidernet.org/?#YKEP3,max,all,-30.77258_150.31744,10,#80000040:#008000ff,

Using the same antenna with an RPI receiver I get easily 100km, sometimes 150km

https://ognrange.glidernet.org/?#YKEP,max,all,-30.69996_149.63236,9,#80000040:#008000ff,

I am going gliding next week and I will try to install a new OGNBase with your code.

The issue I have in Australia is that we glide over large areas without electricity or internet (or people that can host OGN) so what would be ideal is if we could mesh the remotes.

For example remote 1 sends data to remote 2, remote 2 sends its data + remote 1 data to the base and so on so we could cover large unpopulated areas with solar powered OGN Base and OGN Remote.

Cheers

Jacques

From: moshe-braner @.> Sent: Friday, March 31, 2023 11:52 PM To: moshe-braner/Open-Glider-Network-Groundstation @.> Cc: JacquesGr @.>; Comment @.> Subject: Re: [moshe-braner/Open-Glider-Network-Groundstation] Installation issue (Issue #10)

JacquesGr: If you then enter your house wifi SSID and password in the GUI (web page) and click "save", and reboot, does it then connect to your house wifi? If so, it sounds like the original config.json you uploaded had some error in its syntax and was rejected. It is strict, a missing comma can cause that. You can now download the internally generated (when you click "save") config.json, and edit it from there as needed.

— Reply to this email directly, view it on GitHub https://github.com/moshe-braner/Open-Glider-Network-Groundstation/issues/10#issuecomment-1491879747 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AMAR2BFOTXUEPPNLXTZFMXDW63HNFANCNFSM6AAAAAAWICQRHU . You are receiving this because you commented. https://github.com/notifications/beacon/AMAR2BFJBIW3LWJYJSSX5MTW63HNFA5CNFSM6AAAAAAWICQRHWWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTSY5RDUG.gif Message ID: @. @.> >

moshe-braner commented 1 year ago

Now posted version MB105 which reports on the web pages if there was an error parsing the config.json file.

moshe-braner commented 1 year ago

In 2-station operation, the OLED message count includes the messages the two stations exchange to keep the connection and the time-relay. That will be a higher count than the actual traffic messages received.

moshe-braner commented 1 year ago

If we want to discuss ideas such as "mesh", should start a new "issue", or better, "discussion", since that it way off the topic of this "issue". I now started two "discussion" threads, let's see if that works. :-)

moshe-braner commented 1 year ago

Hopefully the installation issues are resolved now? If not, let me know. But since I see no more traffic here, "closing" this issue.