# Swiflash issue

**URL:** <https://forum.sierrawireless.com/t/swiflash-issue/29544>\
**Category:** Uncategorized\
**Created:** [April 17, 2023, 7:46am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544 "2023-04-17T07:46:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![alban.fricot](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alban.fricot](https://forum.sierrawireless.com/u/alban.fricot)\
**Post date:** [April 17, 2023, 7:46am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/1 "2023-04-17T07:46:03Z")

</div>

Hi,

I’m trying to flash a device with “swiflash” tool.

For constraints related to my need, I have to use swiflash with the “-p” option to specify a port.

This method works well unless the fx30 has not been flashed before.

Let me explain. If I execute this command :  
`"swiflash -p /dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.3-port0 -m wp77xx -i mySPK.spk",` I get this error message:  
`"Detecting USB of the target. No device connected"`

On the other hand, if I first do :

`"swiflash -m wp77xx -i mySPK.spk",` it works and then the first command: `"swiflash -p /dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.3-port0 -m wp77xx -i mySPK.spk"` also works.

Do you have any idea about this?

Regards,  
Alban

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [April 17, 2023, 7:50am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/2 "2023-04-17T07:50:47Z")

</div>

how about you first do AT!BOOTHOLD to the fresh module?

---

<div class="post-metadata">

**Author:** ![alban.fricot](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alban.fricot](https://forum.sierrawireless.com/u/alban.fricot)\
**Post date:** [April 17, 2023, 7:55am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/3 "2023-04-17T07:55:04Z")

</div>

HI,

This is the result of the command:

```auto
root@fx30s:~# microcom /dev/ttyAT 
AT!BOOTHOLD
OK

```

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [April 17, 2023, 8:00am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/4 "2023-04-17T08:00:11Z")

</div>

the it will reboot as download mode (only one DM port is enumerated)  
can you do “swiflash -p /dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.3-port0 -m wp77xx -i mySPK.spk”?

---

<div class="post-metadata">

**Author:** ![alban.fricot](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alban.fricot](https://forum.sierrawireless.com/u/alban.fricot)\
**Post date:** [April 17, 2023, 8:13am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/5 "2023-04-17T08:13:25Z")

</div>

Yes it true :

```auto
ls /dev/serial/by-path/
pci-0000:00:14.0-usb-0:1:1.0-port0

```

But when I tried to execute the command, I have the following result :

```auto
swiflash -p /dev/serial/by-path/pci-0000\:00\:14.0-usb-0\:1\:1.0-port0 -m wp77xx -i mySPK.spk
Detecting USB of the target
No device connected

```

---

<div class="post-metadata">

**Author:** ![alban.fricot](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alban.fricot](https://forum.sierrawireless.com/u/alban.fricot)\
**Post date:** [April 17, 2023, 8:16am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/6 "2023-04-17T08:16:31Z")

</div>

But If a begin with this process :

`swiflash -i mySPK.spk -m wp77xx`, it will works

And then,` swiflash -p /dev/serial/by-path/pci-0000\:00\:14.0-usb-0\:1\:1.0-port0 -m wp77xx -i mySPK.spk`  
will works too

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [April 17, 2023, 8:17am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/7 "2023-04-17T08:17:16Z")

</div>

so it only happens once for fresh module?

---

<div class="post-metadata">

**Author:** ![alban.fricot](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alban.fricot](https://forum.sierrawireless.com/u/alban.fricot)\
**Post date:** [April 17, 2023, 8:25am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/8 "2023-04-17T08:25:00Z")

</div>

Yes only for fresh module.

Maybe there is something in configuration that block the process when trying to flash with port option

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [April 17, 2023, 8:26am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/9 "2023-04-17T08:26:23Z")

</div>

no problem is found on used module:

```auto

owner@ubuntu:~$ swiflash -p /dev/serial/by-path/pci-0000\:03\:00.0-usb-0\:2.1\:1.0-port0 -m wp76xx -i /home/owner/leaf/leaf-data/wp76/wp76-image/modem/9999999_9907152_SWI9X07Y_02.37.03.00_00_GENERIC_002.095_000.spk 
Detecting USB of the target
DONE
Communicating with the target
DONE
Switching to firmware download mode
..............DONE
Downloading the firmware
..........DONE
Rebooting the module
..........DONE
Firmware Download SUCCESS

```

Maybe you did with AT!BOOTHOLD, after module reboots, check whether if there is a really port called “/dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.0-port0”

---

<div class="post-metadata">

**Author:** ![alban.fricot](https://avatars.discourse-cdn.com/v4/letter/a/e47c2d/32.png) [@alban.fricot](https://forum.sierrawireless.com/u/alban.fricot)\
**Post date:** [April 17, 2023, 8:32am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/10 "2023-04-17T08:32:00Z")

</div>

After reboot, I have just this port available : `/dev/serial/by-path/pci-0000\:00\:14.0-usb-0\:1\:1.0-port0`

But the command is not working :

```auto
swiflash -p /dev/serial/by-path/pci-0000\:00\:14.0-usb-0\:1\:1.0-port0 -m wp77xx -i mySPK.spk
Detecting USB of the target
No device connected

```

If I put a fresh module, then I execute the command without port option like : `swiflash - m wp77xx -i mySPK.spk`

and then, if I try with the port option again, it works, but not the first time

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [April 17, 2023, 8:45am UTC](https://forum.sierrawireless.com/t/swiflash-issue/29544/11 "2023-04-17T08:45:45Z")

</div>

then which part of your mySPK.spk is correcting the situation?  
Modem?  
legato?  
yocto?  
bootloader?

You can take 4 fresh modules to verify this
