banksy-git / lidl-gateway-freedom

Freeing the Silvercrest (Lidl/Tuya) Smart Home Gateway from the cloud.
https://paulbanks.org/projects/lidl-zigbee/
GNU General Public License v3.0
206 stars 66 forks source link

Need TFTP Guide #32

Open booroondook-eng opened 1 year ago

booroondook-eng commented 1 year ago

How can I do this operation (and similar operation with TFTP):

6) Finally we TFTP'd the newroot.bin file to the device and used the bootloader command FLW to write it to flash.

Give please a step-by-step manual for use TFTP to write images to device

GAS85 commented 3 months ago

I think this and this will help. But yes, documentation needs to be updated.

What I did is:

  1. install tftp on my ubuntu, e.g. sudo apt install tftp
  2. Then I need to set IP address according to my network as it is written here. I will use 192.168.0.6
  3. Now connect ethernet cable to the port and diode will turn on. If you try to ping configured IP addess, you will not see any device, but it is there.
  4. Use tftp to connect to device, change to octet mode and transfer image:
    tftp 192.168.0.6
    tftp> status
    Connected to 192.168.0.6.
    Mode: netascii Verbose: off Tracing: off
    Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
    tftp> mode binary
    tftp> status
    Connected to 192.168.0.6.
    Mode: octet Verbose: off Tracing: off
    Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
    tftp> put newroot.bin
    Sent 921602 bytes in 3.9 seconds
    tftp> quit
  5. Now back to Serial console:
    
    **TFTP Client Upload, File Name: newroot.bin
    -
    **TFTP Client Upload File Size = 000E1002 Bytes at 80500000

Success!

6. You need to write it, in my case Size was different from what was in forum so I will use it (actually it is mentioned on a [forum below](https://community.home-assistant.io/t/hacking-the-silvercrest-lidl-tuya-smart-home-gateway/270934/148)):
```shell
FLW 200000 80500000 000E1002
  1. Now you are free to reboot now!