Skip to content

Commit a6dc17e

Browse files
authored
Merge pull request #2668 from arduino/karlsoderby/add-linux-note-flasher
[PXCT-1499] Add instructions for fixing qcserial issue on linux (arduino-flasher-cli)
2 parents 3b0f1c4 + 34589cd commit a6dc17e

File tree

2 files changed

+49
-13
lines changed

2 files changed

+49
-13
lines changed
3.8 MB
Loading

content/hardware/02.uno/boards/uno-q/tutorials/04.update-image/update-image.md

Lines changed: 49 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,21 @@ You should see something like:
5252

5353
This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board).
5454

55+
56+
#### Windows
57+
58+
Navigate to the unzipped folder (e.g. `arduino-flasher-cli-x.x.x-darwin-arm64`), and run the following command:
59+
60+
```
61+
arduino-flasher-cli
62+
```
63+
64+
A new window should appear, prompting you to install the driver. Install it, and run `arduino-flasher-cli` again in the terminal.
65+
66+
![Output from testing tool (Windows)](assets/windows.png)
67+
68+
This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board).
69+
5570
#### Linux
5671

5772
Navigate to the unzipped folder (e.g. `arduino-flasher-cli-x.x.x-darwin-arm64`), and run the following command:
@@ -66,19 +81,41 @@ You should see something like:
6681

6782
This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board).
6883

69-
#### Windows
84+
***Note: in some Linux systems, the `arduino-flasher-cli` could exit with an error right before flashing. This may occur if the kernel module `qcserial` is loaded. A workaround solution to fix this is in place (see section below).***
7085

71-
Navigate to the unzipped folder (e.g. `arduino-flasher-cli-x.x.x-darwin-arm64`), and run the following command:
86+
#### Fixing `qcserial` Issue (Linux Only)
87+
88+
Open a terminal, and check if `qcserial` is present by running `lsmod | grep qcse`
89+
90+
If present, it will return:
7291

7392
```
74-
arduino-flasher-cli
93+
> lsmod | grep qcse
94+
qcserial 24576 0
95+
usb_wwan 24576 1 qcserial
96+
usbserial 69632 2 qcserial,usb_wwan
7597
```
7698

77-
A new window should appear, prompting you to install the driver. Install it, and run `arduino-flasher-cli` again in the terminal.
99+
Then, check if `qcserial` is locking the serial port `ttyUSB0`, by running `sudo dmesg`:
78100

79-
![Output from testing tool (Windows)](assets/windows.png)
101+
```
102+
> sudo dmesg
103+
[31633.372270] qcserial ttyUSB0: Qualcomm USB modem converter now disconnected from ttyUSB0
104+
[31633.372308] qcserial 3-3:1.0: device disconnected
105+
```
80106

81-
This means it is working, and we can proceed to [flashing the board](#flash-image-to-the-board).
107+
This issue can be fixed by disabling (or blacklisting), the `qcserial` kernel module on the Linux system.
108+
109+
1. Create or edit a configuration file named `blacklist-modem.conf` inside the `/etc/modprobe.d/` directory:
110+
```sh
111+
sudo nano /etc/modprobe.d/blacklist-modem.conf
112+
```
113+
2. Inside this file, we need to blacklist the `qcserial` module:
114+
115+
```sh
116+
blacklist qcserial
117+
```
118+
3. Save the file and restart the system for the configuration to take effect.
82119

83120
## Preparing the Hardware
84121

@@ -89,20 +126,19 @@ To prepare the hardware for flashing, follow the instructions below:
89126

90127
![Short the two pins](assets/flash-uno-q.png)
91128

92-
3. Do **not** connect the board to the computer yet. This will need to be timed in the next step.
93-
94129
## Flash Image to the Board
95130

96131
In this step, we will upload the new image to the board using the Arduino Flasher CLI.
97132

98-
1. Open a terminal and navigate to the directory where you unzipped the Arduino Flasher CLI (normally `/Downloads`).
99-
2. Type the following command in the terminal: `./arduino-flasher-cli flash latest` **but do not press Enter yet**
100-
3. **Connect the board to the computer**, and press **Enter** to run the command **during the boot animations** on the LED matrix (immediately after plugging in). You only need the jumper to force recovery at plug-in; **you may remove it after you run the command**.
133+
1. Connect the board to your computer, using a USB-C® type cable.
134+
2. Open a terminal and navigate to the directory where you unzipped the Arduino Flasher CLI (normally `cd /Downloads`).
135+
3. Run the following command in the terminal: `./arduino-flasher-cli flash latest`.
101136
4. A download sequence will begin (the image is >1 GB). Once the download is complete, it will flash the board with the new image. **Please note:** this will take several minutes. Do **not** disconnect the USB cable during this process.
102-
5. Once flashing completes and the tool reports success, **power-cycle** the board (unplug and re-plug USB) so it boots the new OS. (Ensure the jumper is removed before the power-cycle.)
137+
5. Once flashing completes and the tool reports success, **power-cycle** the board (unplug and re-plug USB) so it boots the new OS.
103138

104-
***It is important to run the flashing command ONLY when the board is booting up; it does not work once the OS has finished booting.***
139+
The steps above are summarized in the graphic below:
105140

141+
![Flashing the UNO Q](assets/flashing-tool.gif)
106142

107143
## Troubleshooting
108144

0 commit comments

Comments
 (0)