Your task in this section is to decrypt the substitution cipher encrypted ASCII string stored in the Dongle. The string has been encrypted using simple substitution.
✅ Flash the
puzzle.hex program on the Dongle. Follow the instructions from the "nRF52840 Dongle" section but flash the
puzzle.hex program instead of the
loopback.hex one -- don't forget to put the Dongle in bootloader mode before invoking
Note: If you experienced USB issues with
loopback.hexyou use the
Like in the previous sections the Dongle will listen for radio packets -- this time over channel 25 -- while also logging messages over a USB/serial interface.
✅ Open the
beginner/apps folder in VS Code; then open the
src/bin/radio-puzzle.rs file. Run the program.
❗ The Dongle responds to the DK's requests wirelessly (i.e. by sending back radio packets) as well. You'll see the dongle responses printed by the DK. This means you don't have to worry if serial-term doesn't work on your machine.
The Dongle will respond differently depending on the length of the incoming packet:
- On zero-sized packets it will respond with the encrypted string.
- On one-byte sized packets it will respond with the direct mapping from a plaintext letter (single
u8value) -- the letter contained in the packet -- to the ciphertext letter (
- On packets of any other length the Dongle will respond with the string
correctif it received the decrypted string, otherwise it will respond with the
The Dongle will always respond with packets that are valid UTF-8 so you can use
str::from_utf8 on the response packets.
See the next chapter for solving stragies and help.