[FX30] Cannot flash device


#1

Hello,

After making some changes to the dropbear init script, I built a new
image and flashed it on two of my FX30S.
However, it turns out I made a mistake and can’t connect over SSH anymore:

xxx@xxx:~$ ssh 192.168.2.2
ssh: connect to host 192.168.2.2 port 22: Connection refused
I tried to flash a clean image (downloaded from SIERRA’s website)
through swiflash on my first device, but it never succeeded:

xxx@xxx:~$ swiflash -m “fx30_wp85” -i ./mcu-rmfw-boot-yocto-legato_wp85.cwe
Detecting USB of the target
DONE
Communicating with the target
DONE
Switching to firmware download mode

I also tried to flash the same clean image on the other FX30S, but this
time it does not even succeed to detect my device:

xxx@xxx:~$ swiflash -m “fx30_wp85” -i ./mcu-rmfw-boot-yocto-legato_wp85.cwe
Detecting USB of the target
No device connected
However, for both of them, I can clearly see them being connected to my
computer:

xxx@xxx:~$ ls /dev/ttyUSB*
/dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2
And, for the first one, a few seconds after the “Switching to firmware
download mode” message appears, doing the same command only returns:

xxx@xxx:~$ ls /dev/ttyUSB*
/dev/ttyUSB0
I can also use minicom to interact with /dev/ttyUSB2 to type some AT
commands, like:

AT!IMAGE?
TYPE SLOT STATUS LRU FAILURES UNIQUE_ID BUILD_ID
FW 1 GOOD 1 0 0 ?? 07.11.22.00?
FW 2 EMPTY 0 0 0
FW 3 EMPTY 0 0 0
Max FW images: 3
Active FW image is at slot 1

TYPE SLOT STATUS LRU FAILURES UNIQUE_ID BUILD_ID
PRI FF GOOD 0 0 0 001.032_000 07.11.22.00_GENERIC
Max PRI images: 50
Using the factory reset button also proved to be unsuccessful, even
though the factory recovery is enabled:

AT!FWD?FACTORYRECOVERY
ENABLED

OK
Did someone run into those issues ?


#2

Hi there,
Did you make changes to dropbear locally on your device?
OR
Did you make changes within your Yocto build environment and flash the new root file system onto your device?

BR,
Chris


#3

Hi Chris,

The changes I made to the dropbear init script were made within my Yocto build environment, and I then flashed the new root file system onto my devices.

I actually know where was the mistake, fixing it and then flashing a third FX30S with the new root file system proved to be successful. However, for the two other devices, dropbear doesn’t start anymore, removing any possibility to connect to it through SSH.

This is why I’d like to flash a clean image on them, but as I explained previously, neither the factory reset button nor the swiflash utility work.

Do you have any alternative, or maybe some explanations to why the flash doesn’t work?

Best regards,

Lucas


#4

Hi Lucas,
Glad you resolved the issue with dropbear.

The reason the factory reset button doesn’t work is because this only cleans up files that exist in the overlay, whereas when you flash a new image, the files are updated in the RO image partition. I’m surprised swiflash doesn’t work though. Does swiflash fail to connect to your device?

A couple of things to try:

  1. update your swiflash from the Source. I think some of the older versions may have corner case connection issues
  2. if that doesn’t work, install the WP85 Windows drivers from the Source and plug your FX30’s into a Windows machine. Look in Device Manager and check to see what’s listed in the Ports and Modems section. If you’re seeing a DM port, then your device is able have new firmware installed. You can try using the Windows fdt2 tool or try swiflash again in Linux
  3. if you don’t have a Windows machine, in linux, do an “ls -la /dev/ttyUSB*”. If you unplug and plug in the FX30, do you see 3 or 4 ttyUSB devices?
  4. if you don’t see the DM port or the ttyUSB* devices come up, then try disassembling the FX30. You’ll need a Torx #6 and a #1 Phillips, and then follow the procedure here:
    [fx30] Bricked after AT!RMARESET=OEM (USB device not found)

BR,
Chris


#5

Hi Chris,

We tried to update swiflash before re-trying the flash procedure.
The update logs showed that it was already up-to-date.

We then tried to flash the device again, and it worked just fine.
I am not sure what caused the issue, but everything seems back to normal.

Thanks for your help,

Best Regards,
Lucas

@plu : this thread can be marked as solved