Cannot get Sonoff Basic R1 switch to connect to WiFi

1,086 views
Skip to first unread message

Rodrigo Silvestri

unread,
Dec 16, 2022, 10:20:27 AM12/16/22
to TasmotaUsers
Hi. I have many Sonoff switches and this week I flashed Tasmota to a Zigbee Bridge and now I want to do the same with my Sonoff Basic R1 (Wifi switches).

I connect the 4 pins to my USB dongle, then keep the Sonoff Basic R1 button pressed when I plug the 3v power so it goes into flashing mode (without pressing the button, it won't let me flash), then I proceeded with many different paths:

Tasmota Web Flasher
Tasmotizer to the latest release
Tasmotizer using a downloaded tasmota.bin (I tried the "OTA firmware" and the "initial firmware" from this site, and also the lite version).
I also tried older versions, like 11.x and 10.x (because I saw someone updating to 10.x on youtube so I thought that might work).

After flashing with any of these methods, I connected to the Tasmota wifi and selected my network. I have a separate bgn wifi network for all my Tasmota switches and iot devices.

I can enter 192.168.4.1, select my network, enter the wifi name/password and it says "Trying to connect device to network" but it won't connect.

This is where I'm stuck. The device doesn't appear on my router's DHCP list, I tried connecting to other networks too with no success. I also tried power cycling again after setting the wifi network.
The tasmota-xxxx-xxxx network still appears, so I don't know if it is not actually trying to connect to my network or if it fails. Sometimes I can connect to it again, and the wifi/password fields are blank and I have to select the network and put the password again, but with no success whatsoever.

I understand my device is old and might be having a hardware failure (even though it was working fine with its original firmware that was updated in the last year), but I'd like to know if anyone can recommend me anything else to try before giving up.

Thanks,
Rodrigo

Phil

unread,
Jan 15, 2023, 5:05:59 PM1/15/23
to TasmotaUsers
Try using a tool like termite or putty or the arduino serial monitor to check the tasmota serial logs and issue commands to the system via serial/usb
That should give you some insight . 

check the docs but iirc the command

Backlog ssid1=yourssid,password1=yourpassword

should provide tasmota with your wifi credentials  If successful it will report back in the serial tool its ip on your net or its failure.. 

If it fails, test the module out with basic arduino sketches,  following the arduino ide instructions to add esp boards to the ide also adds lots of esp  and wifi specific example sketches 2 in particular, 1 to scan and report local ssids and another to host a basic access point.  

I had a module yesterday that would scan ok but could not host and pass any attempt to authenticate a connection.  I tried a 2nd module and flashed working firmware 1st attempt.--


as to a fix or solution, i am still looking  i think i may check any and all capacitors on the pcb for shorts??  but am cluless as to how to proceed further myself. 

Thomas Fänge

unread,
Jan 16, 2023, 1:49:54 AM1/16/23
to TasmotaUsers
Hi,

I have had similar problems. I have upgraded several Sonoff Basics that have been working without any problems with an old version of Tasmota.
If I then reflash them with new software (say going directly from version 6 up to 12), the setup works fine but after reboot it wont connect to the specified WiFi.

What I have noticed (and can't explain) is that if I reflash the old software then incrementally upgrade the software from the devices web-page (6->7->8->9->10->11->12) it works fine, but if I just reflash using eg. Tasmotizer directly from an old version to latest it won't connect to the selected WiFi.

This behavior I have seen on several devices (not only Basic but also Dual and Pow), but if I take a new device that has not been flashed with Tasmota before it works fine by just flashing the latest software.
It is as if the Tasmota software sets the device in a specific state that then needs to be upgraded incrementally, but I agree that this sound very strange.

Anyhow, I have just accepted that I need to upgrade incrementally when upgrading older Tasmotized Sonoff devices.

Cheers/Thomas

Philip Knowles

unread,
Jan 16, 2023, 2:05:02 AM1/16/23
to Thomas Fänge, TasmotaUsers
There are significant changes in parameters and memory areas between some versions which is why, when upgrading, you MUST follow the upgrade path. It tells you to do that for a reason.
If you are struggling to get a device to connect to your WiFi the first thing to try is the web Installer. It tries to automatically connect to the AP, uploads the WiFi details and then attempts to connect to the new IP address.


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Thomas Fänge <thomas...@gmail.com>
Sent: Monday, January 16, 2023 6:49:53 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Cannot get Sonoff Basic R1 switch to connect to WiFi
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/bedff1d7-a950-4aeb-822c-99b21e55dc0en%40googlegroups.com.

Benjamin Reim

unread,
Jan 16, 2023, 2:11:53 AM1/16/23
to Thomas Fänge, TasmotaUsers
Did you set "erase before flash"?

16.01.2023 07:49:58 Thomas Fänge <thomas...@gmail.com>:

--

Thomas Fänge

unread,
Jan 16, 2023, 2:17:50 AM1/16/23
to TasmotaUsers
Yes, I'm totally aware of that I need to follow the upgrade path if I want to upgrade the device, but I thought that I could just also reflash (as if flashing a new device) using the Web-installer (https://tasmota.github.io/install/) or Tasmotizer (ie. not upgrade - just reflash new software).
But I can't - if the device have previously been running Tasmota I must upgrade the device just as you said by following the upgrade path - otherwise it won't connect to the specified AP.

But if I don't want to upgrade - just reflash with latest software as a new device (eg. to save time instead of upgrading - I just want to reinstall new software), shouldn't that work? For me it doesn't ...

Cheers/Thomas

Thomas Fänge

unread,
Jan 16, 2023, 2:22:43 AM1/16/23
to TasmotaUsers
Yes, I have tried both "erase before flash" and not. I have tried the Web-installer and Tasmotizer (both Linux and Windows versions).
It is as if the Tasmota sets some kind of configuration in the WiFi-settings that is not cleared by "erase flash", which survives a "clean flash", and the only way to come by this is to upgrade following the upgrade path.

If this had happened just once I would have ignored it, but since repeatable on several devices I think there is something buried here.

Cheers/Thomas

Philip Knowles

unread,
Jan 16, 2023, 3:13:59 AM1/16/23
to Thomas Fänge, TasmotaUsers

Would erase separately. The ‘erase’ on Tasmotiser etc may only be erasing the parameter areas rather than erasing the whole flash.... If you look at the Commands page the various resets erase different parts and it may be doing that rather than a trye erase.

 

Sent from Mail for Windows

 

From: Thomas Fänge
Sent: 16 January 2023 07:17
To: TasmotaUsers
Subject: Re: Cannot get Sonoff Basic R1 switch to connect to WiFi

 

Yes, I'm totally aware of that I need to follow the upgrade path if I want to upgrade the device, but I thought that I could just also reflash (as if flashing a new device) using the Web-installer (https://tasmota.github.io/install/) or Tasmotizer (ie. not upgrade - just reflash new software).

But I can't - if the device have previously been running Tasmota I must upgrade the device just as you said by following the upgrade path - otherwise it won't connect to the specified AP.

 

But if I don't want to upgrade - just reflash with latest software as a new device (eg. to save time instead of upgrading - I just want to reinstall new software), shouldn't that work? For me it doesn't ...

Cheers/Thomas

måndag 16 januari 2023 kl. 08:05:02 UTC+1 skrev knowles...@gmail.com:

There are significant changes in parameters and memory areas between some versions which is why, when upgrading, you MUST follow the upgrade path. It tells you to do that for a reason.

If you are struggling to get a device to connect to your WiFi the first thing to try is the web Installer. It tries to automatically connect to the AP, uploads the WiFi details and then attempts to connect to the new IP address.

 

Thomas Fänge

unread,
Jan 16, 2023, 3:30:26 AM1/16/23
to TasmotaUsers
Yes, could try that next time (right now all my Sonoff-devices are update (one way or another)) ...

I just hoped that someone else who had similar problem might hear about this and also try what I did to get it working.
I also expected that the Web-installer or Tasmotizer could flash a device from scratch (since it have the option "erase flash") - ignoring anything that was previously flashed - which apparently it didn't in my case.
Since I ended up in exactly the same problem as the original issue described ("could not connect to WiFi after flash") I thought this info could help.

Cheers/Thomas

Phil

unread,
Jan 16, 2023, 10:15:08 AM1/16/23
to TasmotaUsers
OK  i tried again with esptool.py to 
1) erase all memory with the erase all switch
2) reflash tasmota

the result i got monitoring the serial output was 

00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at FB, Count 9
00:00:00.055 QPC: Count 1
00:00:00.065 Project tasmota - Tasmota Version 12.3.1(tasmota)-2_7_4_9(2022-12-16T10:28:17)
00:00:00.554 WIF: Connecting to AP1 =  xxxxxxxxxxx  , password1=  xxxxxxxxxxx  in mode 11n as tasmota-57F2C7-4807...
00:00:06.929 QPC: Reset
00:00:14.413 WIF: Connect failed with AP timeout
00:00:14.747 WIF: Connecting to AP1 = xxxxxxxxxxx, password1=  xxxxxxxxxxx  in mode 11n as tasmota-57F2C7-4807...
00:00:27.642 WIF: Connect failed with AP timeout
00:00:28.976 WIF: Connecting to AP1 =  xxxxxxxxxxx  , password1=  xxxxxxxxxxx  in mode 11n as tasmota-57F2C7-4807...

Without success...

just in case the flash earase didnt take, i retried with the force option and again reflashed.

Also my desktop has a new wifi6 card installed and fails to see the tasmota access point completely while an older 6th gen i5 laptop can see and attach to the tasmota AP?  
The tasmota AP interface crashes on attempting to save credentials however and on recovery

serial output was slightly different in format if not results. (Changed from mode 2 to 4 )

00:00:00.001 HDW: ESP8266EX
00:00:00.050 CFG: Loaded from flash at F9, Count 11
00:00:00.055 QPC: Count 1
00:00:00.057 CFG: CR 361/699, Busy 0
00:00:00.062 ROT: Mode 1
00:00:00.063 SRC: Restart
00:00:00.065 Project tasmota - Tasmota Version 12.3.1(tasmota)-2_7_4_9(2022-12-16T10:28:17)
00:00:00.217 WIF: Checking connection...
00:00:00.218 WIF: Attempting connection...
00:00:00.553 WIF: Connecting to AP1 NETGEAR34 in mode 11n as tasmota-57F2C7-4807...
00:00:01.420 WIF: Checking connection...
00:00:01.421 WIF: Attempting connection...
00:00:02.373 WIF: Checking connection...
00:00:02.373 WIF: Attempting connection...
00:00:03.375 WIF: Checking connection...
00:00:03.376 WIF: Attempting connection...
00:00:04.378 WIF: Checking connection...
00:00:04.379 WIF: Attempting connection...
00:00:05.381 WIF: Checking connection...
00:00:05.381 WIF: Attempting connection...
00:00:06.384 WIF: Checking connection...
00:00:06.385 WIF: Attempting connection...
00:00:06.930 QPC: Reset
00:00:07.388 WIF: Checking connection...
00:00:07.389 WIF: Attempting connection...
00:00:08.394 WIF: Checking connection...
00:00:08.395 WIF: Attempting connection...
00:00:08.897 APP: Boot Count 6
00:00:09.399 WIF: Checking connection...
00:00:09.400 WIF: Attempting connection...
00:00:10.402 WIF: Checking connection...
00:00:10.403 WIF: Connect failed as AP cannot be reached
00:00:10.737 WIF: Connecting to AP1 NETGEAR34 in mode 11n as tasmota-57F2C7-4807...
00:00:11.664 WIF: Checking connection...
00:00:11.665 WIF: Attempting connection...
00:00:12.665 WIF: Checking connection...
00:00:12.666 WIF: Attempting connection...
00:00:13.666 WIF: Checking connection...
00:00:13.667 WIF: Attempting connection...
00:00:14.669 WIF: Checking connection...
00:00:14.670 WIF: Attempting connection...
00:00:15.622 WIF: Checking connection...
00:00:15.622 WIF: Attempting connection...
00:00:16.624 WIF: Checking connection...
00:00:16.625 WIF: Attempting connection...
00:00:17.630 WIF: Checking connection...
00:00:17.631 WIF: Attempting connection...
00:00:18.633 WIF: Checking connection...
00:00:18.633 WIF: Attempting connection...
00:00:19.636 WIF: Checking connection...
00:00:19.637 WIF: Attempting connection...
00:00:20.640 WIF: Checking connection...
00:00:20.641 WIF: Connect failed as AP cannot be reached
00:00:20.642 WIF: WifiManager active for 3 minutes
00:00:20.777 WIF: Wifimanager set AccessPoint
00:00:21.284 HTP: Web server active on tasmota-57F2C7-4807 with IP address 192.168.4.1


