Emeryth / openwrt-zsun

OpenWrt 15.05 port for the ZSUN WiFi SD Card Reader
GNU General Public License v2.0
97 stars 28 forks source link

Zsun keeps rebooting when WiFi is enabled. #15

Open Cezanes opened 7 years ago

Cezanes commented 7 years ago

I've hacked two devices and they seem to present the same problem. I have updated the original firmware with the SD100-openwrt.tar.gz, and without any other intervention, when the wifi gets started (while booting) it resets the whole system. This goes over and over again, endlessly.

I have the uart being soldered and if I immediately delete the /etc/config/wireless after the console gets enabled (before allowing wifi driver to read and start the wifi) everything remains stable. If I restore the file and call "wifi", the system gets rebooted.

On one of the devices, I've replaced the flash memory with different chip from an working Carambola2 module. It presents the same problem, even with a completely new uboot and firmware. Getting mad, I've looked for HW differences, and the only relevant one that I've found was the quartz, which is 25MHz on zsun and 40MHz on Carambola2. So I've replaced the zsun quartz with an 40MHz and changed the according bootstrap pin. Tada! now it's working.

I haven't tested yet with current openwrt-zsun build, but I suspect it would work.

Does anyone encountered this issue? Does anyone know what is the relation between WiFi and the input quartz?

Emeryth commented 7 years ago

How are you powering the zsuns? A weird setup with long cables or hubs could lead to a situation where increased current draw from turning on wifi causes a reset.

Swapping flash chips is a bad idea because they contain unique radio calibration data - the ART partition. You should back it up first and copy it accordingly.

Cezanes commented 7 years ago

Thanks for the answer. I've thought about the power, but it doesn't seem to be the problem. I've inserted it into a 2A iPhone charger directly without the cable. Tried with an external professional power source. I've even added a 470uF cap. Same behavior.

Changed the Q from 25MHz to 40MHz, updated the bootstrap, everything started to work. I really don't have any explanation.