logo elektroda
logo elektroda
X
logo elektroda

Teckin SP23 T112_v1.1 W302 (RTL8710BN) Not Connecting to BT Smart Hub 2 WiFi

nigel945webb 339 18
ADVERTISEMENT
  • #1 21825949
    nigel945webb
    Level 2  
    Hi,
    I have a UK version of a Teckin SP23 Smart Plug, T112_v1.1 W302 (RTL8710BN), that will not connect to a BT Smart Hub 2 Wifi, but will connect to an Android Hot Spot.

    For anyone else trying to program this device:
    I opened the device up, soldered wires to TX, RX, GND, and the +V of C7 (before AMS1117 3v3 reg) and supplied it with 10V from an external PSU.
    The TX & RX are connected through an FTDI USB TTL-232R-3v3 for programming and debug.
    Holding the TX line low (for about 1 second) at power up puts the device into programming mode.
    Programmed using BK7231GUIFlashTool-build-233 (a really easy tool and would recommend)
    Firmware auto selected as OpenRTL8710B_1.18.251.bin

    After programming with OpenRTL8710B, the device creates a hotspot, which I can connect to with my phone and open the configuration page at 192.168.4.1

    I then enter my home Wifi SSID and password, and a second SSID2 of my emergency Wifi hot spot that my phone can create.

    Afterwards the Smart Plug will not connect to the home Wifi, but will switch and connect to the Android Hot Spot on my phone (if it's on).

    The home Wifi is a BT Smart Hub 2, running both 2.4 & 5GHz Wifi, in Mode 1, together with one Wifi Disc as a range extender.
    I have tried switching the the Smart Hub 2 Wifi Mode to 1, 2, or 3, turning off the 5GHz Wifi, and turning off the WiFi Disc range extender, all individually and together.

    Using the BK7231GUIFlashTool, I have 'Erased all', reprogrammed, and 'Restore RF part'

    None of the above fixed the problem of connecting to the home Wifi.

    Any help or ideas would be welcome :-)

    Thanks
    Nigel

    Extract from serial port log (with Info:Main message every second removed):
    Info:MAIN:WiFi SSID: switching to SSID1
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [**removed**]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Error:GEN:Can't connect to AP
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:WiFi SSID: waiting for SSID switch 1/3 (using SSID1)
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [**removed**]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Error:GEN:Can't connect to AP
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:WiFi SSID: waiting for SSID switch 2/3 (using SSID1)
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [**removed**]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Error:GEN:Can't connect to AP
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:WiFi SSID: waiting for SSID switch 3/3 (using SSID1)
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [**removed**]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Error:GEN:Can't connect to AP
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    auto reconnect ...
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:WiFi SSID: switching to SSID2
    Info:MAIN:Registered for wifi changes
    AI: Could you let us know what WiFi security settings (e.g., WPA2, WPA3, mixed mode) are enabled on your BT Smart Hub 2? Some devices have trouble with certain security protocols.
    WPA2
    AI: Is your WiFi SSID visible (broadcasting), and does it contain any special characters or spaces? Sometimes hidden SSIDs or unusual characters can cause connection issues with these types of devices.
    SSID is visible, and only contains lowercase letters, no spaces, no special characters, only letters a to z.
  • ADVERTISEMENT
  • #2 21826110
    divadiow
    Level 38  
    obvious I know, but rebooted the Smart Hub?
  • #3 21826222
    insmod
    Level 30  
    Is your AP visible from device itself?
    Use "Scan Local Networks" in wifi configuration.
  • #4 21826951
    nigel945webb
    Level 2  
    >>21826110 Good idea, I hadn't rebooted it recently, but just did and it made no difference. It still does not connect.

    Added after 23 [minutes]:

    >>21826222 >>21826222
    I rebooted the device 5 times so it went into safe mode, and connected to the OpenBeken Access Point with my phone.
    From the OpenBeken menu I went to configure Wi-Fi and Scan Local Networks. My network was listed at the top, the strongest around. SSID: (I've removed it), Channel 11, Signal -61 dBm.
    Everything else was on different channels 6 and 1, and -72 to -73 dBm signal strength.

    Added after 17 [minutes]:

    After a bit more investigation I have discovered the following:
    When the device is in safe mode and broadcasting an AP, SSID: OpenRTL8710B_2D6613C0, on channel 1, 2.4 GHz, I can connect to it easily from my Android phone, with a really strong signal.
    However, my desktop PC, only just sees the AP, reporting a really low signal. It will connect eventually, but I cannot get any useful information through it.

    Windows showing a connection the OpenRTL device
    Screenshot of Wi-Fi settings for OpenRTL8710B_2D6613C0 connection in Windows

    Really low signal from the OpenRTL device
    Windows Wi-Fi network list showing OpenRTL8710B_2D6613C0 with weak signal

    The desktop distance is less than 30 cm from the device, the same as the phone.
    A quick scan of the airwaves shows there is nothing else around on channel 1 (which is the channel the OpenRTL is on).

    In summary
    1. My desktop PC cannot connect to the device's AP, but my Android phone will connect to the device's AP.
    2. The device cannot connect to my home network (BT Smart Hub 2) despite listing it as the strongest signal around.

    This is looking like a Wi-Fi configuration issue within the RTL8710B.
    Country codes / protocols etc?
    Is it possible to force the Wi-Fi standard or encryption?
  • ADVERTISEMENT
  • #6 21827575
    piotrszulc1
    Level 10  
    Does your BT Smart Hub 2 have WPA3 option enabled? If so, try disabling it (or create additional AP with just WPA2). I've heard RTL8710B doesn't work well with WPA3.
  • ADVERTISEMENT
  • #8 21828281
    nigel945webb
    Level 2  
    >>21827463 Yes the driver is 10 years old, as is the PC. Thx for the link to the Dell support - that reports that the latest driver is not compatible with my PC 'This driver is not compatible This driver is not applicable for ####### with Windows 10, 64-bit'. I'll probably stick with the current driver as 'it's not broken - so don't fix it'. It has never given any problems in 10 years of connecting to everything else, like dozens of ESP devices and similar.
    We maybe missing the point here, I used the Dell PC as an example of how it also wouldn't connect to the RTL8710B.
    Probably better to forget about chasing drivers on an old PC and return to the initial problem of the RTL8710B not connecting to a BT Smart Hub 2.

    Added after 8 [minutes]:

    >>21827575
    The BT Smart Hub has WPA2 as default, with the options of WPA-Auto, and None (there is no WPA3 available)
    I have just tried both the WPA-Auto and None, and neither of them worked with the RTL8710B

    WPA None
    Info:MAIN:WiFi SSID: waiting for SSID switch 3/3 (using SSID1)
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [wirelessweb]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Error:GEN:Can't connect to AP
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2

    WPA Auto
    auto reconnect ...
    Info:MAIN:WiFi SSID: waiting for SSID switch 2/3 (using SSID1)
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [wirelessweb]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2
    Error:GEN:Can't connect to AP
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_DISCONNECTED - 2

    On my phone's Hot Spot I have the option of: Open, WPA2-Personal (default), WPA2/WPA3-Personal, WPA3-Personal
    We already know the phone's WPA2-Personal works but I have now also tried Open and WPA3-Personal, and they all work.
  • #9 21828308
    insmod
    Level 30  
    Can you share a photo of your module, perhaps antenna is somehow damaged? (though i doubt it).
    RTL firmware itself is stable, my RTL8710B plug uptime is 3 month without reboots.
    Wi-Fi code is shared between RTL8710B, RTL87X0C and RTL8720D and is considered stable.

    Still, i believe it's a router problem. BT Smart Hub 2 hardware is based on broadcom, and they don't have a good reputation in open source community.
  • #10 21829332
    nigel945webb
    Level 2  
    >>21828308
    Hi, I may be getting somewhere :-)
    Your comment about the release for these RTL chips being stable, and the question about damage has been very helpful.
    This device, before reprogramming, was running the stock firmware from Tuya, and successfully connected to the BT Smart Hub 2 for years. I had saved a copy of the Tuya firmware, so today I restored it, booted it up, and tried to connect to my home Wi-Fi (the Smart Hub) - and it wouldn't. This is a result! The fact that OpenBeken won't connect to my home Wi-Fi is duplicated with the Tuya firmware.
    Something has happened to the device during the disassembly that prevents it connecting to anything but an Android phone.
    Pictures attached of the device. I can't see any damage and I've looked really closely at the decoupling caps too.

    I think it's time to move on and put this one in the bin :-)

    Thank you (all) for your help
    Nigel

    PCB connected by wires to a breadboard; alligator clips on the left, a connector and cable on the right Round blue PCB with relay, capacitors, and a side bundle of colored wires Round blue PCB underside with soldered wires and large metal traces, close-up Close-up of a blue PCB module with ICs and the marking “T112_v1.1”. Close-up of a blue PCB with capacitors, an LED and an IC; “SP27” sticker in the background. Close-up of a PCB with soldered wires and a metal slide switch. Close-up of a device interior: PCB with soldered wires and electronic components. Back of a white smart socket with three UK pins, a QR code, and printed electrical markings
  • ADVERTISEMENT
  • #11 21831358
    divadiow
    Level 38  
    boot log from your backup
    Code: Text
    Log in, to see the code


    are these your pins?
    Code: JSON
    Log in, to see the code
  • #12 21831992
    nigel945webb
    Level 2  
    >>21831358
    I've just had a poke about following traces/tracks, and I can confirm the following:
    12 Relay, high = activated.
    14 Button, low = pressed.
    15 LED (only one LED), low = on.

    Pin 23 is not connected.
    No current-detection facility on this device.
  • #13 21832013
    divadiow
    Level 38  
    ok, what does your template look like as seen in the web app config tab?
  • #14 21832080
    nigel945webb
    Level 2  
    >>21832013I am unable to extract the Tuya config by using the Webapp download (72 kB) and extracting in the BK7231 Easy UART Flasher. It reports: Failed — see log for more details — Failed to extract Tuya keys — magic constant header not found in binary

    So I have created my own config that appears to be doing the correct thing.
    Screenshot of a GPIO configuration panel with dropdowns and fields, including Rel, Btn, and LED_n entries.
    Screenshot of 10.108.48.37/cfg_pins showing pins PA12, PA14, PA15 mapped to Rel, Btn and LED_n
  • #15 21832140
    insmod
    Level 30  
    If you've used LittleFS/Filesystem, then Tuya Config is overwritten. Still, upload what you have here, perhaps something can be extracted.

    Anyway, try to update to last firmware. I disabled SDK auto-reconnect, since i've noticed that it significantly increases connection time.
    Perhaps it might fix your issue.
  • #17 21832756
    nigel945webb
    Level 2  
    Tuya config file attached - the one I couldn't read.

    Tried the new version 256.
    Initializing Wi-Fi... OpenRTL8710B, version 1.18.256
    Unfortunately, it still will not connect to the Smart Hub 2

    I have a second Teckin SP23 that I'm just cutting a hole in to access the pins, without opening the whole case.
    Now I know a bit more about the process; I can try to see if this one works with the latest OBK firmware, and hopefully be able to revert it back to the original firmware.
  • #18 21833137
    nigel945webb
    Level 2  
    On the 2nd Teckin SP23, I have downloaded the Tuya firmware with both ltchiptool-v4.12.2 and BK7231GUIFlashTool-build-233.
    The files are very slightly different near the end?
    I then re-flashed with OBK OpenRTL8710B_1.18.256.bin.
    After a reboot and config, this one connects to my BT Smart Hub 2. All looks good :-)

    That confirms that the previous/original Teckin SP23 had a hardware problem after disassembly, and it is not an OBK firmware problem.
    Thank you everyone for your help.
  • #19 21833157
    insmod
    Level 30  
    >>21833137
    Your device probably rebooted after you took first backup, and tuya firmware wrote something like reset count to it's data storage.

Topic summary

A UK version of the Teckin SP23 Smart Plug (T112_v1.1 W302 with RTL8710BN chip) fails to connect to a BT Smart Hub 2 WiFi network but successfully connects to an Android Hot Spot. The device was opened and wired for serial communication (TX, RX, GND, +V at C7 before AMS1117 3.3V regulator) and powered externally at 10V. Using an FTDI USB TTL-232R-3.3V adapter, the device was put into programming mode by holding the TX line low at power-up. Firmware was flashed with OpenRTL8710B_1.18.251.bin via BK7231GUIFlashTool-build-233, enabling the device to create a hotspot for configuration at 192.168.4.1. The user inputs the home WiFi SSID and password along with a secondary emergency hotspot SSID. Responses suggest verifying if the BT Smart Hub 2 was rebooted and checking if the access point is visible to the device using a local network scan in the WiFi configuration. The issue appears related to the device's inability to connect to the BT Smart Hub 2 despite successful programming and hotspot creation.
Summary generated by the language model.
ADVERTISEMENT