Bluetooth Application

BLE Application Software for the Velo Bling-Bling Project

LED lights for bicycle wheels. 16 multi color LEDs on both sides (PCB top- and bottom side). There are two windows (upper and lower) on both sides for display dynamic information like speed, trip time, trip distance, etc. or static information like strings and images. The windows have a resolution of 100 x 16 pixels. The space between the windows can be filled with a pattern/image (AKA blingbling).

This application software runs on the BL600 Module (BLE slave) and communicates over the UART and I2C interface with the main MCU (MK22DX256VLF5).

BLE Master (e.g. Smart Phone) <-> BLE Slave BL600 UART & I2C <-> main MCU

The BLE Master can use the propriarity vSP Bridge Mode to communicate over the UART with the main MCU like a serial terminal (Command Line Interface CLI). The Cycling Speed and Cadence Service (CSC) is a standard Bluetooth service, data are exchanged between main MCU and BL600 by I2C.

The USB CDC on the main MCU can be used as a terminal interface for the BL600 module. You can use the UwTerminalX for communicating and downloading applications onto Laird's BL600 module.

Copyright

Peter Schmid, Zurich, Switzerland, peter@spyr.ch

This file is part of "Velo Bling-Bling" BLE application software.

"Velo Bling-Bling" software is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

"Velo Bling-Bling" is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with "Velo Bling-Bling". If not, see http://www.gnu.org/licenses/.

Tools

UwTerminalX

UwTerminalX is a cross-platform utility for communicating and downloading applications onto Laird's range of wireless modules, and uses Qt 5. UwTerminalX has been tested on Windows, Mac, Arch Linux and Ubuntu Linux.

More infos and download, see UwTerminalX.

Bluetooth Low Energy (BLE) Development Kit DVK-BL600

The Laird BLE development kit provides a platform for rapid wireless connectivity prototyping, providing multiple options for the development of Bluetooth Low Energy (BLE) applications.

You can use the Velo Bling-Bling hardware in similar way to develop an download BLE applications. You do not need a DVK-BL600. Unfortunately the UwTerminalX can not communicate with the Velo Bling-Bling USB CDC (/dev/ttyACM) under GNU/Linux, you have to use Windows frown

Segger J-Link LITE CortexM

This debug adapter is included in the Bluetooth Low Energy (BLE) Development Kit DVK-BL600. This adapter is needed for downloading a new BL600 firmware.

Get the Software and Download the Application to the Module

Get the Source from the Repository

The Velo Bling-Bling BL600 application software is on the GitHub repository https://github.com/spyren/veloblingbling-ble. Download the ZIP-File and unzip it or better clone the repository e.g. for GNU/Linux:
psi@homer:~/veloblingbling/ble> git clone https://github.com/spyren/veloblingbling-ble
Klone nach 'veloblingbling-ble' ...
remote: Counting objects: 265, done.
remote: Compressing objects: 100% (97/97), done.
remote: Total 265 (delta 167), reused 260 (delta 166), pack-reused 0
Empfange Objekte: 100% (265/265), 223.50 KiB | 0 bytes/s, Fertig.
Löse Unterschiede auf: 100% (167/167), Fertig.
Prüfe Konnektivität ... Fertig.
psi@homer:~/veloblingbling/ble>

Download the Application into the BL600 Module

1. Connect Terminal

Connect the the Velo Bling-Bling USB to the PC with a Micro-USB cable. Start the terminal program (UwTerminalX). Choose the the communication (serial) port and click the OK button.

connect-UwTerminal.png

Press the Escape-Key and then the Return key, wait for the CLI> prompt.

cli.png

and type

CLI> ble reset
CLI> ble trans

Show the firmware version:

ati 3

erase-ffs.png

2. Delete the File System

atz 
at&f 1

erase-ffs.png

3. Download and Compile the LP Application

Press the right mouse button and select XCompile + Load. Choose the file lp.low.power.deep.sleep.sb.

lp-download.png

4. Download and Compile the BLING Application

Press the right mouse button and select XCompile + Load. Choose the file bling.vsp.sb

5. Check Filesystem

at+dir
The applications lp and bling have to be listed.

dir.png

Press Ctrl-D to exit transparent mode.

Update the BL600 Firmware

This is only needed if you want to use a new BL600 firmware (Velo Bling-Bling works with version 1.5.70.0 and newer, 1.2.54.0 is not tested). Firmware update is only possible with a debug adapter (e.g. Segger J-Link LITE CortexM) over the JTAG interface.

1. Connect Terminal

Connect the the Velo Bling-Bling USB to the PC with a Micro-USB cable. Start a terminal program (e.g. UwTerminalX). Hit the Escape-Key, wait for the CLI> prompt and type

CLI> ble reset
CLI> ble trans

Show the firmware version:

ATI 3
10    3    1.2.54.0
00

2. Connect Debug Adapter

Connect a debug adapter to the JTAG connector.

3. Save the License Key

With a terminal program (e.g. UwTerminalX):
ATI 49406
10      49406   1696553225C4BC8CE19A
Write down the license key (similar to 1696553225C4BC8CE19A)

4. Download the Firmware

On a Windows-PC start the the firmware batch program
_DownloadFirmware_v1_5_70_0.bat unlicensed

5. Restore the License Key

With a terminal program (e.g. UwTerminalX):
AT+LIC "1696553225C4BC8CE19A"

BL600 Module from LAIRD Systems

BL600_SA.jpg

http://www.lairdtech.com/products/BL600-series

  • smartBASIC for application programs
  • AT-Commands over UART
  • A complete BLE 4.0 software stack (single mode)!
  • nRF51822 chipset und ARM Cortex M0
  • 19 x 12.5 x 3.2 mm
  • About $14 (Mouser, Farnell)

-- Peter Schmid - 2016-03-30

Comments

Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg BL600_SA.jpg r1 manage 24.3 K 2016-05-23 - 11:43 PeterSchmid  
PNGpng cli.png r2 r1 manage 56.2 K 2016-05-23 - 14:12 PeterSchmid  
PNGpng connect-UwTerminal.png r2 r1 manage 55.2 K 2016-05-23 - 14:19 PeterSchmid  
PNGpng dir.png r1 manage 39.5 K 2016-05-23 - 14:08 PeterSchmid  
PNGpng erase-ffs.png r2 r1 manage 56.9 K 2016-05-23 - 14:16 PeterSchmid  
PNGpng lp-download.png r1 manage 283.4 K 2016-05-23 - 13:17 PeterSchmid  
PNGpng smartBASIC.png r1 manage 28.9 K 2016-03-31 - 09:43 PeterSchmid  
Edit | Attach | Watch | Print version | History: r10 | r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r6 - 2016-06-03 - PeterSchmid
 
  • Edit
  • Attach
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback