Before doing any of these modifications, I'm not responsible for any damage or broken/bricked devices. However you will able to unbrick a device if something goes wrong with firmware upload/download.

As updating the firmware through USB is alittlebit out of the question right now, it needs signed keys to actually update the firmware the normal way using nrftool that sits inside the win32 folder in lighthouse tools within steamvr. The bootloader prevents updating the dongle if it doesn't have the correct signature. nor, clones that doesn't have UICR perfectly setup are also not able to update. Once NRFTool triggers DFU mode on the dongle, the dongle will just reset instead going into DFU mode, once in DFU mode it should enable a Serial Port connection, this is used for pushing the binary file to the device.. which doesn't do so.

Through SWD you can access the flash as many time as you want, even lock it or fully erase it. With lock you cannot access the flash memory but only clear it, so your firmware is sort of "protected" but there are ways to bypass this as this done by glitching the device. (which we dont have to do that luckily)

Creating from scratch

In this section I will be using the HolyIOT NRF52840 module, and the official Nordic Developer Dongle PCA100059. Both are working fine for being in use as Watchman Dongles, however, the HolyIOT modules needs some fine soldering, or even a PCB design (which I didnt). the PCA100059 dongle is ready to use, but also it lacks certain pins. I did some firmware modification specific for the PCA100059 to get access to those pins.

The HolyIOT module comes with no firmware, it's mainly empty, no bootloader so you need to flash the firmware through SWD, the PCA100059 has a bootloader but you might wanna get another bootloader on it that accepts UF2, or once you're on it, you could just flash the firmware directly on it instead having a bootloader.

OpenOCD & Raspberry Pi / Connecting up.

I use OpenOCD with a Raspberry Pi 4, and the Bitbanged JTAG SWD driver, to update and to debug. If you're known with Linux, then you should be fine.

Sofar I have used the command line version of RPI OS, and install OpenOCD using apt-get.

sudo apt-get install openocd

once installed, you need to create a new file and put the configuration down below in it. Call it like openocd-nrf.cfg

adapter driver bcm2835gpio

# Raspi1 peripheral_base address
# bcm2835gpio peripheral_base 0x20000000

# Raspi2 and Raspi3 peripheral_base address
# bcm2835gpio peripheral_base 0x3F000000

# Raspi4
bcm2835gpio peripheral_base 0xFE000000

# Raspi1 BCM2835: (700Mhz)
# bcm2835gpio_speed_coeffs 113714 28
# Raspi2 BCM2836 (900Mhz):
# bcm2835gpio_speed_coeffs 146203 36
# Raspi3 BCM2837 (1200Mhz):
# bcm2835gpio speed_coeffs 194938 48
# Raspi3 A/B+ BCM2837 (1400 MHz)
# bcm2835gpio_speed_coeffs 227428 56
# Raspi4 BCM2711 (1500Mhz):
 bcm2835gpio speed_coeffs 243704 60

# SWD GPIO set: swclk swdio
#bcm2835gpio swd_nums 23 22
adapter gpio swclk 23; adapter gpio swdio 22
bindto 0.0.0.0
transport select swd

set CHIPNAME nrf52840
source [find target/nrf52.cfg]

# Uncomment & lower speed to address errors
adapter speed 1000

init
targets

Select which Pi you are using, I'm using Pi4,but if you're using Pi3 just uncomment and comment out the Pi4.

Once that's done, you connect your modules like this. this exclude power circuit on the HolyIOT, in that case you should read the datasheet how to connect them up. In my case I only gave VDD_nRF 3v3, and VBUS 5V. on the PC10059 module, you can power it up through USB.

Once connected up, run a Terminal shell, and run

openocd -f openocd_nrf.cfg

where openocd_nrf.cfg is the file you just created, if anything is alright you will be prompted with:

if not, check your wirings~ From here, you open a Telnet Session to your Pi's IP address on Port 4444. It can be either on the Pi, or a PC, up to you what you find best.

You can run some commands like: help To view all available commands. Either for testing: