New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sonoff can't connect to WIFI / OpenWRT /DNSMasq #2999
Comments
It will connect eventually after an hour or two. Fri Jun 15 08:24:36 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: deauthenticated due to local deauth request Fri Jun 15 08:23:48 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE) Fri Jun 15 08:15:36 2018 kern.info kernel: [111100.170000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:16:59 2018 daemon.info dnsmasq[2855]: config wpad.lan is NXDOMAIN Fri Jun 15 08:18:38 2018 kern.info kernel: [111281.670000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:18:54 2018 kern.info kernel: [111298.170000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:20:17 2018 kern.info kernel: [111380.670000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:22:45 2018 kern.info kernel: [111529.170000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:23:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated Fri Jun 15 08:24:24 2018 kern.info kernel: [111628.170000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:25:14 2018 kern.info kernel: [111677.670000] eth0: link up (1000Mbps/Full duplex) Fri Jun 15 08:25:30 2018 kern.info kernel: [111694.170000] eth0: link up (1000Mbps/Full duplex) |
It is not a Tasmota issue. The problem is OpenWRT or the Esp wifi library. Both are not under the control of Tasmota. Plz post your issue there and close this thread. |
I have read this statement many times that this is not a problem caused by tasmota. By no means I am an expert and questioning the capabilities of any developer. As soon as I install tasmota without altering the wifi library they have this behaviour. 1+1=2? Am I wrong? I am not an expert, nor a developer. It seems that I suck in forensics and math? I really don't get it, sorry for my ignorance and stupidity. Please explain to me where I make the mistake in putting things together. I like to learn and progress. |
@huramentzefix There is something strange going on in your network. An Ethernet port (eth0) is going up/down several times a minute. What is connected to this port - it this your upstream connection, or is it a port on the LAN bridge? It might be that your router is dropping some packets. Look for DHCPDISCOVER in your log - if this gets to the router, there should be a corresponding DHCPOFFER packet, effectively serving an IP from your network to your Sonoff device. Which version of the firmware do you use? There are some firmware releases with Core version 2.4.1, which makes WiFi unstable in some devices and networks combinations. |
Thank you I appreciate your help. might be a physical defect when I jtaged the device. I will have to find a new device that runs openwrt, mosquitto, and has usb. should I close this and open a new case if it persists when I have it up and running on my side? |
If you have a Raspberry Pi - give that a go. It is more than enough to run a home automation system on it. Surely it can't substitute a router, but its power consumption is negligible so you can leave it running 24/7. As a bonus your router will not be loaded with additional tasks. |
I am commenting this, because i have the same issue. I am using an OpenWrt-Router which works fine with a lot of my equipment. But the tasmota-Wifi won't connect to it. I am able to connect to the Device after 4 taps on the key with my android phone. |
@Kielkopf Version 5.14.0 is compiled with Arduino core v2.4.1, which is known to cause problems in some WiFi environments. This is an issue with the core WiFi implementation, and not Tasmota. |
@znanev Thank you, I thought about an arduino before. I just haven't found out how to make it run stable without having the card go bad due to r/w. I guess I get myself a PI. is there any good documentation for having it running with reliable memory or a second memory card and have automatic mirroring each day? @znanev kernel 3.18.23 Can anything be changed if I tweak the RF bridge? Addresses for the 8Mb flash: blank.bin 0xFB000 Initializes the RF_CAL parameter area. blank.bin 0x7E000 esp_init_data_default.bin 0xFC000 what is the correct procedure for flashing? a lot of people are under the impression that it is enough to download tasmota.bin to 0x00000 only and no other files. But just after my research yesterday and today I can see that there have to be some configuration files for the RF bridge in the flash? I was writing a 1MBblank each time before I flashed tasmota. so there is for sure no config file for the bridge in my flash. I also flashed the bin here blank.bin 0xFE000 Initializes the flash user parameter area. will try again with just the two bins for the rf and the rf config file. can someone give me correct instructions for configuration and flashing please? |
I have solved it!! thanks to you guys. I would like to share this with you to see if that helps the other hundreds of users that have the same issue, or if it was just me who didn't know to upload the esp config file.bin and the blank.bin onto the chip. together with tasmota???!!! It seems to me that in my case, just the config file for the ESP wifi bridge needs to be flashed onto the flash. But now it is reproducable, from hitting "restart" or typing "Restart 1" in the console, I have 8 second till I get a ping again from the sonoff. what did it for me is:
Then in RFConfig TxTargetPowerConfig all original, LowPowerMode all original, CrystalFreq 26Mhz, TOUT PinConf select TOUT_ADC_EN VDD:3.3V, RFInit mode FullRFCal in RFInit
happy days! |
@znanev your tip may help, because: The Problem is not current when i compile 5.11.1 Andreas |
@znanev Tasmota Version | 6.0.0a -- 2018.06.17 16:01:35 -- 2_3_0/1.5.3(aec24ac9) |
mine works like a sharm as well. you flashed with ESP8266 DOWNLOAD TOOL V3.6.4, and 5.14, 5.12 & 5-11 are working for you? Just fiddling with a 32Mb flash chips which are not being recognised yet. |
just wondering if an OTA update will overwrite 0xFE000 & 0xFC000 and how to write protect them or tell the ota update not tu use that memory or flash it together again with or after the ota update process to those adresses? |
@huramentzefix Wow, just managed to catch up with your responses. It seems that you have greatly over-complicated the flashing process :) It is quite easy to just use the Python-based esptool for this, like: (erase SPI chip flash): (upload compiled Tasmota binary):
This way you won't have to fiddle with ESP8266 download tool and different memory regions. The esptool hides all complexities from the end-user - give it a go! :) It is also possible to use a 32 Mbit flash chip - no problems at all. I changed the original SPI chips in all my Sonoff devices with 32 Mbit Winbond chips, but this means that I have to compile the firmware myself when I need a new binary. Have a look at this Wiki page: How to Expand Sonoff Basic to 4MB Flash and especially the section Flashing Hope this helps! |
@Kielkopf - I'm glad that it worked! @huramentzefix - give version v6.0.0 a go too (just get the latest code from branch development) - it should work with your Sonoffs too. |
@znanev have you tried this: is this implemented in the tasmota firmware or what about these files configuring the wifi bridge? can it not be that the esp is looking for this config file at this from expresif specified address? thanks for the link with the memory upgrade. I should have been more specific but I already had the 4MB put on on 2 of my sonoffs and they are not being recognised. this is for the original flash: I will do further testing. |
@huramentzefix You don't need to upload blank.bin and esp_init_data_dafault.bin yourself. This is only required if you use Espressif's flashing tool. When you use the Arduino SDK, which is the case with Tasmota, the output of the build is just a single binary file (sonoff.bin by default). The Arduino SDK takes care to fill blank.bin and esp_init_data_dafault sections in the final bin. So you really don't have to specify any other files or memory addresses when you flash the sonoff.bin file:
This works irrespective of SPI chip flash size. Memory outside the 8Mbit boundary won't be used if you use the default build to compile a sonoff.bin file. Read again the Flashing section of the Wiki page for expanding the memory to 4MB. You need to modify your platformio.ini file as instructed, also you have to download |
Hi, Seems that your question has been addressed. Closing this issue. Please, reopen if needed. Thanks. |
Hi,
I have seen that people all over the net have this problem. I am not sure if there is a problem with tasmota and DHCP or tasmota and openwrt or what it is.
I just would like to provide my logfiles to be evaluated by someone with further in depth knowledge.
Fri Jun 15 08:04:29 2018 daemon.info hostapd: wlan0-3: STA OTHER_MAC_ADDRESS WPA: group key handshake completed (RSN)
Fri Jun 15 08:04:29 2018 daemon.info hostapd: wlan0-3: STA OTHER_2_MAC_ADDRESS WPA: group key handshake completed (RSN)
Fri Jun 15 08:04:36 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: deauthenticated due to local deauth request
Fri Jun 15 08:04:36 2018 kern.info kernel: [110440.170000] eth0: link up (1000Mbps/Full duplex)
Fri Jun 15 08:04:36 2018 kern.info kernel: [110440.170000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:04:36 2018 kern.info kernel: [110440.180000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:04:36 2018 daemon.notice netifd: Network device 'eth0' link is up
Fri Jun 15 08:04:37 2018 kern.info kernel: [110440.670000] eth0: link down
Fri Jun 15 08:04:37 2018 daemon.notice netifd: Network device 'eth0' link is down
Fri Jun 15 08:04:37 2018 kern.info kernel: [110441.170000] br-lan: port 1(eth0) entered disabled state
Fri Jun 15 08:04:39 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:04:46 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:04:46 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: associated (aid 1)
Fri Jun 15 08:04:46 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS WPA: pairwise key handshake completed (WPA)
Fri Jun 15 08:04:46 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS WPA: group key handshake completed (WPA)
Fri Jun 15 08:04:46 2018 daemon.warn dnsmasq-dhcp[2855]: DHCP packet received on wlan0-2 which has no address
Fri Jun 15 08:04:48 2018 daemon.warn dnsmasq-dhcp[2855]: DHCP packet received on wlan0-2 which has no address
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:56 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:04:57 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Fri Jun 15 08:04:59 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:05:02 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:05:09 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:05:09 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: associated (aid 1)
Fri Jun 15 08:05:09 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS WPA: pairwise key handshake completed (RSN)
Fri Jun 15 08:05:09 2018 kern.info kernel: [110473.170000] eth0: link up (1000Mbps/Full duplex)
Fri Jun 15 08:05:09 2018 kern.info kernel: [110473.170000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:05:09 2018 kern.info kernel: [110473.180000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:05:09 2018 daemon.notice netifd: Network device 'eth0' link is up
Fri Jun 15 08:05:10 2018 kern.info kernel: [110473.670000] eth0: link down
Fri Jun 15 08:05:10 2018 daemon.notice netifd: Network device 'eth0' link is down
Fri Jun 15 08:05:10 2018 kern.info kernel: [110474.170000] br-lan: port 1(eth0) entered disabled state
Fri Jun 15 08:08:27 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:08:27 2018 kern.info kernel: [110671.170000] eth0: link up (1000Mbps/Full duplex)
Fri Jun 15 08:08:27 2018 kern.info kernel: [110671.170000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:08:27 2018 kern.info kernel: [110671.180000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:08:27 2018 daemon.notice netifd: Network device 'eth0' link is up
Fri Jun 15 08:08:28 2018 kern.info kernel: [110671.670000] eth0: link down
Fri Jun 15 08:08:28 2018 daemon.notice netifd: Network device 'eth0' link is down
Fri Jun 15 08:08:28 2018 kern.info kernel: [110672.170000] br-lan: port 1(eth0) entered disabled state
Fri Jun 15 08:08:30 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:08:30 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: associated (aid 1)
Fri Jun 15 08:08:30 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS WPA: pairwise key handshake completed (RSN)
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 available DHCP range: MY_IP_ADDRESS.201 -- MY_IP_ADDRESS.250
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 client provides name: sonoff-0460
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 DHCPDISCOVER(br-lan) MY_SONOFF_MAC_ADDRESS
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 tags: lan, br-lan
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 DHCPOFFER(br-lan) MY_IP_ADDRESS.245 MY_SONOFF_MAC_ADDRESS
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 requested options: 1:netmask, 3:router, 28:broadcast, 6:dns-server,
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 requested options: 15:domain-name, 44:netbios-ns, 46:netbios-nodetype,
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 requested options: 47:netbios-scope, 31:router-discovery, 33:static-route,
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 requested options: 121:classless-static-route, 43:vendor-encap
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 next server: MY_IP_ADDRESS.4
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 1 option: 53 message-type 2
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 54 server-identifier MY_IP_ADDRESS.4
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 51 lease-time 10d
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 58 T1 5d
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 59 T2 8d18h
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 1 netmask MY_NETMASK_IP_ADDRESS
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 28 broadcast MY_IP_ADDRESS.255
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 3 router MY_IP_ADDRESS.4
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 4 option: 6 dns-server MY_IP_ADDRESS.4
Fri Jun 15 08:08:30 2018 daemon.info dnsmasq-dhcp[2855]: 2882338817 sent size: 3 option: 15 domain-name lan
Fri Jun 15 08:08:44 2018 kern.info kernel: [110687.670000] eth0: link up (1000Mbps/Full duplex)
Fri Jun 15 08:08:44 2018 kern.info kernel: [110687.670000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:08:44 2018 kern.info kernel: [110687.680000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:08:44 2018 daemon.notice netifd: Network device 'eth0' link is up
Fri Jun 15 08:08:44 2018 kern.info kernel: [110688.170000] eth0: link down
Fri Jun 15 08:08:45 2018 daemon.notice netifd: Network device 'eth0' link is down
Fri Jun 15 08:08:45 2018 kern.info kernel: [110688.670000] br-lan: port 1(eth0) entered disabled state
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:46 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: disassociated
Fri Jun 15 08:08:47 2018 daemon.info hostapd: wlan0: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: deauthenticated due to inactivity (timer DEAUTH/REMOVE)
Fri Jun 15 08:08:53 2018 daemon.info hostapd: wlan0-2: STA MY_SONOFF_MAC_ADDRESS IEEE 802.11: authenticated
Fri Jun 15 08:09:00 2018 kern.info kernel: [110704.170000] eth0: link up (1000Mbps/Full duplex)
Fri Jun 15 08:09:00 2018 kern.info kernel: [110704.170000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:09:00 2018 kern.info kernel: [110704.180000] br-lan: port 1(eth0) entered forwarding state
Fri Jun 15 08:09:00 2018 daemon.notice netifd: Network device 'eth0' link is up
Fri Jun 15 08:09:01 2018 kern.info kernel: [110704.670000] eth0: link down
Fri Jun 15 08:09:01 2018 daemon.notice netifd: Network device 'eth0' link is down
Fri Jun 15 08:09:01 2018 kern.info kernel: [110705.170000] br-lan: port 1(eth0) entered disabled state
The text was updated successfully, but these errors were encountered: