Bluetooth WarDriving with the nRF52

  • nRF52DK, I’m using PCA10040
  • Unix system or WSL

Project Requirements

  1. The device can scan for nearby Bluetooth devices.
  2. The device can timestamp the data.
  3. The device can keep the addresses in non-volatile memory
  4. The device is battery-powered and lasts for days.

Building / Flashing Blinky

$ cd ~/zephyrproject/zephyr/
$ west update
$ ls boards/arm | grep nrf52dk
$ cd samples/basic/blinky
$ west build -b nrf52dk_nrf52832
$ west flash

Device Tree

$ cd ~/zephyrproject/zephyr/ # Move back to the project root
$ find . -name nrf52dk_nrf52832.dts
./boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts

Config Files

Loaded configuration '(path)/nrf52dk_nrf52832_defconfig'
west build -t menuconfig
menuconfig

Bluetooth Central

$ cd ~/zephyrproject/zephyr/samples/bluetooth/central_hr
$ west build -b nrf52dk_nrf52832
$ west flash
$ screen /dev/ttyACM0 115200 # Or whatever ACM you are
# Now reset the board, you should see something like this \/

SD Card

Arduino SD card interface
cd ~/zephyrproject/zephyr/samples/subsys/fs/fat_fs

Device Tree Overlays and Configs

/*
* Copyright (c) 2019 Tavish Naruka <tavishnaruka@gmail.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
&spi1 {
status = "okay";
cs-gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
sdhc0: sdhc@0 {
compatible = "zephyr,mmc-spi-slot";
reg = <0>;
status = "okay";
label = "SDHC0";
spi-max-frequency = <24000000>;
};
};
CONFIG_DISK_DRIVER_SDMMC=y
CONFIG_SPI=y
cd boards
cp nrf52840_blip.overlay nrf52dk_nrf52832.overlay
cp nrf52840_blip.conf nrf52dk_nrf52832.conf
cd ..
west build -b nrf52dk_nrf52832
spi1: spi@40004000 {
#address-cells = < 0x1 >;
#size-cells = < 0x0 >;
reg = < 0x40004000 0x1000 >;
interrupts = < 0x4 0x1 >;
status = "okay";
label = "SPI_1";
compatible = "nordic,nrf-spi";
sck-pin = < 0x1f >;
mosi-pin = < 0x1e >;
miso-pin = < 0x1d >;
cs-gpios = < &gpio0 0x11 0x1 >;
sdhc0: sdhc@0 {
compatible = "zephyr,mmc-spi-slot";
reg = < 0x0 >;
status = "okay";
label = "SDHC0";
spi-max-frequency = < 0x16e3600 >;
};
};

New Project

$ west init -m https://github.com/zephyrproject-rtos/example-application --mr main my-workspace
$ cd my-workspace
$ west update
$ cd example-project
$ west build

One Small Hiccup

The Drop

Just in case someone thought it was a bomb.

The Retrieval

Moving Forward

θ Unknown

--

--

--

Building things.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

DealerBuilt: New FTC security standard (2019 version)

Pentonium Joins Forces With Hypersign

Troubleshooting SSL/TLS setup with Zowe Certificate Analyser

{UPDATE} Eric's Klondike Solitaire Lite Hack Free Resources Generator

How I learned to stop worrying and love HIPAA: part 3

{UPDATE} Plug & Play Hack Free Resources Generator

My three verified accounts

The SolarWinds exploit demonstrates unacceptable weaknesses of the Cybersecurity profession.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ryan Walker

Ryan Walker

Building things.

More from Medium

BrakRPi. Demonstrating Braktooth attack on Raspberry Pi 4

How to use the Marketplace on Unreal Engine 4.27.1 for Linux

OpenWrt on Raspberry Pi 3b

Bring Your Home Network Anywhere For Free — Home VPN with WireGuard on Raspberry Pi + Pi-hole…