If esptools erase all wont wipe whats at the root of this is it a flash memory issue at all and if not what could it be?   

Philip Knowles

unread,
Jan 16, 2023, 10:43:05 AM1/16/23
to Phil, TasmotaUsers

How many devices on the AP?

 

Sent from Mail for Windows

 

Phil

unread,
Jan 16, 2023, 11:32:38 AM1/16/23
to TasmotaUsers
Currently 33.  but it can vary its a netgear rx7000 ac device, which has the option to serve a 2nd Ap on each frequency if required. so 2 x 2.4g and 2 x 5g access points if required.  I tried the 2nd 2.4gh AP over the weekend..  consider that straw clutched..  

also worthy of note after typing the above and disconnecting the esp module, it felt warm to the touch cantered on what looks like an unpopulated chip position on the pcb Not the esp chip or the flash chip both of which were cool to the touch.  
 
guess i should pull a 3rd module and give it usb power for half an hour or so and see how warm that gets.. 



Philip Knowles

unread,
Jan 16, 2023, 11:42:05 AM1/16/23
to Phil, TasmotaUsers

NetGear wifi 5 routers have a limit of 32 devices on the 2.4GHz band

Phil

unread,
Jan 16, 2023, 12:36:32 PM1/16/23
to TasmotaUsers
Sorry  my bad, 33 devices attached to the Router 5 x 5g 6 x wired leaving 22 via 2.4g wifi   first answer was after a quick glance at the front page..  though i had to double check and was dumbfounded to find your right...  I must have misread and mis recalled the marketing as the fact it supported 64 clients on each AP  Not in total was a big factor in buying.. Ha.. so im limited to 32 2.4g clients over 2 ap labels ha, a few old isp supplied routers may still have a 2nd life.


even so still some headroom for new additions..  

meanwhile i checked out a 3rd board overlooking the big red cross on the relay label and screws missing from the terminals indication i have had issues with it before and its behaving the same..  now i have had a few dodgy esp boards and i think i may have pulled these  from the box ( One for sure going by the cross on the relay label) as the 2nd board i pulled and flashed and worked as expected..  

Rather than adding too i may have misdirected this topic with known bad h/w.  However OP may wish to try using esptool to wipe and flash his device? as that proved successful with my 2nd board. 

Philip Knowles

unread,
Jan 16, 2023, 1:14:28 PM1/16/23
to Phil, TasmotaUsers

The 32 device limit was one of the drivers to move over to ZigBee – even though I now have a Fritz mesh system – as ‘lazy’ devices would drop off and not respond when they were needed.

 

The device limit is often the cause of devices not joining WiFi as some routers have a 24 device limit.

 

Sent from Mail for Windows

 

From: 'Phil' via TasmotaUsers
Sent: 16 January 2023 17:36
To: TasmotaUsers
Subject: Re: Cannot get Sonoff Basic R1 switch to connect to WiFi

 

Sorry  my bad, 33 devices attached to the Router 5 x 5g 6 x wired leaving 22 via 2.4g wifi   first answer was after a quick glance at the front page..  though i had to double check and was dumbfounded to find your right...  I must have misread and mis recalled the marketing as the fact it supported 64 clients on each AP  Not in total was a big factor in buying. Ha.. so im limited to 32 2.4g clients over 2 ap labels ha, a few old isp supplied routers may still have a 2nd life.

 

 

even so still some headroom for new additions..  

 

meanwhile i checked out a 3rd board overlooking the big red cross on the relay label and screws missing from the terminals indication i have had issues with it before and its behaving the same.  now i have had a few dodgy esp boards and i think i may have pulled these  from the box ( One for sure going by the cross on the relay label) as the 2nd board i pulled and flashed and worked as expected..  

To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers..@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.

--

You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages