This experimental section will provide details on how to run a BLE example on the Jumper Virtual Lab. The demo includes: a virtual nRF52 BLE peripheral, a python based linux central, scanning, connection and reading characteristics.
How to run
As this feature is still in beta stages (it can only work on Ubuntu 16.04), the only option to try it out is using our preconfigured VirtualBox located here. It's a big download, but worth the wait. We recommend using this image.
Image username/password: jumper/jumper
Once it's ready and loaded into VirtualBox:
- Open the provided Ubuntu image.
- Open a terminal (using the application icon on the left)
- Open 2 more terminals on the same location.
- We'll refer to the 3 terminals as Terminal 1 -, Terminal 2 - and Terminal 3 -.
- on Terminal 1 -, start the virtual HCI device (BLE dongle):
sudo jumper ble
- on Terminal 2 -, start the BLE gateway program:
sudo python examples/ble_peripheral/ble_app_hrs/ble_gateway.py
- on Terminal 3 - Start the virtual nRF52 device with the ble_app_hrs (taken from Nordic's nRF SDK) example:
cd examples/ble_peripheral/ble_app_hrs/jumper/ jumper run --fw ../pca10040/s132/armgcc/_build/nrf_and_softdevice.bin -u --platform nrf52832
That's it. If you see the following output on Terminal 2 -, it means that it's working.
Scanning for devices Found device: F6:39:AF:A3:A0:87 connecting to: F6:39:AF:A3:A0:87 Connected Battery level: 100 Heart rate level: 3 Battery level: 97 ... ... ...
The central will continuesly sample the battery level of the peripheral. Checkout the code on
~/jumper-nrf52-ble-example/examples/ble_peripheral/ble_app_hrs/ble_gateway.py to understand how the central works. It's a simple Python gateway code that can used in any Bluetooth enabled Linux machine.
Note: you also have an option to use our BLE example repo and setup this sample into your Ubuntu machine).
Contect us at email@example.com for more informtation.