Upload files to "/"
This commit is contained in:
263
Nordic_PPK2_Ubuntu_Install_Manual_blog.md
Normal file
263
Nordic_PPK2_Ubuntu_Install_Manual_blog.md
Normal file
@ -0,0 +1,263 @@
|
||||
## Nordic Power Profiler Kit II on Ubuntu, Install Note for Local Setup
|
||||
|
||||
**Last verified download versions, April 2026:**
|
||||
|
||||
- `nrfutil 8.1.1 (b6089d0 2025-08-21)`
|
||||
- `nrfconnect-5.2.1-x86_64.AppImage`
|
||||
- `JLink_Linux_V876_x86_64`
|
||||
|
||||
---
|
||||
|
||||
### Scope
|
||||
|
||||
- SEGGER J-Link installation
|
||||
- `nrfutil` installation
|
||||
- manual `udev` rule setup for Nordic USB devices
|
||||
- `nRF Connect for Desktop` AppImage setup
|
||||
- `.desktop` launcher setup
|
||||
- `Power Profiler` app usage with **PPK2**
|
||||
|
||||
### Working result
|
||||
|
||||
- `JLink_Linux_V876_x86_64.deb` installed
|
||||
- `nrfutil 8.1.1` downloaded manually, made executable, moved to `/usr/bin`
|
||||
- Nordic `udev` rules created manually
|
||||
- `nrfconnect-5.2.1-x86_64.AppImage` runs as normal user on this system with `--no-sandbox`
|
||||
- PPK2 detected and usable
|
||||
|
||||
---
|
||||
|
||||
### 1. Required files
|
||||
|
||||
| File | Downloaded by |
|
||||
|------|---------------|
|
||||
| `JLink_Linux_V876_x86_64.deb` | Admin |
|
||||
| `nrfutil` binary | Admin |
|
||||
| `nrfconnect-5.2.1-x86_64.AppImage` | User |
|
||||
|
||||
---
|
||||
|
||||
### 2. Official download pages
|
||||
|
||||
| Tool | URL |
|
||||
|------|-----|
|
||||
| SEGGER J-Link (64-bit DEB) | `https://www.segger.com/downloads/jlink/` |
|
||||
| nRF Connect for Desktop | `https://www.nordicsemi.com/Products/Development-tools/nRF-Connect-for-Desktop/Download` |
|
||||
| nRF Util | `https://docs.nordicsemi.com/bundle/nrfutil/page/guides/installing.html` |
|
||||
|
||||
---
|
||||
|
||||
### 3. Admin steps
|
||||
|
||||
#### 3.1 Install J-Link
|
||||
|
||||
```bash
|
||||
cd ~/Downloads
|
||||
sudo dpkg -i JLink_Linux_V876_x86_64.deb
|
||||
```
|
||||
|
||||
#### 3.2 Install `nrfutil`
|
||||
|
||||
```bash
|
||||
cd ~/Downloads
|
||||
chmod +x nrfutil
|
||||
sudo mv nrfutil /usr/bin/
|
||||
nrfutil --version
|
||||
```
|
||||
|
||||
Expected output (versions may differ):
|
||||
|
||||
```text
|
||||
nrfutil 8.1.1 (b6089d0 2025-08-21)
|
||||
commit-hash: b6089d08a9cfdb292f8ab8d21e0908ded814cd11
|
||||
commit-date: 2025-08-21
|
||||
host: x86_64-unknown-linux-gnu
|
||||
build-timestamp: 2025-08-22T09:15:23.120304773Z
|
||||
classification: nrf-external
|
||||
```
|
||||
|
||||
#### 3.3 Create Nordic `udev` rules
|
||||
|
||||
**Main Nordic USB rule**
|
||||
|
||||
```bash
|
||||
sudo tee /etc/udev/rules.d/71-nrf.rules >/dev/null <<'EOF_RULE1'
|
||||
ACTION!="add", GOTO="nrf_rules_end"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", MODE="0666"
|
||||
KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1915", MODE="0666", ENV{NRF_CDC_ACM}="1"
|
||||
LABEL="nrf_rules_end"
|
||||
EOF_RULE1
|
||||
```
|
||||
|
||||
**Security note:** `MODE="0666"` grants read/write to all users on the system. This is acceptable for a single-user lab machine. On shared systems, consider `GROUP="plugdev"` + `MODE="0664"` and adding your user to the `plugdev` group instead.
|
||||
|
||||
**ModemManager blacklist rule**
|
||||
|
||||
```bash
|
||||
sudo tee /etc/udev/rules.d/99-mm-nrf-blacklist.rules >/dev/null <<'EOF_RULE2'
|
||||
ENV{NRF_CDC_ACM}=="1", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
EOF_RULE2
|
||||
```
|
||||
|
||||
**Reload and trigger**
|
||||
|
||||
```bash
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --subsystem-match=usb --action=add
|
||||
sudo udevadm trigger --subsystem-match=tty --action=add
|
||||
```
|
||||
|
||||
Now unplug and replug the PPK2.
|
||||
|
||||
#### 3.4 Verify USB detection
|
||||
|
||||
```bash
|
||||
lsusb | grep -i nordic
|
||||
```
|
||||
|
||||
Expected output:
|
||||
|
||||
```text
|
||||
Bus xxx Device xxx: ID 1915:c00a Nordic Semiconductor ASA PPK2
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
### 4. (local) User steps
|
||||
|
||||
#### 4.1 Prepare the AppImage
|
||||
|
||||
```bash
|
||||
mkdir -p "$HOME/Desktop/AppImage"
|
||||
cd "$HOME/Desktop/AppImage"
|
||||
chmod +x nrfconnect-5.2.1-x86_64.AppImage
|
||||
```
|
||||
|
||||
#### 4.2 Install shell completion for `nrfutil` (optional)
|
||||
|
||||
For `nrfutil` v7+, the correct command is:
|
||||
|
||||
```bash
|
||||
nrfutil completion install bash
|
||||
```
|
||||
|
||||
#### 4.3 Start nRF Connect for Desktop
|
||||
|
||||
```bash
|
||||
cd "$HOME/Desktop/AppImage"
|
||||
./nrfconnect-5.2.1-x86_64.AppImage --no-sandbox
|
||||
```
|
||||
|
||||
Equivalent absolute-path form:
|
||||
|
||||
```bash
|
||||
"$HOME/Desktop/AppImage/nrfconnect-5.2.1-x86_64.AppImage" --no-sandbox
|
||||
```
|
||||
|
||||
#### 4.4 Create `.desktop` launcher
|
||||
|
||||
Create the launcher file:
|
||||
|
||||
```bash
|
||||
mkdir -p "$HOME/.local/share/applications"
|
||||
|
||||
cat > "$HOME/.local/share/applications/nrf-connect.desktop" <<'EOF_DESKTOP'
|
||||
[Desktop Entry]
|
||||
Version=1.0
|
||||
Type=Application
|
||||
Name=nRF Connect for Desktop
|
||||
Comment=Nordic Semiconductor nRF Connect for Desktop
|
||||
Path=$HOME/Desktop/AppImage
|
||||
Exec=/bin/bash -lc '"$HOME/Desktop/AppImage/nrfconnect-5.2.1-x86_64.AppImage" --no-sandbox'
|
||||
Icon=$HOME/path/to/icons/nRF-Connect_desktop.png
|
||||
Terminal=false
|
||||
Categories=Development;Electronics;
|
||||
StartupNotify=true
|
||||
EOF_DESKTOP
|
||||
|
||||
chmod +x "$HOME/.local/share/applications/nrf-connect.desktop"
|
||||
```
|
||||
|
||||
Then adjust the `Icon=` line to your own icon path.
|
||||
|
||||
Optional: place a symlink on the desktop so the launcher is easy to back up and keep in one place:
|
||||
|
||||
```bash
|
||||
ln -sf "$HOME/.local/share/applications/nrf-connect.desktop" "$HOME/Desktop/nRF-Connect.desktop"
|
||||
```
|
||||
|
||||
> **Note:** The `Exec=` line uses `/bin/bash -lc` so `$HOME` expands correctly when the launcher starts from the desktop environment.
|
||||
|
||||
---
|
||||
|
||||
### 5. Inside nRF Connect for Desktop
|
||||
|
||||
1. Install the **Power Profiler** app.
|
||||
2. Connect the **PPK2**.
|
||||
3. Select the device.
|
||||
4. Confirm it stays selected and does not drop with `No device setup found`.
|
||||
|
||||
---
|
||||
|
||||
### 6. Typical failure I run into and fix
|
||||
|
||||
**Symptom:**
|
||||
|
||||
```text
|
||||
No device setup found
|
||||
```
|
||||
|
||||
**Cause:** Missing or incomplete Nordic `udev` rules.
|
||||
|
||||
**Fix:**
|
||||
1. Create the two rule files from section 3.3.
|
||||
2. Reload udev.
|
||||
3. Unplug and replug the PPK2.
|
||||
4. Restart `nRF Connect for Desktop`.
|
||||
|
||||
---
|
||||
|
||||
### 7. Command Summary
|
||||
|
||||
#### Admin
|
||||
|
||||
```bash
|
||||
# J-Link
|
||||
cd ~/Downloads
|
||||
sudo dpkg -i JLink_Linux_V876_x86_64.deb
|
||||
|
||||
# nrfutil
|
||||
chmod +x nrfutil
|
||||
sudo mv nrfutil /usr/bin/
|
||||
nrfutil --version
|
||||
|
||||
# udev rules
|
||||
sudo tee /etc/udev/rules.d/71-nrf.rules >/dev/null <<'EOF_RULE1'
|
||||
ACTION!="add", GOTO="nrf_rules_end"
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="1915", MODE="0666"
|
||||
KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", ATTRS{idVendor}=="1915", MODE="0666", ENV{NRF_CDC_ACM}="1"
|
||||
LABEL="nrf_rules_end"
|
||||
EOF_RULE1
|
||||
|
||||
sudo tee /etc/udev/rules.d/99-mm-nrf-blacklist.rules >/dev/null <<'EOF_RULE2'
|
||||
ENV{NRF_CDC_ACM}=="1", ENV{ID_MM_CANDIDATE}="0", ENV{ID_MM_DEVICE_IGNORE}="1"
|
||||
EOF_RULE2
|
||||
|
||||
sudo udevadm control --reload-rules
|
||||
sudo udevadm trigger --subsystem-match=usb --action=add
|
||||
sudo udevadm trigger --subsystem-match=tty --action=add
|
||||
|
||||
lsusb | grep -i nordic
|
||||
```
|
||||
|
||||
#### User
|
||||
|
||||
```bash
|
||||
mkdir -p "$HOME/Desktop/AppImage"
|
||||
cd "$HOME/Desktop/AppImage"
|
||||
chmod +x nrfconnect-5.2.1-x86_64.AppImage
|
||||
|
||||
nrfutil completion install bash
|
||||
|
||||
./nrfconnect-5.2.1-x86_64.AppImage --no-sandbox
|
||||
```
|
||||
Reference in New Issue
Block a user