RN4020 Bluetooth BLE

Introduction

Some weeks ago I bought this low cost Bluetooth Low Energy chip (RN4020) for test the bluetooth communication between this chip and an Android phone.


Required Components


Product Specifications

  • Bluetooth version 4.1
  • Simple ASCII command interface over UART
  • Create custom services using command API
  • 7 dBm transit power for 100m+ range
  • Compact form factor 11.5 x 19.5 x 2.5mm


Pin Description

/media/uploads/edodm85/pinout_rn4020.bmp


Connectivity

RN4020 pinMbed pin
1 - GNDGND
5 - UART_TXP27
6 - UART_RXP28
7 - SWAKEP5
8 - CMD/MLDPP6
9 - GNDGND
15 - WAKE_HWP7
16 - GNDGND
23 - VDD3.3V
24 - GNDGND


MLDP Code Example

Import programBluetooth_ble_RN4020_Test_code

Test MLDP code for Microchip RN4020 BLE



Example: Bluetooth communication between Pc and Android Phone over MLDP

First you must turn on the Bluetooth on your Android phone (some phones require location service enabled).

The open the App BLE Terminal and press the button "SEARCH" and pair the ble device.

/media/uploads/edodm85/screen_01.png /media/uploads/edodm85/screen_02.png

Set these settings:

/media/uploads/edodm85/ble_mldp_03mod.png

Press the button CONNECT and wait the connection. Then open "SELECT SERVICE" and press "SELECT SERIAL SERVICE".

/media/uploads/edodm85/ble_mldp_01mod.png /media/uploads/edodm85/ble_mldp_02mod.png

Now you can receive and send messages over MLDP.

/media/uploads/edodm85/ble_mldp_04mod.png


Please log in to post comments.