Single Channel Gateway part 3

(Fmeylink) #85

Got a singe channel gatway based on the lorago dock up and running.
wanted to use the internal sensors to display some data.
got not get that working :frowning_face:
The is data send to ttn i see payload dont know what to do with it and dont know what it is,

anybody got some experience with that ?

(Ud Lo Ra) #86

Since some day, my ESp8266+RFM95, previously working well, no more connects to my WiFi. I am getting mad because nothing changed. Furthermore, it connects to the hotspot of my iPhone if enabled (and configured). But home wifi, nothing, either from WiFiManager and by setting it in wpa[]. Any hint? Thanks.


(by the way: I get better SNR with ESP8266+RFM95 than with Heltec Lora32…).

(Sandgroper) #87

Did you power cycle the router?

(Ud Lo Ra) #88

Yes, in fact in the last days I had some instability on the ADSL line, so I had to switch off a couple of times, and I also found a post elsewhere that mentions some vaguely similar issue. However, phones, tablets and computer at home connect without issues now. The final post about 5GHz seems not valid for me, since the router is a somewhat old D-Link DSL 2640b, 2.4GHz only.
I can add some info: I tried to reformat SPIFF (by setting _SPIFF_FORMAT 1), and when reformatting, it apparently connects to WiFi. But then resets automatically and if I set back to _SPIFF_FORMAT 0 , everything is as before.

Of course this is not a TTN related issue, but I mention this for other singlechannelers (and I will mention the solution, if any).

(Sandgroper) #89

I have seen exactly this behaviour with the ESP8266+RFM95 in my case it is a Netgear router. I did not find the root cause but resetting the router enabled the ESP8266 to reconnect. I do have a couple of theories which are related to DHCP. When a client, such as the ESP8266 acquires a DHCP request, it actually proposes its previous (or current) IP address in the DHCP request. In theory, if a router has that address available, it should return that address in the response. If however the address has already been leased to another end point the router will respond with a new address. When an end point receives a DHCP address from the router, it is then supposed to do a reverse ARP using that address and listening for any reply. If the end point receives a reply to the reverse ARP, meaning another device is already using the address, it is supposed to reject the address and restart the DHCP address request.

I suspect it is the corner cases that the ESP8266 is getting hung up on, which could be not accepting the alternative address, failing on the reverse ARP and requesting again the same address, or simply failing to continue the DHCP process when it does not have a valid DHCP address.

(Ud Lo Ra) #90

Thanks - I was leaning towards something similar, though not so clear and precise. I had a DHCP address reserved for the gateway, to simplify access through the web interface; after the first times, I changed it to another address, thinking at it remaining busy, and lately simply removed the reservation, but nothing helped. By the way, I have also a long lease time that may give further complexity.

On the ESP8266 side, I expected that formatting SPIFF and reloading the sw would refresh everything, but maybe it is not. Now I could try to totally reset the router and see (not sure how it is different from switching off, but in this precise computer science we are used to these black magic rituals :slight_smile: ).

(Ud Lo Ra) #91

Update: the router reset did not help. However, in a IDE menu I never looked with attention I found a way to erase flash contents (Tools/Erase Flash), and this seemed to help, although at first it seemed not. In particular, after erasing, the node was still not able to directly connect to the network specified in the wpa[] array, but was indeed able through WiFiManager (fair enough for me). I tried WiFiManager only after Erase all flash content, but it could function also after Erase Sketch + WiFi settings (I saw it was not connecting directly, so I went for erasing all).
This will not help in future events: the gateway was under the roof, and ideally I would avoid solutions where you have to physically access it. I will try to use an ESP32 + external LoRa chip (not a complete platform, since the Heltec I have seems less sensible than Esp8266 + RFM95).