BM70 Transparent UART Demo (Auto Pattern Tool)

Last modified by Microchip on 2023/11/09 09:03

Objective

The BLEDK3 firmware on the BM70 offers two state machines for the user: Auto Pattern mode and Manual Pattern mode. The User Interface (UI) Configuration Tool allows the user to decide which mode the module will enter once it is powered up. This lab will focus on Auto Pattern mode.

This mode is essential for using the BM70 as a data pipe through the Transparent Universal Asynchronous Receiver Transmitter (UART) service. It is not intended to be used for other private services/characteristics. It automates most of the tasks; however, it also provides a window of opportunity to configure the module before the Auto Pattern state machine takes over. This window of time is called the Configuration mode.

You will:

  • Use the UI Tool to set the module to Auto Pattern mode
  • Learn about the Configure mode
  • Use the Auto Pattern Test Tool to communicate via Transparent UART service

Back to Top

Reference Materials


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

Be sure to install the MCP2200 USB drivers before starting. Also, download/extract the UI Configuration Tool as well as the Auto Pattern Test Tool to your PC using the links above.

Back to Top


Connection Diagram

Connection Diagram

Auto Pattern Flow Chart

Auto Pattern Flow Chart

Back to Top

Procedure

Connect to BM70

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

BM70 PICtail connected to your PC

COM Port

Open the Device Manager window by going to Start Menu > Control Panel > Hardware and Sound and then select '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.

Device Manager window showing Start Menu > Control Panel > Hardware and Sound

Test Mode

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

BM70 module in Test Mode by setting SW7 in the ON position

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.


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.

Click on Load in the Start Menu window


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.

Selecting Load Text File will open up another window


Edit Text File

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

The edit button will be enabled. Click on Edit.

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.

In this demo, we will only select 'BLEDK 0x00: BM70' and then click OK.

Select 'BLEDK 0x00: BM70' and then click OK


Configure Module

The window that follows is called the Function Settings window. All of the settings we will change for this lab are located under the System Setup tab.

The first setting we will change is the Name Fragment in the Device Information pane. We chose to name the module "DeveloperHelp". This is the name that will be displayed in the scan results.

Name Fragment in the Device Information pane

Next, we will disable the UART_RX_IND feature. 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.

Disable the UART_RX_IND feature

Then, we will choose Auto Pattern as our Operation Pattern.

Choose Auto Pattern as our Operation Pattern in the Operation Mode Settings

Before entering Auto Pattern mode, the BM70 can go into a state called Configure mode (see diagram below). Relative settings can be configured while the BM70 is in this mode. The Configuration Mode Timeout option provides the length of time the module will remain in Configure mode if no commands are sent to it.

Configuration Mode Timeout option diagram

For our demo purposes, let's change the value of the Configure Mode Timeout setting to a non-zero value. We chose approximately six seconds (6.4s = 0x0A).

Configure Mode Timeout setting

After changing the Configuration Mode Timeout to a non-zero value, we need to enter the EEPROM parameters into the module. Click on Finish.

Enter the EEPROM parameters into the module. Click on Finish.


Write Settings

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

Select Write on the Start Menu window

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

Select the correct COM Port that has been assigned to your BM70 PICtail board. Select 115200 Baudrate and then click on Write.

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

Write to the EFLASH, select Yes

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

Write has been successful. Click on OK.

You can now close the Start Menu window.

App Mode

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

Module is puti into App mode by moving dip-switch SW7 to the OFF position and reset the module by pressing SW5


Launch the Auto-Pattern Tool

Select the correct COM Port from step 1a and press Connect to connect to your module.

Select the correct COM Port and then press Connect

If you press the Reset button on the PICtail, you will get a "Configure Mode is Enable" message indicating that the module is ready to take in some configuration commands. Click OK

"Configure Mode is Enable" message

You will immediately be taken to the Configure Mode tab where you will see all the allowed Configure mode commands.

Configure Mode tab

If you don't send the module a command within the 6.4 seconds we specified earlier in this lab, the Configure mode will timeout and you will see a "Configure Mode is Disable" message in the Auto Pattern Test Tool.

Push the Reset button on the BM70 PICtail board again to enter Configure mode. Click OK on the "Configure Mode is Enable" message and send the 0x01: Read Local Information command.

Click OK on the "Configure Mode is Enable" message.  Module will respond with its Version and MAC address information

The module will respond with its Version and MAC address information as we see in green above.

Now that we have sent a command, you can continue issuing Configure Commands to the BM70 for as long as you please. The module will remain in Configure mode until we issue the 0x52: Leave Configuration command.

Issue the 0x52: Leave Configuration command

At that point, you will see the following pop-up message:

Configure Mode is Disable message box

Click on OK. The module will automatically leave Configuration mode and enter Auto Pattern mode. It will be on Standby for however many seconds we have specified in the UI Configuration Tool (in this case about two minutes).

Standby  Mode in the UI Configuration Tool


Connect to the Smartphone

The Auto Pattern Test Tool can also be used to send data via Transparent UART. Sending and receiving data via Transparent UART using the Auto PatternTest Tool is similar to the demo found on the "BM70 Transparent UART Demo (Tera Term)" page.

After you've left Configure mode, you can open the SmartData app and as it starts scanning, you should see your module's name on the list.

SmartData app sacareen.  You should see your module's name on the list.

Tap on your module's name to connect to it.

SmartData app showing Connected


Send File from Auto Pattern Tool

In the Raw Data Page tab under the Tx Control pane, click on Load File and browse to the location of the file you would like to send. We called it TestMessage.txt in this example, as we can see in the screenshot below.

Raw Data Page tab under the Tx Control pane, click on Load File

Next, press on the Tx Start button.

Press on the Tx Start button in the Auto Pattern Test Tool

Over on the SmartData app, you will notice that the data has been received.

SmartData app indicates that data has been received.

Back to Top

Conclusions

In this lab you:

  • Saw the steps required to work with the Configure mode.
  • Sent data through the Transparent UART service using the Auto Pattern Test Tool.

Back to Top