BM70 Transparent UART Demo (Tera Term)

 Objective

The first part of this lab exercise shows how to transfer data via Transparent universal asynchronous receiver/transmitter (UART) service using an iOS smartphone. The second part of the lab uses Microchip's Smart Discover app to connect to the BM70 module and briefly discusses how you can configure LED1 on the PICtail to indicate different BLEDK3 statuses (Standby, Connected, etc.).

You will:

  • Configure the BM70 module to be used in Auto Pattern mode.
  • Use the Bluetooth Smart Data app to communicate with the module via the Transparent UART service.
  • Learn how to configure the blink rate of LED1 on the BM70 PICtail to indicate different BLEDK3 statuses.

 Materials

Hardware Tools

Tool About Purchase
BM70-pictail-50px.png
BM-70-PICTAIL
BM70 Bluetooth Low Energy PICtail™ Plus

This lab uses a BM70 PICtail with version 1.06 of the firmware. If you don't have at least v1.06, please go to the Firmware Upgrade page to update your BM70 module.

  • Apple Smartphone
    • OS version 5 or later
    • BT 4.0 or higher hardware

Software Tools

Be sure to install the MCP2200 USB drivers before starting. Also, download/extract the UI Configuration Tool to your PC using the link above. Lastly, make sure you have installed the Bluetooth Smart Data (iOS) and the Smart Discover app on your smartphone.

Auto Pattern Mode State Machine

AutoModeStateMachine.png

The picture above represents the basic flow chart for the Auto Pattern Mode state machine. After the device is powered on, it will enter the Standby State which means that the BM70 module is discoverable and connectable to a peer device. Then, it can enter the Link State, which means that the BM70 module is connected to a peer device and is exchanging data. This state also processes how the device responds if disconnected. Lastly, it will enter the Shutdown State.

 Procedure

1

Connect to BM70

Connect the BM70 PICtail to your PC. Ensure the jumpers are set as shown.

Connected.png

a

COM Port

Open the Device Manager window by going to Start Menu > Control Panel > Hardware and Sound and then selecting 'Device Manager'. Once open, check which COM Port has been assigned to the BM70 PICtail. In this case, it is COM18. Please note that yours will probably be different.

DeviceManager.png

b

Test Mode

Place the module in Test Mode by setting SW7 in the ON position, then press Reset (SW5) to reset the module.

BM70Update.png

The module's basic operating mode (Test/Application) is sampled and established on a module reset condition. We recommend pressing the Reset (SW5) push-button whenever SW7 is first changed, or when you want to be sure that SW7 is sampled and applied by the module.

With jumper JP8 shorted, LED0 will be lit (BLUE) indicating the module is in Test Mode, as shown above.

2

Launch the User Interface Configuration Tool

After extracting files from the User Interface (UI) Configuration Tool ZIP file, double-click on the application file called IS187x_102_BLEDK3_UI v100.132.exe to launch the utility.

Immediately after launch, the Start Menu window will pop up. Before we can do anything with this tool, we must load a UI parameter table. One way to load the UI parameters is by using an existing UI text file.

Click on Load in the Start Menu window.

NewLoad.png

3

Load Text File

Selecting Load Text File will open up another window. Choose the IS1870SF_102_BLEDK3_UI v100.132(BM70) default text file and click Open.

NewLoadFile.png

4

Edit Text File

Once the text file has been loaded, the edit button will be enabled. Click on Edit.

NewEdit.png

When you press the edit button to start editing UI parameters, the Main Feature window will pop up. This is where you can select the target application. BLEDK3 supports all BLE operations, while the Beacon mode is used for non-connectable advertising only. If 'BeaconThings' is selected, the module will support both BLEDK and Beacon operations.

For the purposes of this demo, we will only select 'BLEDK 0x00: BM70' and then click OK.

NewMainFEature.png

5

Device Name

The main dialog window opens up providing all the parameter options that we can change. The first setting we will change during this lab is the Name Fragment in the Device Information pane. In this case, the module is named "DeveloperHelp". This is the name that will be displayed in the scan results.

DeveloperHelp.png

The Name Fragment identifier becomes the module's GAP Service Device Name characteristic.

6

Disable UART_RX_IND

In the Uart Setting window, select the pull-down to disable this feature as shown below:

DisableUARTRXIND2.png

When enabled, this feature places the module into a lower power mode, shutting off its UART RX operation. The host MCU then needs to drive this pin high to enable subsequent packet I/O operations.

7

Save Settings

After we have changed the name of our BM70 module and disabled UART RX IND, we need to write these new configuration settings into the module. Notice that Auto Pattern mode is selected by default; therefore we do not need to change that. Click on Finish.

AutoPattern.png

8

Write Settings

After that window closes, click Write on the Start Menu window that remains open.

It is useful to Save a UI Configuration file if you will use those certain settings repeatedly. You will save time by being able to Load the text file instead of having to go back and Edit all the settings from the default file.

NewWrite.png

In the window that pops up, select the correct COM port that has been assigned to your BM70 PICtail. For Baudrate, select 115200 and then click on Write.

COMNumber.png

9

Finish

You will see a window asking if you are sure you want to write to the EFLASH, select Yes.

WriteEFLASH.png

Lastly, you will see a window letting you know the write has been successful. Click on OK.

FinishedWrite.png

You can now close the Start Menu window.

10

App Mode

Put the module in App Mode by moving dip-switch SW7 to the OFF position and reset the module by pressing SW5 (the button immediately above the dip-switch).

AppMode.png

11

Smart Data App (iOS)

Open the Smart Data app and look for your device.

SmartData.png

Tap on its name (in this case DeveloperHelp) and you will see that the Status reads "Connected".

SmartDataConnected.png

12

Tera Term

The next step is to set up a Tera Term serial port connection. Below you will find the setting used. Be sure to select the correct COM port from Step 1a. The Baud rate should be 115200.

TeraTermSettings.png

13

Send Data

You can now start exchanging data. Once you have typed your message on the app, press Send and you will immediately see it on the Tera Term window.

DataExchange.png

If you are typing on the Tera Term window, once you press Enter on your keyboard, the message will show up on the Smart Data app.

DataExchange2.png

As you can see, whatever you type into the Smart Data app on the iOS device will show on the Tera Term window and vice versa.

14

Smart Discover App (iOS and Android)

Launch the Smart Discover App on your smartphone and tap on your module's name to connect to it. The app will immediately list all the preloaded services on the module.

If you would like to see how the information found within the app can be useful, please visit the "BM70 GATT Server Demo (Public Service)" page.

SmartDiscoverConnected.png

Besides showing Connected under State, you can verify you have established a link to your BM70 by taking a look at the PICtail itself. LED1 should be blinking twice every 1.5 seconds, which is the default setting. The LED blink rate is something that you can customize using the User Interface Tool (see screenshot below).

LEDBlinkRate.png

If you have an Android phone or tablet, you can download the Smart Discover App (found in the "Software Tools" section of this page) and connect to your BM70 module that way.

15

Lastly, you can tap on Disconnect to drop the link between the smartphone and the BM70. LED1 will go back to flashing once every three seconds to show it is now on Standby mode. Again, this setting can be customized using the UI Tool.

 Conclusions

In this lab you:

  • Worked with the Transparent UART Service built into the BM70 module.
  • Learned that LED1 on the BM70 PICtail can be customized to indicate what state the module is currently in.
© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.