-
Notifications
You must be signed in to change notification settings - Fork 9
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
SUPPORT Request for Tuya RSH-GW-018 DM Zigbee Gateway ZS3L + WBRG1 Gateway #6
Comments
First your pictures is private so cant taking one closer look on them. |
Hi @MattWestb , |
The picture is now working so i can taking one close look later (i have seen the same some times before and its taking some times until being released). Try find the Linux console then its booting and its very likely on one of the connections. PS: the P2 is the first going to the Zigbee module but the last 3 is going to both but can being used for sortieing interesting. |
Hi, |
Great you getting the boot log from the WiFi / Bt module !! |
wbrg1, contains realtek RTL8721CSM wifi+bt with cortex cpu.. so it will be SOC, i think this project could help to write own system, and use it as you like.. |
It's say's rb8710, not sure is it compatible sdk with 8721 or not.. it could be different products |
Hi guys, |
@luconedj it's truly nothing to do with tuya, chip made bye realtek, and it contains cortex cpu, where all tuya software is running. Tuya only packed components from shelf and made it's software. So if you wana untie this device from tuya, you need to find out other software, or write in your own.. so SDK (Software development kits) are tool bundle which you're required to build and compile your own software.. Take example other tuya products which runs on ESP chips, they are also wifi chips with cpu, and also as same as @mihsu81 mentioned.. |
@geduxas thank you, got it. |
If can getting one ser2net working all shall being OK its the only thing that is needed. Hope we can getting one more tuya GW well hacked !!!!! |
Yes i hope the same! |
For ESP only USB-TTL is needed but for the ZS3L if not the bootloader (it shall working) you need flashing new bootloader on the MG21 chip you need one SWD that supporting MG2X devices (not all do it then its have extra hardware security). |
Hi @MattWestb , thanks. |
Its working 100% on MG1 chips like first and second gen IKEA devices but likely not on MG2X but some users have getting it working but i donnt knowing witch firmware and program they was using (I have one original Silabs WSDK do its one genuine Seeger device and its having extra things for Silabs chips in the firmware). |
mmm ok, i'll try, 7 euro is affordable and honestly it's long time that i need one to start playing with STM32 haah |
Hello guys! Here is the log: Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD On the other Terminal with GDB: [luconedj@archlinux ~]$ cat gdb.cfg For help, type "help". Attached also dump.bin. Analyzing it with an hex editor, seems quite valid. I found also some tring related to Gecko bootloader and ember. |
Great work done @luconedj !!! |
Hi @MattWestb thank you very much for the feedback ❤️. |
https://www.silabs.com/documents/public/data-sheets/efr32mg21-datasheet.pdf |
Ok cool! So i think i don't have all.. i'll try to repeat process according to memory map you shared. Ill let u know thanks! |
ok i used this: nothing in user data... DECIMAL HEXADECIMAL DESCRIPTION19276 0x4B4C Boot section Start 0x57424257 End 0x42703857 What about WBRG1 ? any idea on this? |
Use same st-link for wbrg1 :) |
Yes.. but how? haah |
From https://www.silabs.com/documents/public/user-guides/ug103-06-fundamentals-bootloading.pdf On EFR32xG21, the main bootloader resides in main flash: And they is using 2 different bootloaders one for coordinator / CLI apps with X-Modem and one other for devices for OTA updates. And one good thing putting in the userdata if running EZSP: |
As told earlier it's just realtek chip inside.. so need to find out which pins are exposed in tuya board.. i almos sure you should find those easy. Here is realtek manual i found |
Yes i saw that application note, but i belive is not so useful because related to evaluation board. |
Thanks a lot @gpaesano, sono Italiano pure io. Went on and attempted to build your source and flash with the Arduino IDE. |
Thanks for all the effort!
Also I haven't fully understand how to get the firmware onto the device. Do I need to use a ST-Link to flash it or is a UART adapter enough? |
@frescof No there is no way to brick it. You can always reflash it.
|
@frescof please do an "erase only" before flashing for a clean flash (I think the message you're reporting happened to me as well). |
I manged to compile with Arduino and upload (the _IN_ADDR_T_DECLARED is somehow ignored and I had to mess around in the framework a bit, but then it compiled).
so I guess there is something wrong with the UART connection with the initial ZS3L-Firmware? |
I figured it out, I had to remove this line: |
@TheNitek , Please use the last source in the .zip version attached above. It will set up the uart at the very beginning avoiding this error. |
@TheNitek universal-silabs-flasher --device socket://192.168.111.189:80 --ezsp-baudrate 115200 --probe-method ezsp probe (replace the ip address above with your one) you should see something like: 2024-10-30 19:54:26.340 PC-CASA universal_silabs_flasher.flasher INFO Probing ApplicationType.EZSP at 115200 baud |
I think the Serial.print messed with the timing of the UART reading. Removing it fixed it for me and flashing also worked, so my device is working now. Thanks a lot! |
@TheNitek Once flashed with the new firmwares the protocol between the WBRG1 and the Z3SL is HW via RTS and CTS so there should not be any issue in the timing. You can see the messages between the host (Zigbee2MQTT) and the Z3SL on the log UART (half of them if you had to remove the line above). |
Hey @gpaesano could you please help me?
|
See post above. if red and blu are not alternating then either the double click failed or the firmware compilation is wrong. To go in flashing mode for the ZS3L double click at power on, then red and blue led should blink alternatively. If so you can then try to flash the Z3SL with silabs flasher. Please use version 8 in the last G01-pro-ncp-uart-hw_4.zip. universal-silabs-flasher --device socket://192.168.111.189:80 --ezsp-baudrate 115200 --probe-method ezsp probe (replace the ip address above with your one) you should see something like: 2024-10-30 19:54:26.340 PC-CASA universal_silabs_flasher.flasher INFO Probing ApplicationType.EZSP at 115200 baud |
Yes. That what I acually did. Had lights alternating several times, but... |
Ok. So I manually shorted some pins to the GND and managed to get this result, but cant figura out why it is not processing further.
|
if it is flashing double click is ok and the module should go in bootloader mode without any need to GND any pin (cpu will do it). |
Hello all. I have been doing a bunch of testing. As I was saying I had continuous zigbee2mqtt crahes, with kinda random deelay.
But I finally managed to find what was causing the crash and it's related to flow control.
and no crashes. Haven't seen a crash for more that 24h now, a record! I can confirm that I had exactly the same issue as TheNitek about the Serial.print line non allowing to flash the ZS3L module. On top of what gpaesano did (thanks dude!), I added a "single" click on boot function that will cause the module to go in uartburn so that is possible to flash it via serial port. Here the source code and the binary that can be flashed directly with Image Tool (better do an erase flash as gpaesano advised) If somebody had similar crashes to mine and this solve their issue please let me know |
Nice. I manged to flash ZS3L using your firmware for WBRG1. |
Hey,
you have to set your wifi ssid and password.
You can easily do this at the very first run or by longpressing the
button during poower on.
The gataway will create a wifi "|GW_Network", use a mobile phone to
connect to and then using a browers visit the page:|
|http://192.168.1.1/L|
|
|
|(please do not use https://)
|
|you will be able to insert your local wifi name and passwerd, which
will e stored in eeprom.|
|Then reset the gateway, which will connetct to your network.|
|Hope it help.|
|All the best|
|gpaesano
|
Il 07/11/2024 10:14, Artem Murashko ha scritto:
…
Hey @gpaesano <https://github.com/gpaesano> Could you plese help me
with your Arduino frimware.
I've flashed it through the arduino IDE, but forget to update my wifi
credentials.
And now I have this. Is there a way to enter upload mode again. I'm
trying the original method with shorting the LOG UART TX to GND
through 1000 ohm, but it does not work anymore. And it looks like AP
does not start. I even tried to create hotspot with default
credentials for gateway to connect and enter ota mode, but have no
success.
Logs:
|UART done Start FlashStoreAndRetrieve on Rtlduino RTL8720DN
FlashStorage_RTL8720 v1.1.0 FlashStorage length: 4096 Get ssid =
YourWifi Get pass = WifiPassword Request to configure ...IPv4 enabled
WIFI is not running Initializing WIFI ... WIFI initialized Starting AP
... GW_Network started Error!!!upd_new error IP Address: 192.168.1.80
NetMask: 255.255.255.0 Gateway: 192.168.1.1 SSID: GW_Network BSSID:
18:DE:50:E0:F:87 Encryption Type:4 ERROR opening socket [ERROR] Socket
conntect failed [ERROR] Accept connection failed [ERROR] Accept
connection failed [ERROR] Accept connection failed |
If I try to enter OTA then I have this:
|UART done Start FlashStoreAndRetrieve on Rtlduino RTL8720DN
FlashStorage_RTL8720 v1.1.0 FlashStorage length: 4096 Get ssid =
YourWifi Get pass = WifiPassword Pressed...Released...
Pressed...Released... Pressed...Released... 3 click(s) Request to OTA
...[MAIN] Attempting to connect to SSID: YourWifi interface 0 is
initialized interface 1 is initialized Initializing WIFI ... WIFI
initialized RTL8721D[Driver]: set ssid [YourWifi] dissconn reason
code: 0 scan stage, scan timeout [MAIN] Attempting to connect to SSID:
YourWifi RTL8721D[Driver]: set ssid [YourWifi] dissconn reason code: 0
scan stage, scan timeout |
—
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXLCXXC25ZZGGRXBRABBGSDZ7MVOJAVCNFSM6AAAAABD5ZGDC2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINRRGY4TSOJWHA>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Happy to see that is working. Nice new one click function, but be aware that for the very first flash you need to activate it as explained before. |
Hi everyone, wonderful job, I read the whole discussion but I couldn't understand one thing. To be able to modify the gateway you simply need to flex it with Arduino IDE or you have to carry out some steps first. Forgive me but I'm new to these things but the world of home automation fascinates me a lot. Is there someone kind-hearted who can give a mini guide on how to do everything. Thank you all so much in advance for the fantastic work. |
Hi,
Thanks! |
The resistor is needed only if you mess up completely and the WBR1 doesn't boot at all, like I did :)
Hope this helps |
@gpaesano @frescof works great - thanks. I had this device lying around and was able to use the process for an alternative use. I had trouble with the WIFI configuration as it doesn't accept (not too special) characters like $ and others. Those characters are stored and loaded in ascii hex format. Finally got it working because the console output was available. Since I was not able to successfully set up the development environment because some library errors occurred during compilation, I'd like to ask for improvements in this area. It would be very kind if you would consider this in a further version. |
To be able to compile the sketchbook that gpaesano wrote, I had to modify the lwip library provided by AmebaD sdk. Anyway, look in arduino ide folder (in linux ~/.arduino15/) for a file named inet.h, should be in a folder named lwip (lwip/inet.h or in windows lwip\inet.h). At line 58, insert one line,to make it look like this:
Cheers |
Working, thank you. I've made some adaptions. Requires some testing now. I'll return with changes to contribute on completion. |
I will leave my experience here. |
hi, after a few attempts I managed to program the three files with imagetool but now I can't access the network that is created because it asks me for the password and I can't enter it, can you help me |
@AronnePi look into the .ino file, you will see:
|
Hi |
I finally found the root-cause for my wifi connection problems. I've adapted the source code for the POST data to be url-decoded and added utf-8 charset to be safe. I'd like to contribute the changes here if somebody struggles about being not able to use special characters for SSID and/or password. The change is based on the version provided by @frescof - and yet roughly tested. There is no repository to make a pull request, right? |
Hello,
First of all i would like to say thank you for your commitment and effort on this!
I recently bought Tuya Smart Gateway model GW-018 (wifi + ble + zigbee) (https://a.aliexpress.com/_EjwjehJ)
My hope is to use it as "open" zigbee Gateway bridge detaching it from Tuya Cloud.
From PCB I see the well known ZS3L plus wifi+ble on separate WBRG1.
Do you have any suggestion? Do you think something feasible?
Thanks!
Luca
The text was updated successfully, but these errors were encountered: