RF-BM-S02 CC2540 4.0 BLE Bluetooth to UART Transceiver Module

  1. Description


RF-BM-S01 BLE module applies CC2540 from TI as core processor. The module runs at 2.4GHz ISM band, with GFSK (Gaussian Frequency Shift Keying) modulation scheme. It has 40 channels (channel space at 2MHz), among which there are 3 fixed radio channels and 37 data channels of adaptive automatic frequency hopping. Physical layers can be combined with classic Bluetooth RF to form a dual mode device. And 2 MHz’s channel space can prevent interference from adjacent channels better. Besides, it has a wide output power adjustment (-23 dBm ~ 4dBm) and a high gain receiving sensitivity of -93 dBm.

The module is designed to quickly connect electronic products with smart mobile devices, and can be widely used in various electronic devices, such as instruments, logistics tracking, healthcare, smart home, sports metering, automotive electronics, toys, and etc. With Android 4.3 smart devices integrated with BLE technology, it will be a trend that BLE will be the standard configuration of smart phones. And the market demand on smart phone peripherals will increase geometrically. With this module, users can integrate their existing solutions or products in the shortest development cycle, to occupy the market in the fastest speed, and to empower their company’s growth with the strength of new technology.

Overview

The module can work in bridge mode (transparent transmission mode) and direct-drive mode. After being started, the module can broadcast automatically. Smart phones with specific application running will scan and pair with it. When connection success, the smart phone can monitor and control the module through Bluetooth protocol.

In bridge mode, user ‘s MCU can communicate with the mobile device in two-way through module’s UART. Users can also manage and control certain communication parameters through specific serial port AT commands. The detailed meaning of the user data is defined by the up-application. Mobile devices can write to the module through the APP. And the data written will be sent to the user’s MCU through serial ports.

Then the module will transmit the data package from user MCU to the mobile devices automatically. In the development under this mode, the user need to undertake the code design for MCU code, and the code design of APP for smart mobile terminals.

In Direct-Drive mode, users take simple periphery expansion to the module. And APP drives the module directly through BLE protocol, to implement the monitoring and control of the module by smart mobile devices. In this mode, users only need to do the code design for smart mobile terminals.

Key features

  • Easy to use, no experience of Bluetooth protocol stack application is needed.
  • Full-duplex UART communication, maximum speed can be up to 4k bytes/second.
  • Supporting bridge mode (serial port transparent transmission), and direct-drive mode (no additional MCU needed);
  • Reach AT command functions, like software reset module, adjustment of Bluetooth connection interval, adjustment of the transmission power, the change of broadcasting interval, etc.
  • The length of the UART packets can be any below or equal to the arbitrary length of 200 bytes (large packet automatic distribution);
  • Supporting the change of module name by APP in mobile devices, the change of UART baud rate and product UDID, the customization of broadcasting contents and cycle (all settings can be saved after power-off);
  • Supporting the remote reset of module by APP in mobile devices, and the setting of transmission power;
  • Supporting restoring factory settings by 5-second long press and the APP remote recovery;

Schematic Diagram of Working Mode

Module Bridge mode and Direct-Driven mode schematic diagram

Note:In order to avoid the output level difference of user MCU’s IO and module IO, which will result

to high current, a small isolation resistor is suggested to be connected in series in the output signal

line TX, BCTS.

 

 

  1. Product technical specifications

    1. Schematic

  1. Package information

  1. Pin definitions

Pin No. Module Pin Name Chip Pin Name I/O Description
Pin1 GND GND GND
Pin2 VCC VCC power supply 2V-3.6V
Pin3 IO7 P2.2 O Output Port (Timing to Flip) / Sleep status indication
Pin4 IO6 P2.1 O Output Port Timing Flip/Connect status indication(Prompt when low level or square wave, see the section “Module Parameter Settings” )
Pin5 RES RST I Reseteffect at low level
Pin6 EN P2.0 I Module-enabled control line (level trigger mode as default)

level trigger modeActive when low levelwith internal pull-up.

0: Module starting to broadcast, until connected to the

mobile device

1: Entering sleep mode immediately, regardless the current status0.4uA

Pulse triggering mode – Each time when receiving a

pulsemodule will shift between boot-upbroadcasting, allowing to be found and connected and shutdown complete sleep mode.

(About the mode switching, please refer to the related sections of Module Parameter Setting.)Pin7IO5P1.7I/OProgrammable two-way IO port, which could be used

for input or output through the BLE protocol

Could be a level PWM count input terminal when used as inputPin8U+USB+I/OOut-pin of CC2540 to USB+, not usedPin9U-USB-I/OOut-pin of CC2540 to USB-, not usedPin10REST ORE / IO0P1.2I/OFactory setting restore trigger or programmable two-way IO

Within 30 seconds after power-on, keep this pin at low

level for 5 s, the system can restore partially (shallow

recovery); if keeping more than 20 s the system will

restore all (deep recovery).

(see section “System Reset and Recovery”)

30 seconds after power on, could be used as ordinary

IO and be set through BLE protocol (see the

programmable IO (8) “service UUID: 0 xfff0″Pin11PWM1P1.1OPWM output channel 1Pin12PWM3P0.7OPWM output channel 3Pin13PWM4P0.6OPWM output channel 4Pin14BRTSP0.5IAs the data sending requests (for module wake-up)

0: Host has data to send, and module will wait for data

transmission from the host so will not sleep

1. Host has no data to send, or data has been sent. So the value of the signal should be set at “1”.Pin15BCTSP0.4OData input signalfor host wake-up, optional

Module has data to send, and the host will receive the data.

1Module has no data to send, or data has been sent, and

the value of the signal will be set at “1”.Pin16TXP0.3OModule UART TXD endPin17RXP0.2IModule UART RXD endPin18ADC1P0.1IAnalog acquisition, channel 1

 

  1. AT commands

Factory Default Baud: 9600, N, 8, 1;

In the application where there is a large amount of data transmission, or there is high real-time demand, it is suggested to set the serial port baud rate at the high speed of 115200 BPS. Settings can be saved and kept after power-off.

After the module is connected, a string of “TTM: OK \ r \ n \ 0” will be prompted from TX. And it can be certain by the string if the normal forwarding operation is available. Of course the connection status prompt pin can be used instead. Also the connection can be confirmed by sending a specific confirmation string to the module from mobile devices. When APP actively disconnect the module, there will be a prompt of string “TTM: DISCONNET \ r \ n \ 0” from TX. If the disconnection is abnormal, the string prompt will be “TTM: DISCONNET FOR a TIMEOUT \ r \ n \ 0“.

AT Command format:

Strings starting with “TTM” will be regarded as AT commands to be parsed and executed. and will return exactly the same from the serial port. Afterwards the execution result will be output (ie. TTM: OK \ r \ n \ “0” or “TTM: ERP \ r \ n \ 0″, etc. Serial data packets which do not start with “TTM”will be regarded as transparent transmission data.

Connection interval setting

Input the following string to the serial port RX to set the BLE connection interval:

TTM:CIT-Xms

Where X = “20”, “50”, “100”, “200”, “300”, “400”, “500”, “1000”, “1500”, or “2000” (ms). After the command is executed, the following confirmations will be got from serial port TX:

TTM: TIMEOUT \ r \ n \ 0” (means timeout and the change failed);

TTM: OK \ r \ n \ 0” (means the change is successful and the new connection interval is applied);

The success of the connection interval setting depends on the constraints of connection intervals by mobile devices. The maximum connection intervals also vary in different version of iOS. Tests with iPhone 4 s (iOS 5.1.1) shows the fastest is 20 ms and the slowest is 2 s. On the other hand, due to the BLE protocol internal mechanism, execution efficiency of this command will be different with different connection intervals.

In iOS5.1.1, it takes maximum around 100 s, changing from the current connection interval of 2000 ms (max. 2000 ms) to other connection intervals. While the execution will be fast when executing this AT command in other high-frequency connection intervals.

Note: the connection interval setting cannot be saved after power-off. And command of change is only effective when the connection is successful.

Module Renaming

Input the following string to the serial port RX to rename the module (length of name should not exceed 16 bytes).

TTM:REN-” + Name

Also confirmation of “TTM: OK \ r \ n \ 0” will be received from TX. And if the command format incorrect, the string as follows will be returned:

TTM:ERP\r\n\0

Test shows that device name can be changed immediately in iOS6 and above versions and can immediately, but not in iOS5. The name can be saved after power-off.

Baud rate setting

Input the following string to the serial port RX (parameter after “-” being the new baud rate):

TTM:BPS-115200

Afterwards confirmation string of “TTM: OK \ r \ n \ 0” will be received from TX. If the value set is not in the options, or the command format is incorrect, the string as follows will be returned:

TTM:ERP\r\n\0

Test shows that in iOS 5 the baud rate cannot be changed, but can be changed immediately in iOS6 and above versions. Users can set through PC, or through the BLE APP interface of mobile devices.

AT commands list

AT command format Saved after Power-off Parameter Description Possible response Meaning
“TTM:CIT-Xms

” ( Valid only when

connection is successful)noX=”20“50”“100”“200”“300”“400”“500” “1000” “1500” “2000” Set the BLE connection

interval, (in ms)“TTM:TIMEOUT\r\n\0″

“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″TIMEOUT setting Setting successful Parameter Error“TTM:REN-“+ NameYESName,New module name, with length not exceeding 15 bytes.“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″Setting successful

parameter error“TTM:BPS-X”YESX=”4800″ 9600“19200” “38400” “57600”“115200” Set the baud rate“TTM:BPS SET

AFTER 2S …\r\n\0″

“TTM:ERP\r\n\0″Setting successful and new baud rate will be applied in two seconds

Parameter Error“TTM:MAC-?”acquire MAC address“TTM:MAC-xxxxxxxx

xxxx” xxxxxxxxxxxx

for module MAC

addressReturn with MAC address“TTM:RST-SYSTEMRESET”Reset the moduleNOResetting the module“TTM:ADP-(X)”YESX = “2“,”5″,”10″,”15″,”20″, “25”,”30″,”40″,”50″ Set the appropriate broadcast cycle T = X * 100ms

X = “2”, “5”, “10”, “15”, “20”, “25”, “30”, “40”, “50” set the broadcast cycle T = X * 100 ms“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″Setting up the broadcast cycle.(ie. If the parameter set to “5”, the cycle will be 500 ms)“TTM:ADD-” + DataYESData for customized broadcast Data, and length L < = 16;“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″Setting the customized broadcast contents“TTM:PID-” + DataYESData for customized product

identification code, Length L = 2, and default value is 00 00;“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″Setting the Customized product identification code“TTM:TPL-(X)”NOX = “+ 4″, “0“, and “6”, “- 23″ set up the transmission power (in dBm)“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″Transmission power setting“TTM:CDL-Xms” X = “0“, “2”, “5”, “10”, “15”, “20”, “25” set the delay from when BCTS output is set low till when serial port outputs data (in ms)“TTM:OK\r\n\0″

“TTM:ERP\r\n\0″If minimum delay not less than X, the actual delay will be X + Y ms (500 us < Y < 1 ms).

Note: Default settings are in blue bold font. Gray highlighted commands cannot be saved after

power-off.

 

Reference:

[1] RF-STAR website

 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>