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

Privacy Within the Digital Ecosystem — An Interview with Pam Dixon of World Privacy Forum

READ/DOWNLOAD#? Keywords for Disability Studies FULL BOOK PDF & FULL AUDIOBOOK

{UPDATE} Super Ninja Run Hack Free Resources Generator

Angel Battles on Kiln

The practical guide to securing your online accounts on the Internet

Set Protocol Architecture: Everything You Need to Know About DPI’s Foundations

⚡️ Joke with Volt Inu ⚡️

How can your identity security be protected?

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

Attacked 40 Times and Lost Around $1.7 Million: An analysis of Paraluni’s Exploit

Fairyproof’s Review of Risks Associated with the Recently Airdropped Tokens

How to Code Anonymously, Part 2: Network Security

Serialization Mechanism in Ansible