Skip to content
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

RTL8710BX with 2 MB flash on a T102-V1.1 cannot connect to Wi-Fi network #247

Open
spupetic opened this issue Jan 28, 2024 · 14 comments
Open

Comments

@spupetic
Copy link

I have generic Tuya smart sockets with a T102-V1.1 board, but it doesn't have the RTL8710BN, but the BX, without the 4 MB flash, according to ltchiptool, it has a 2 MB flash. I have installed ESPHome kickstart (RTL8710BN) on them, but I couldn't get Wi-Fi client mode working. I have tried different APs, changing channels and WPA mode, password, without success. Then, I have compiled ESPHome with the same and different (X-based) board, but it did not help. The fallback AP works though.

@kuba2k2
Copy link
Member

kuba2k2 commented Jan 28, 2024

Can you post a photo of the T102 board? That way so I can see the exact chip markings of the RTL and the flash.

@spupetic
Copy link
Author

RTL8710BX_socket

This is one of the boards, they are identical.

@RF197
Copy link

RF197 commented Feb 5, 2024

I have the same plugs (blew one up though), yet it connects just fine.

Here are my config settings:


substitutions:
  device_name: 'Plug 2'

esphome:
  name: plug-2
  comment: '20A Smart Plug RTL 1'

rtl87xx:
  board: wr2

logger:
  level: DEBUG

wifi:
  networks:
    - ssid: !secret wifi_ssid
      password: !secret wifi_password

  ap:
    ssid: "Smart Plug 2 AP"
    password: "xxxxxxxxxxxxx"

api:

ota:
  password: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  
captive_portal:

web_server:
  port: 80

I have issues getting the BL0937 to work (something with CHANGE intterupts not allowed) though, and PA15 does not switch.

@spupetic
Copy link
Author

spupetic commented Feb 5, 2024

How did you blew it up? By does not switch you mean the relay switching does not work?

@Raddie12
Copy link

Raddie12 commented Feb 7, 2024

how did you get it in boot mode?
ESPHOME tells me to connect CEN ro GRD, TX2 to GRD, remove CEN from GRD and then remove TX2 from GRD.
I didn´t manage to do so ...

mabey I unse the wromg (CEN PIN?

@spupetic
Copy link
Author

spupetic commented Feb 7, 2024

how did you get it in boot mode? ESPHOME tells me to connect CEN ro GRD, TX2 to GRD, remove CEN from GRD and then remove TX2 from GRD. I didn´t manage to do so ...

mabey I unse the wromg (CEN PIN?

I was just shorting TX2 to GND while plugging the USB to Serial adapter into the computer. Probably not the best way to do it, but I worked well for me. So I have not used CEN.

@Raddie12
Copy link

Raddie12 commented Feb 7, 2024

Do you use GPIO_A30/DEBUG_LOG_TX & GPIO_A 29/DEBUG_LOG_RX. And do you use ESPHome or Tasmota? I tried both also both TX/RX but it´s nor working :(

Do you release the TX2 from GRD after usb-plugging?

@spupetic
Copy link
Author

spupetic commented Feb 7, 2024

Do you use GPIO_A30/DEBUG_LOG_TX & GPIO_A 29/DEBUG_LOG_RX. And do you use ESPHome or Tasmota? I tried both also both TX/RX but it´s nor working :(

Do you release the TX2 from GRD after usb-plugging?

It is a bit confusing with the RTL's RX TX situation, you need to use UART2 (RX2 TX2) refered here: https://docs.libretiny.eu/boards/t102-v1.1/#usage

After plugging in the USB, I released GND from TX2.

I am using ESPHome, Tasmota and OpenBeken is not (yet) compatible with this board.

@RF197
Copy link

RF197 commented Feb 11, 2024

How did you blew it up? By does not switch you mean the relay switching does not work?

Errh yes, trying to connect debug UART while the device was in the mains power. Not my brightest moment....
It also killed the USB ports on my PC, and took my keyboard to the grave with it (plus killed the power in the house). So don't try that at home...

You indeed have to use pins PA29/30 and ground TX while powering up. This only needs to happen the first time by the way.

I'm also using ESPhome.

Update: the relay works if you use the WR2 board (there's a separate issue on that, known bug) (since it's on PA15).

Enabling BL0937 causes the whole thing to bootloop until it goes into emergency mode. This is due to pin change interrupts not being supported in the chips; though they are needed to use the pulse counter plugin. There may be a workaround using two interrupt sources in one handler (it does have support for rising and falling edge interrupts), but I haven't been able to figure out how to convince esphome to use that....

@spupetic
Copy link
Author

How did you blew it up? By does not switch you mean the relay switching does not work?

Errh yes, trying to connect debug UART while the device was in the mains power. Not my brightest moment.... It also killed the USB ports on my PC, and took my keyboard to the grave with it (plus killed the power in the house). So don't try that at home...

You indeed have to use pins PA29/30 and ground TX while powering up. This only needs to happen the first time by the way.

I'm also using ESPhome.

Update: the relay works if you use the WR2 board (there's a separate issue on that, known bug) (since it's on PA15).

Enabling BL0937 causes the whole thing to bootloop until it goes into emergency mode. This is due to pin change interrupts not being supported in the chips; though they are needed to use the pulse counter plugin. There may be a workaround using two interrupt sources in one handler (it does have support for rising and falling edge interrupts), but I haven't been able to figure out how to convince esphome to use that....

Thanks for the tips. Sadly, the Wi-Fi issue is still present for me, I have tried OTA update from the fallback hotspot, it works, but the device does not connect to any Wi-Fi (even tried with a different access point).

@RF197
Copy link

RF197 commented Feb 15, 2024

How did you blew it up? By does not switch you mean the relay switching does not work?

Errh yes, trying to connect debug UART while the device was in the mains power. Not my brightest moment.... It also killed the USB ports on my PC, and took my keyboard to the grave with it (plus killed the power in the house). So don't try that at home...
You indeed have to use pins PA29/30 and ground TX while powering up. This only needs to happen the first time by the way.
I'm also using ESPhome.
Update: the relay works if you use the WR2 board (there's a separate issue on that, known bug) (since it's on PA15).
Enabling BL0937 causes the whole thing to bootloop until it goes into emergency mode. This is due to pin change interrupts not being supported in the chips; though they are needed to use the pulse counter plugin. There may be a workaround using two interrupt sources in one handler (it does have support for rising and falling edge interrupts), but I haven't been able to figure out how to convince esphome to use that....

Thanks for the tips. Sadly, the Wi-Fi issue is still present for me, I have tried OTA update from the fallback hotspot, it works, but the device does not connect to any Wi-Fi (even tried with a different access point).

As a sanity check - the wifi access points are at 2.4GHz and have DHCP enabled, right?. If so this is very odd....

@spupetic
Copy link
Author

How did you blew it up? By does not switch you mean the relay switching does not work?

Errh yes, trying to connect debug UART while the device was in the mains power. Not my brightest moment.... It also killed the USB ports on my PC, and took my keyboard to the grave with it (plus killed the power in the house). So don't try that at home...
You indeed have to use pins PA29/30 and ground TX while powering up. This only needs to happen the first time by the way.
I'm also using ESPhome.
Update: the relay works if you use the WR2 board (there's a separate issue on that, known bug) (since it's on PA15).
Enabling BL0937 causes the whole thing to bootloop until it goes into emergency mode. This is due to pin change interrupts not being supported in the chips; though they are needed to use the pulse counter plugin. There may be a workaround using two interrupt sources in one handler (it does have support for rising and falling edge interrupts), but I haven't been able to figure out how to convince esphome to use that....

Thanks for the tips. Sadly, the Wi-Fi issue is still present for me, I have tried OTA update from the fallback hotspot, it works, but the device does not connect to any Wi-Fi (even tried with a different access point).

As a sanity check - the wifi access points are at 2.4GHz and have DHCP enabled, right?. If so this is very odd....

Of course, and Beken, ESP devices connect fine. I would try setting a static IP, but I have seen that it does not work for now with this platform.

@vladT0
Copy link

vladT0 commented May 18, 2024

I had the exact same problem, tried all the changes and could not connect to WIFI. Finally, I examined the board under a microscope and found a solder ball on one of the chip pins. I removed it and everything worked. Second, if you unsolder the module from the main board and use 3.3V from the UART PCB, note that its current is not enough to boot this module normally, it will reboot without stopping (at least in my case) and the WIFI will not work either. Try flashing a very simple PinScan example from the library, but use a module with a good LDO or solder it back to the main board.

@didjeru
Copy link

didjeru commented Dec 1, 2024

Good afternoon! I also flashed all my Tuya outlets to 20 amps. Now, out of 6 outlets, only 2 are working properly. The others either have no Wi-Fi signal at all or the signal is only 16-20%. With the original firmware, the signal was 100%. I suspect that after the reflash, the chip switches to an external antenna, which is missing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants