Notifications
Clear all

10/18/2023 Map Stopped Working?
Visit this post for the fix

Connection issues after editing file

11 Posts
2 Users
0 Reactions
1,229 Views
(@jeffc)
Active Member
Joined: 5 years ago
Posts: 10
Topic starter  

I built my map about a year ago (V.3) and it has been running great until last week.  Looks like the SD card died and wouldn't boot. Thought it would be a great time up upgrade to V4.  Got everything set up, did a few edits in configuration file, clicked save and got connection lost. Rebooted and used BerryLan again to get connected to the network and tells me the IP address and it is connected.  Shows up in my router device list with the same IP address but still cannot connect from my PC.  Reloaded all the software again and was able to connect, did a few edits in the config file, clicked save and connection lost again.   Still shows up in the device list on my router but keeps telling me "unable to connect". Anybody seen this issue before? 

 


   
Quote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 559
 

Sounds like the webapp.py script is erroring out on you after you save the configuration file. 

If you have a monitor that can be temporarily connect. Take a picture of the screen when the problem occurs and post it here.

Also, what version are you running, and what settings are you changing that seems to cause this error? 

Also, be sure that if you are not using OLEDs that you set that setting to 'NO'. This is set to yes in the image and will cause this issue if you are not using the display. Let us know. - Mark


   
ReplyQuote
(@jeffc)
Active Member
Joined: 5 years ago
Posts: 10
Topic starter  

I have attached pictures of what it shows while booting.  Also tried a hard wire connection but still cannot connect to the RPI.  Yesterday i was able to get everything set up (saving multiple times) but it was when i was changing the swipe / refresh setting it where it failed both times.  It does look like there is an error in the webapp.py file.

thanks for your help.


   
ReplyQuote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 559
 

I don't see any attached pics. I'm on my phone at the moment, but I'll check using my laptop later. However, if you don't see the pics, please reattach them. - Mark

Edit: I checked on my laptop and there were no Pics attached. So please re-attach them. - Mark


   
ReplyQuote
(@jeffc)
Active Member
Joined: 5 years ago
Posts: 10
Topic starter  
Page 3

I added the files to this reply, are you able to view them now?

i clicked on the Add Files at the bottom of this email but don't see how you can retrieve or view them.

Page 2
Page 1

 


   
ReplyQuote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 559
 

Yes, got them this time. Thanks.

It's crashing the webapp script because its not seeing the latitude in the airport info routine, which I don't understand because they all report at lat and lon to this request.

So tell me what setting(s) you are changing before this happens so I can track down the reason.

Also download and attach the config.py and airports files here so I can use the actual files for testing.

I'll see if I can nail this down. This is the first time this has come up, so I'm curious as to what might be happening. - Mark


   
ReplyQuote
(@jeffc)
Active Member
Joined: 5 years ago
Posts: 10
Topic starter  

there are no files called airports on the SD card. Where should that file be located?  the problem occurs when i made the changes in the last section in the config file.  it is the one where you tell it what you want to see when it does an update on the status of the airports.  on the first update only about a quarter of the lights came on so i went in to change the transition.  at that point i clicked save and immediately got the lost connection.  I have a 32GB SD card and when i loaded the software it keeps asking me if i want to format another drive partition, is that required?

thanks.


   
ReplyQuote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 559
 

Jeff,

When the SD card in placed in a Windows machine, only the boot partition is readable. This is a small part of the image though. You won't see any of the LiveSectional files on the boot partition. So you must use the web interface. Under the Map Utilities are a few menu items to download the data files. This is where you would have to go to download them.

Regarding the message about reformatting, this is due to the fact that there are partitions not being recognized on the SD card, so Windows asks if you want to reformat. Don't do this, this will erase the image that is on the SD Card.

Having said that, there are utilities that can allow you to use with your windows machine to access your RPi via SSH to download files, such as Putty and Snowflake. There are a number out there to try.

If you are writing a new image to the SD card but not importing your airports and config.py files, then this could be causing the errors. Which is why its important to get those files off your version 3 SD card and then import them into your V4 SD card.

If you are unable to get those files, you'll have to re-setup your new map. So boot the image on the RPi then pull up the web interface and go through the 'Settings' items to get them close to what you have on your build. Be sure to turn off OLED display setting if you are not using them. Set the number of LED's being used to the total number of LED's in your string. Don't change the Wipe's settings yet. Then save config.py.

Go to the airports menu and set the number of airports up and save it. Then run the map to see if it is working.

If you get this far, then we can play with the wipes settings to see what's breaking. Before you do this, be sure to go to 'Map Utiliities' and download the config.py and airports files so you can restore it easily later.

