Skip to main content

How to flash Seeed Wio-WM1110 Dev Kit with Meshtastic

The Seeed Wio-WM1110 Dev Kit is an nRF52840-based LoRa® transceiver with built-in GPS, Temperature/Humidity sensor and supports solar and battery power.

Unfortunately, unlike many Meshtastic devices, this board cannot be flashed using USB. Instead, you require an external device that can connect via SWDIO.

Luckily, if you have a Raspberry Pi around this is surprisingly straightforward.

1. Set up Wiring

Connect GPIO pin 11 on your Raspbery Pi to the CLK pin on the Wio-WM1110.
Connect GPIO pin 8 on your Raspbery Pi to the DIO pin on the Wio-WM1110.

Ensure you get the GPIO numbers correct.

Plug in your Raspberry Pi to USB power.
Plug in the Wio-WM1110 to USB for power.

2. Install OpenOCD

OpenOCD is the program we'll use for communicating with the Wio-WM1110. Install it on your Raspberry Pi.

$ sudo apt update
$ sudo apt install libtool autoconf automake texinfo telnet gdb-multiarch git
$ git clone git://repo.or.cz/openocd.git
$ cd openocd/
$ ./bootstrap
$ ./configure --enable-bcm2835gpio
$ make -j4
$ sudo make install

3. Check connection

Let's try connecting to the Wio-WM1110 before we do anything with firmware. All the configuration you need is in the openocd repository.

$ openocd -f ./openocd/tcl/interface/raspberrypi-native.cfg -c "transport select swd" -f openocd/tcl/target/nrf52.cfg -s tcl

The first flag selects the Raspberry Pi as your host machine, the transport is SWDIO, and the last flag says you are connecting to a nRF52840. You should see something like this:

Open On-Chip Debugger 0.12.0+dev-00633-gad87fbd1c
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
swd
Info : Listening on port 6666 for tcl connections
Info : Listening on port 4444 for telnet connections
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : clock speed 100 kHz
Info : SWD DPIDR 0x2ba01477
Info : [nrf52.cpu] Cortex-M4 r0p1 processor detected
Info : [nrf52.cpu] target has 6 breakpoints, 4 watchpoints
Info : [nrf52.cpu] Examination succeed
Info : [nrf52.cpu] starting gdb server on 3333
Info : Listening on port 3333 for gdb connections
Info : accepting 'telnet' connection on tcp/4444
 
If you see “Error connecting DP: cannot read IDR”, then you've probably connected the wires to the wrong place.
 

4. Obtaining Firmware

For now, I recommend you download firmware.uf2 from this post on the Meshtastic forum.
 
You can also try my experimental firmware (2024-07-02) that fixes the temperature sensor and enables USB serial debug logging.
 
 

Otherwise, you would need to build the firmware yourself, download s140_nrf52_7.3.0_softdevice.hex, and merge the two using mergehex.
 

5. Flashing Firmware

Once you have openocd running, you can connect to your Wio-WM1110 using telnet. Flashing is as simple as running a few commands inside the telnet session:

$ telnet 127.0.0.1 4444
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
Open On-Chip Debugger
> init
> reset init
[nrf52.cpu] halted due to undefined, current mode: Thread
xPSR: 0x61000000 pc: 0x00025fde msp: 0x200013c0
> halt
> nrf5 mass_erase
nRF52840-QI/CAAA(build code: D0) 1024kB Flash, 256kB RAM
Mass erase completed.
> program new2.uf2 verify
[nrf52.cpu] halted due to undefined, current mode: Thread
xPSR: 0x61000000 pc: 0x00025fde msp: 0x200013c0
** Programming Started **
Padding image section 0 at 0x00000b00 with 1280 bytes
Padding image section 1 at 0x00026498 with 2920 bytes
Adding extra erase range, 0x000c9eac .. 0x000c9fff
** Programming Finished **
** Verify Started **
** Verified OK **
>
> reset
[nrf52.cpu] halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x2000002e msp: 0x200013c0
> exit 0
 
You probably need to unplug the power and plug it back in after flashing.

6. Connecting

Congratulations, you should now be able to connect to your Wio-WM1110 through Bluetooth in the Meshtastic app. Since there's no screen on this device, the default PIN number is probably 123456 :) Enjoy!

Credits

Many thanks to Peter Pan from Seeed, and misaz from the Element14 community for their tutorials, and Mark Birss from Meshtastic for the assistance.


Comments

Popular posts from this blog

How to transfer money from Taiwan without going to the bank

We live in a digital age. The Taiwanese banking system ... a little less so. Transferring money overseas typically involves a visit to the bank between 9am and 3pm. You'll queue, fill out an outbound remittance form in duplicate, stamp and sign some things and just generally wait while staff do their best with the unfamiliar procedure. There is another way.* * for transfers < 500,000 TWD, to accounts you've previously set up in a special way :(  Background: Remittance Classifications One of the reasons for the myriad of complicated forms when dealing with foreign exchange in Taiwan is the precise codification of transfer types required by the Central Bank. Your knowledge of the existence of these two documents will boost your standing above that of the average banker: 匯出匯款之分類及說明  Code and Description of Outward Remittance Classification 匯入匯款之分類及說明 Code and Description of Inward Remittance Classification These are updated every few years, with new versions fou

How to play Monster Hunter: World on Linux

The release of Monster Hunter: World on PC has broken records. Powered by the unfamiliar MT Engine, Linux users were worried that they might miss out on the experience. Luckily, some got it working on day 1 (hat tip Vahron and all the users on the reddit thread). Here's a way to get it working :) Upgrade to Ubuntu 18.04 Bionic Beaver. The previous release, 17.10 Artful Aardvark didn't work for me. Install lutris . Lutris is a launcher for games on Linux. There are so many different wine versions and configuration options. Lutris manages them all for you and has installers with 'known good' configurations. Open lutris and install the 'Wine Steam' runner. (Lutris -> Manage Runners -> Wine Steam -> Install). This will let Lutris run games via a wine-installed version of steam Manage the wine version of lutris to install esync-3.13 . (Lutris-> Manage Runners -> Wine -> Manager versions -> Tick esync 3.13). This will make the latest high