Thursday 2 August 2018

Tinkering OpenWRT (9) : Boot Loop? Don't Connect the Power Line!

I bought a core board of AR9331 running openWRT and trying to set it up. I simply used a cp2102 TTL to USB converter trying to serial monitoring it just like other CPUs: RX->TX, TX->RX, GND->GND and 3v3->3v3.

However, the problem I'm having is that it stuck in a boot loop forever. After I see the root@UserName:/# it would start from the top all over again and keeps looping.

I actually first had this experience with linkit smart 7688. I had to power it via the USB and only uses UART pins for serial communication. And I found the following in the openWRT document:

WARNING!: Some people reported they fried their router connecting the voltage pins spite it isn't neccesary. NEVER connect voltage pins when using USB adapters unless you know what are you doing. Unless you need to power the device, you don't have to connect the voltage pins. And you usually don't need to power it this way - use the router power supply.

OK so basically, an independent power line? Fine, I could provide 3v3 to the module with an Arduino. So I did the following connection:

AR9331       CP2102       Arduino
GND            GND            --
RX               TX               --
TX               RX               --
3V3              --                 3V3

Now I plugged in the CP2102 USB to my computer and open up the serial com and then I plugged in the Arduino cable to power it on. I got it stop looping once or twice. But when I come back a few days later it still loops.

So here is my working wiring:

AR9331       CP2102       Arduino
GND            --     works now            GND
RX               TX               --
TX               RX               --
3V3              --                 3V3

Basically, power the module from Arduino and only uses the TTL converter as UART.

I plugged in the TTL converter first and the Arduino cable. It almost like powering on an router after setting up the serial com. It does no loop anymore. I can start working.

It might still showing the following:

root@UserName:/# [ 4082.090000] wlan0: authenticate with ax:4y:zf:fd:12:
[ 4082.100000] wlan0: send auth to ax:4y:zf:fd:12:34 (try 1/3)
[ 4082.110000] wlan0: authenticated
[ 4082.120000] wlan0: associate with ax:4y:zf:fd:12:34 (try 1/3)
[ 4082.140000] wlan0: RX AssocResp from ax:4y:zf:fd:12:34 (capab=0x431 status=0 aid=5)
[ 4082.150000] wlan0: associated
[ 4086.150000] wlan0: disassociated from ax:4y:zf:fd:12:34 (Reason: 2)

It just means it tried to connect to the Router (Internet) but timed out. Press enter again it will come back to console.


ref:
https://wiki.openwrt.org/doc/hardware/port.serial.cables
https://openwrt.org/docs/techref/hardware/port.serial.cables
https://openwrt.org/docs/techref/hardware/port.serial

No comments:

Post a Comment