Open robotm-team opened 2 months ago
The log is ok, the cam started properly. If you hear the welcome message, it means that the cam didn't save properly wifi credentials. Please, try to pair again the cam.
Thank you for your reply! What does "Try pairing the camera again." mean. ? Initially, right out of the box I simply inserted the sd card with yi-hack (h51ga_0.3.1) and it worked. I did not pair it with any application etc. The first boot was already done with your "firmware". Sorry, but I have no experience with such cameras. This one is my first ...
PS. Additional question: Will the camera work properly ONLY in lan network WITHOUT internet access ?
How did you set wifi credentials? Did you use configure_wifi procedure? Try again, please.
PS. Additional question: Will the camera work properly ONLY in lan network WITHOUT internet access ?
There is no final answer to this question. It depends on how internet is filtered. Other users have noticed problems using the camera behind a firewall. For example, the cam could not save mp4 records. It depends...
How did you set wifi credentials? Did you use configure_wifi procedure?
Try again, please.
That's exactly what I did. I started with point 4 in the instructions I have tried many times. I have downloaded the file from scratch, changed SD cards. I have even already created an additional wifi with a simple name and password like 123aBc890. Nothing changes: the camera starts and after a long while I hear these announcements. The camera does not connect to the wifi. I also tried resetting it with that button near the SD card slot. No results.
I think this is related to #814, I've had similar problems with this camera. For some reason it has now been working for the past few days.
What I did:
Well, I did some tests today. The results are strange to say the least ...
I tested it on the version "yi-hack-Allwinner-v2 0.3.2"
The camera after restart announces that "welcome to ..."
Then it says that it is waiting for a connection.
This suggests that the hack has not loaded (in my opinion) and the original firmware is running.
And now a strange thing:
I start the YiHome app and go through several steps until the QR code is generated.
The camera reads the code, announces that it has connected and ... yi-hack starts up.
It completely skips the "Factory.done\configure_wifi.cfg" (or "Factory\configure_wifi.cfg") entry - it doesn't retrieve the wifi network information from it.
I am completely dumbfounded. The first time , when it worked the camera "said nothing". - it booted up without any announcement etc.
And now, every reboot I have to show it the QR code with the network info.
I must be doing something wrong....
This suggests that the hack has not loaded (in my opinion) and the original firmware is running.
This is not true. The hack doesn't overwrite Yi feature and when the main Yi process detects a missing wifi configuration, it starts with the wizard.
It completely skips the "Factory.done\configure_wifi.cfg" (or "Factory\configure_wifi.cfg") entry - it doesn't retrieve the wifi network information from it.
This configure_wifi.cfg is used only the 1st time, when you install the hack. As you can see in the code, if the cam is already hacked, the script doesn't run: https://github.com/roleoroleo/yi-hack-Allwinner-v2/blob/master/sdhack/h51ga/Factory/config.sh
The weird thing is that the cam doesn't save the credentials when the wizard completes. I remember a bug in the Yi firmware but I don't remember what model. Could you check if a Yi firmware update is available?
So, finally you can try these steps:
If you want to debug the problem, make a dump of the partition:
hexdump -C -n 156 /dev/mtdblock7
You should read your ssid starting at offset 0x1c and your password at 0x5c.
Well. I made this hexdump. It's weird (or more accurately, I don't know what I'm looking at...) because it's a conglomeration of the 2 different ssid and passwords I used for configuration:
I starred some characters for principle :-) :
00000000 01 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 |................|
00000010 00 00 00 00 01 00 00 00 01 00 00 00 54 65 53 74 |............TeSt|
00000020 59 00 61 50 69 53 21 21 21 00 00 00 00 00 00 00 |Y.aPiS!!!.......|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000050 00 00 00 00 00 00 00 00 00 00 00 00 31 32 33 61 |............123a|
00000060 73 64 38 39 30 00 34 73 71 42 6d 23 47 40 00 00 |sd890.4sqBm#G@..|
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
From "configure_wifi.cfg" = Target network = wifi_ssid=NigdyNaPiS!!! wifi_psk=*****=%&M"4sqBm#G@
=Temporary network= wifi_ssid=TeStY wifi_psk=123asd890
I haven't tried anything else yet.
Is this after app pairing or after configure_wifi.sh?
I haven't done anything since yesterday. As described: I start the camera > "welcome to ..." > "waiting for connection" > I scan the code from YiHome > yi-hack works. Since yesterday, after several reboots and attempts, the camera works after executing the sequence above. And in this state (today) I read this mtdblock7.
PS. It is connected under the SSID of TeStY, I did not change it to the target because it ended badly ...
Same for me, after a while it just started working 🤷🏻 No more "waiting for connection" etc.
Ok. I had some time and played around. 1- Every time I restart the camera I have to show it the qr code with the wifi network data. even though the entry in /dev/mtdblock7 is correct. 2- What you suggested : "https://github.com/roleoroleo/yi-hack-Allwinner-v2/wiki/Change-WiFi-credentials-(deprecated)" causes the camera to get up and connect without any problem but after 10 seconds (approximately) it reboots and so on and so forth .... After deleting this entry (startup.sh) see point 1 ... 3- Camera on/off - shutdown works fine. The dome closes etc. however, when switched on, the camera does not return to its previous position (even different) and the dome does not open. 4- I cannot control the PTZ in any way via MQTT - it does not respond ...
In summary - I have NO idea what is wrong with it ....
Translated with DeepL.com (free version)
It's weird (or more accurately, I don't know what I'm looking at...) because it's a conglomeration of the 2 different ssid and passwords I used for configuration:
ssid and password are ok, the char "00" is the string terminator. So your current data are: wifi_ssid=TeStY wifi_psk=123asd890
Ok. I had some time and played around. 1- Every time I restart the camera I have to show it the qr code with the wifi network data. even though the entry in /dev/mtdblock7 is correct. 2- What you suggested : "https://github.com/roleoroleo/yi-hack-Allwinner-v2/wiki/Change-WiFi-credentials-(deprecated)" causes the camera to get up and connect without any problem but after 10 seconds (approximately) it reboots and so on and so forth .... After deleting this entry (startup.sh) see point 1 ... 3- Camera on/off - shutdown works fine. The dome closes etc. however, when switched on, the camera does not return to its previous position (even different) and the dome does not open. 4- I cannot control the PTZ in any way via MQTT - it does not respond ...
In summary - I have NO idea what is wrong with it ....
I will resume my h51ga and test it.
I tested my y51ga 9.0.21.08_202007270941 and I was able to complete the procedure. The cam was previously reset with the button.
1 - I formatted a new sd card and copied the last version of the hack (h51ga_0.3.2.tgz). 2 - I started the cam and hacked it, but the cam speaks and want to connect to my wifi network. 3 - After 2 minutes, I switched off the cam and I removed the sd card. 4 - I added the files from sdwifi.tar.gz archive and I configured configure_wifi.cfg according to my access point credentials. 5 - I restarted the cam. 6 - The cam booted and started the wifi wizard "Waiting connection" ... 7 - The cam restarted again after 1 minute. 8 - The cam connected to my ap. 9 - I logged in with putty and I removed startup.sh and configure_wifi.* from /tmp/sd/yi-hack
I tried to reboot the cam 3-4 times and it works correctly.
What's your Yi fw version? I recommend you check your power supply: adapter and cable.
EDIT If the hack was never applied you can follow step 4 from the install procedure (https://github.com/roleoroleo/yi-hack-Allwinner-v2/?tab=readme-ov-file#install-procedure) instead of sdwifi.tar.gz.
EDIT 2 There is a new sdwifi.tar.gz, try it please.
I uploaded the hack two days ago and it worked without any problem. Today I tried to connect it to the HomeAssistant server as rtsp (with the WebRTC plugin) but unfortunately it didn't work. I enabled the onvif server in the camera and after restarting the camera no longer wants to upload the yi-hack. It behaves as if there is no sd card. During the reboot you hear the announcement : "welcome to ..." and then "waiting for connection" and nothing further happens. I tried this solution : https://github.com/roleoroleo/yi-hack-Allwinner-v2/issues/821 but it doesn't do anything. Below is the log from the card (I set DEBUG_LOG=yes) so you can see that there is an attempt to boot, but why unsuccessful?