Another thought; a number of changes were made to the config.py file from V3 to V4 which may cause this problem. I'm going to attach a generic config.py file here for you to download. You can copy this over your version of the config.py to ensure that all the needed settings are in the file. Once you do this, then you would go to the web interface and make the necessary changes to work with your particular map. My hunch is this is what is happening.

I know these are pretty general, but lets give it a try to figure this out. Bounce back when you can. - Mark

 

 


   
ReplyQuote
(@jeffc)
Active Member
Joined: 5 years ago
Posts: 10
Topic starter  
Map
error

i am beginning to wonder if it is not my RPI!!   I had some time last night and started from scratch and everything was working good.  Booted up the map this morning it would not boot.  After several tries i got a partial map (see pic).  Shows connected to the network but cannot log in.  Does not show up on BerryLan.  


   
ReplyQuote
Mark Harris
(@markyharris)
Member Admin Registered
Joined: 5 years ago
Posts: 559
 

I don't think its the RPi. The error message is very specific to a missing XML data field that is needed. So we need to find the offending airport ID. The best way I can think is to manually get the information from the FAA for each airport and find which airport is not providing the Latitude and Longitude.

So use this URL;

 https://www.aviationweather.gov/adds/dataserver_current/httpparam?dataSource=metars&requestType=retrieve&format=xml&hoursBeforeNow=2.5&mostRecentForEachStation=constraint&stationString=KGPC 

And copy & paste this into the URL field of your web browser and change the airport ID at the end of the string for each airport you are using. (You can batch them all separated by a comma if you prefer). You should see XML output for each airport that looks like this;

<response xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.2" xsi:noNamespaceSchemaLocation="http://www.aviationweather.gov/static/adds/schema/metar1_2.xsd">
<request_index>441970992</request_index>
<data_source name="metars"/>
<request type="retrieve"/>
<errors/>
<warnings/>
<time_taken_ms>5</time_taken_ms>
<data num_results="1">
<METAR>
<raw_text>KGPC 161455Z AUTO 35005KT 10SM CLR 10/02 A3001 RMK AO2 T00950015</raw_text>
<station_id>KGPC</station_id>
<observation_time>2021-04-16T14:55:00Z</observation_time>
<latitude>39.63</latitude>
<longitude>-86.82</longitude>
<temp_c>9.5</temp_c>
<dewpoint_c>1.5</dewpoint_c>
<wind_dir_degrees>350</wind_dir_degrees>
<wind_speed_kt>5</wind_speed_kt>
<visibility_statute_mi>10.0</visibility_statute_mi>
<altim_in_hg>30.008858</altim_in_hg>
<quality_control_flags>
<auto>TRUE</auto>
<auto_station>TRUE</auto_station>
</quality_control_flags>
<sky_condition sky_cover="CLR"/>
<flight_category>VFR</flight_category>
<metar_type>METAR</metar_type>
<elevation_m>254.0</elevation_m>
</METAR>
</data>
</response>
 
 
You'll notice that on lines 13 and 14 are 2 fields, Latitude and Longitude. My guess is one of your airports is not reporting this information. So you will need to determine which airport it is. Once we know this you can give me the airport ID so I can test it and see what is going on.
 
Its possible that one of the airports you want to use is not reporting this data, in which case we can probably deal with this on a one off situation.
 
So let me know what you find and if you need more information on what to do, let me know that too. - Mark

   
ReplyQuote
(@jeffc)
Active Member
Joined: 5 years ago
Posts: 10
Topic starter  

It was airport code = KHLB  Batesville, IN

<response version="1.2" xsi:noNamespaceSchemaLocation="http://www.aviationweather.gov/static/adds/schema/metar1_2.xsd">
<request_index>442516424</request_index>
<data_source name="metars"/>
<request type="retrieve"/>
<errors/>
<warnings/>
<time_taken_ms>3</time_taken_ms>
<data num_results="1">
<METAR>
<raw_text>
KHLB 161555Z AUTO 31006G12KT 10SM BKN036 11/02 A2998 RMK A01
</raw_text>
<station_id>KHLB</station_id>
<observation_time>2021-04-16T15:55:00Z</observation_time>
<temp_c>11.0</temp_c>
<dewpoint_c>2.0</dewpoint_c>
<wind_dir_degrees>310</wind_dir_degrees>
<wind_speed_kt>6</wind_speed_kt>
<wind_gust_kt>12</wind_gust_kt>
<visibility_statute_mi>10.0</visibility_statute_mi>
<altim_in_hg>29.97933</altim_in_hg>
<quality_control_flags>
<auto>TRUE</auto>
<auto_station>TRUE</auto_station>
</quality_control_flags>
<sky_condition sky_cover="BKN" cloud_base_ft_agl="3600"/>
<flight_category>VFR</flight_category>
<metar_type>METAR</metar_type>
</METAR>
</data>
</response>

that was quick and easy.. 

thanks.


   
ReplyQuote
Share: