Closed Aleksey-Ivanov closed 2 years ago
@Aleksey-Ivanov which version of the firmware are you using?
2.2.1_0001.0515 This is version firmware from the app aqara home
@mcchas What do you think about this issue?
Have you tried the most recent script?
To enable RTSP, the hexdump/sed command just replaces the string 'miio_task' with 'rtsp_task' in a specific location in the camera file. Unfortunately when xiaomi makes updates to their firmware these bytes all shift either up or down slightly and that can break the hexdump/sed command - as it can't find the right 'miio_task' to replace. If you have tried the most recent hostname script and it doesn't work I can help work through updating the script
Yes, I've tried using the hostname of the latest version. It will be great if you have a chance to help me. As I understand correctly, after this enabling RTSP, I shouldn't update via aqara home, right?
Could you help me, with this issue?
If you can share your camera binary file I can update the sed command
Sure, can you explain how I to get this binary file?
You could use static compiled binaries for arm7 (https://github.com/therealsaumil/static-arm-bins) but a sure fire way would be to use an SD card to copy the file /local/app.tar.zx to /sdcard.
Insert the card and telnet to the camera.
Run the command:
cp /local/app.tar.xz /sdcard/
Eject the card and upload the file here.
I've downloaded this file. https://drive.google.com/file/d/1zhSRIXfWrbGkpdTHLg56LB5Tb5U_n0Fu/view
Thanks @Aleksey-Ivanov. Looks like this version is already supported.
$ hexdump -vC camera |grep '0031eb40' | sed 's/00 00 00 6d 69 69 6f 5f 74 61 73/00 00 00 72 74 73 70 5f 74 61 73/'
0031eb40 5f 74 61 73 6b 00 00 00 72 74 73 70 5f 74 61 73 |_task...miio_tas|
Check if the service is listening on port 554?
# netstat -lna |grep 554
tcp 0 0 0.0.0.0:554 0.0.0.0:* LISTEN
Can you check if your /etc/tar_app.sh has been updated to patch the camera binary?
# cat /etc/tar_app.sh |grep rtsp
# replace annoying logging call with nop and ignore miio service and start rtsp server```
Thanks @Aleksey-Ivanov. Looks like this version is already supported.
$ hexdump -vC camera |grep '0031eb40' | sed 's/00 00 00 6d 69 69 6f 5f 74 61 73/00 00 00 72 74 73 70 5f 74 61 73/' 0031eb40 5f 74 61 73 6b 00 00 00 72 74 73 70 5f 74 61 73 |_task...miio_tas|
Check if the service is listening on port 554?
# netstat -lna |grep 554 tcp 0 0 0.0.0.0:554 0.0.0.0:* LISTEN
Can you check if your /etc/tar_app.sh has been updated to patch the camera binary?
# cat /etc/tar_app.sh |grep rtsp # replace annoying logging call with nop and ignore miio service and start rtsp server```
I guess the port 554 is not listen.
Can you check if your /etc/tar_app.sh has been updated to patch the camera binary?
What do you mean?
@Aleksey-Ivanov It looks the file was not updated to patch the camera binary. Make sure the file /etc/tar_app.sh_save
has been deleted and then run the hostname
script again
I've deleted this file and run hostname again. The result is
Not sure what has happened here, only the tar_app.sh_save should be deleted. Either way you can copy the contents for tar_app.sh from the relevant section (between the EOF tags) of the hostname script. Copy that out into /etc/tar_app.sh and reboot. But that shouldn't be necessary as running the hostname script should create this file... do you get any errors when you run this script?
Hi, Guys! Did it work?
@mcchas I've been updated /etc/tar_app.sh and reboot. But i can't find 554 port.
Where I can find log file?
@mcchas How I can do full factory reset for G2H? I pressed and hold the button near 10 seconds. But it is not work.
@Aleksey-Ivanov it should reset if you follow the manufacturers instructions- from memory it will sound a spoken acknowledgment of 'device reset' or similar, possibly in Chinese.
Other than that another user in these issues was able to reset theirs by restoring some files to undo the changes the script makes. It's a unique issue you have, and the script is not 100% plug and play, but it sounds like you need some Linux assistance to debug the running of this script, unless your camera has some strange firmware version- but that seems unlikely. The script simply patches the binary that runs the camera software, if that happened successfully RTSP should start.
@mcchas Thanks for your time and your helps! @agrigoriev I've gone it!) I had to reset and re-executed the system with your hostname file.
@mcchas Maybe you know how I can get the stream video from G2H via rtsp in the VLC player?
@Aleksey-Ivanov that's great! You can use rtsp://<ipaddress/14 in VLC, other paths with other numbers are also available for different resolutions (check the readme).
@Aleksey-Ivanov I have the same firmware version camera. How did you get wifi working once you reset? Did you use aqara app or homekit or miio app? I tried resetting again and still doesn't work with a FAT32 formatted 64GB card. My camera doesn't connect to homekit or to aqara app. RTSP also not working.
Hi @mcchas ! Could you help me? I have downloaded your file 'hostname' on sdcard in G2H. After that I opened terminal and executed the command 'netstat -anl'. But I can't see any process is listening on port 554. What am I doing wrong?