Objective

The BLEDK3 firmware on the BM71 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 essentially for using the BM71 as a data pipe through the Transparent 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

Software Tools

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.

Connection Diagram

Auto Pattern Flow Chart

Procedure

1

Connect to BM71

Connect the BM71 PICtail to your PC via the USB connector (bottom-side of the board) using the supplied USB Cable. Ensure the jumpers J3, JP8, J1 (all yellow in this photo) are set as shown:

a

COM Port

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

b

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

​

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

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 using an existing UI text file.

Click on Load in the Start Menu window.

3

Load Text File

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

4

Edit Text File

Once the text file has been loaded, 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 window is where the user will 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 0x01: BM71 and then click OK.

5

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.

a

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

b

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.

c

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

Before entering Auto Pattern mode, the BM71 can go into a state called Configure Mode (see diagram below). Relative settings can be configured while the BM71 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.

d

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

e

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

6

Write Settings

a

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

b

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

c

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

d

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

e

You can now close the Start Menu window.

7

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).

8

Launch the Auto-Pattern Tool

a

Select the correct COM port from step 1a and Connect to your module.

b

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

c

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

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.

d

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

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

e

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.

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

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 2 minutes).

9

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 here.

a

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.

b

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

10

Send File from Auto Pattern Tool

a

In the Raw Data Page tab under the Tx Control section click on Load File and browse to the location of the file you would like to send. Mine is called TestMessage.txt and it is on my desktop as we can see on the screenshot below.

b

Next, press on the Tx Start button.

c

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

Conclusions

In this lab you:

Were able to see the steps required to work with the Configure Mode

Used the Auto Pattern Test Tool to send data through the Transparent UART service

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.

Click here to edit contents of this page.

Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available.

Append content without editing the whole page source.

Check out how this page has evolved in the past.

If you want to discuss contents of this page - this is the easiest way to do it.

View and manage file attachments for this page.

A few useful tools to manage this Site.

See pages that link to and include this page.

Change the name (also URL address, possibly the category) of the page.