BLE Adapter User Guide

BLE Adapter User Guide

BLE adapter, one of ElecFreaks BLE series items, can enable you to upload code by BLE wireless. At the same time, it is a USB – TTL adapter. Adopting TI CC2540 chip with 256 KB space, the BLE module can use BLE technology through the simple IO control, between the module and mobile, also between the module and module. The BLE module has both Master and Slave Mode, with the command control, through the serial port capable of switching module master-slave role, capable of configuring the serial port baud rate, capable of modifying the module radio name, capable of modifying the broadcast interval and the connection interval. Using this module, users can quickly transmit data in the form of Bluetooth packet. BLE Adapter can cooperate with our BLEduino Main board. Download the document here.

1. Hardware and Software Description

BLE adapter 2

Hardware

  • USB cable
  • BLE adapter
  • BLEduino

Software

  • Arduino IDE
  • Serial port debugging software (sscom32E)

2. Operating steps

Part 1  BLEduino Wireless Programming with the BLE Adapter

Step 1 Install the driver

When connect the BLE Adapter to the computer, the computer will prompt to install driver, follow the prompts to install it( the way to install the driver is the same with Arduino UNO and the Driver Name is TI CC2540 Drivers).

BLE adapter3


Step 2 Master Computer searched Slave Computer and then connected to Slave

Connect the BLE Adapter(Defaulted as Master), BLEduino(Defaulted as Slave)to the computer. Via serial port debugging software, open the serial port of master and Slave, and then master send AT SCAN+ Enter to search Slave, just as the following screenshot shows

BLE adapter 4

After the Master searched the Slave, the Master send AT CON 1 + Enter to connect the Slave, and the Slave can get the Master Return Value of connected. If connection is successful,at the same time, BLEduino link LED will stop blinking and be always lit.

BLE adapter 5 BLE adapter 6


Step 3  BLE Adapter(Master) Programming for BLEduino (Slave)
  1. After the Master connected to the Slave,open the program need to be uploaded via Arduino IDE, choose the corresponding Board of UNO,and then choose the BLE Adapter (Master) Serial Port

BLE adapter 7 BLE adapter 8

2. Compiling sketch until Done compiling appears

3. Uploading sketch until Done uploading appears (when uploading, TX, RX LED will be blinking)

BLE adapter 9

4. This is just a simple way to use BLE Adapter cooperated with BLEduino, and later on other application will be released in our BBS.

Part 2 BLE Adapter Using Ways as the USB-TTL Adapter

Step 1 Switching Mode

Switching from the board defaulted CC2540 programming mode to USB-TTL mode. Concrete switching way is that on the back of the module, put the DC switch to TX, DD switch to the RX

BLE adapter 10

Step 2 Wiring and Programming

BLE Adapter function is similar to that of Bee Adapter, and the wiring method is the same: Both methods use the following five pins,VCC  GND  TX  RX  DTR (Wiring ways: VCC->VCC  GND->GND DTR->DTR    TX->RX  RX->TX). After wiring, the BLE Adapter can be considered as a USB-TTL module, and the programming way is the same as a USB-TTL module.

Part 3  AT Command description

  1. AT CON  // Connecting to Slave Computer, and the following parameters are the Slave Number from the searching list. AT CON? can view help information.
  2. AT BAUD  // View, Set the baud rate, following no parameter means viewing baud rate, following with parameter means setting baud rate( parameters are baud rates). AT BAUD? can view help information.
  3. AT NAME // View, Set the device name, following no parameter means viewing device name, following with parameter means setting device name ( parameters are device names). AT NAME? Can view help information.
  4. AT RENEW // Restore to factory settings, no parameters, AT RENEW? Incapable use, factory setting baud rate as 115200.
  5. AT ROLE // View, Set the current role, following no parameter means viewing current role, following with parameter means setting current role( parameters are Role Code, 0 represents Slave, 1 represents Master). AT ROLE? Can view help information.

  6. AT MYMAC // Obtain MAC Address, no parameters, AT MYMAC? Incapable use.
  7. AT TRANSMODE // View, Set the transfer mode, following no parameter means viewing current transfer mode, following with parameter means setting transfer mode  ( parameters are transfer odes)AT TRANSMODE? Can view transfer code detail.
  8. AT SCAN // Scan Settings, following no parameters, AT SCAN ? Incapable use.
  9. AT DISCON // Disconnect the current connection, following no parameters, AT DISCON? Incapable use

3. Revision History

BLE adapter 11