SAM9X75 Curiosity Wireless Kit - BLE Getting Started Guide for Linux®
Introduction
Thank you for evaluating the SAM9X75 Curiosity Wireless Kit. This guide will assist you in running the demonstration application designed for the kit. For a more detailed exploration of the kit's features and capabilities, please refer to the links in this guide's "Explore Hardware" section.
This getting started guide will demonstrate how to enable a transparent UART connection between a smartphone and the SAM9X75 Curiosity Board using a BLE connection.
Step-by-Step Guide to Download and Install Microchip Bluetooth Data App from Google Play Store and Apple App Store
Setup for Android Smartphones
On your Android device, locate the Google Play store icon (usually found on the home screen or in the app drawer) and tap it to open the Google Play store v.6.94 or greater.
At the top of Google Play store, tap the search bar and type "Microchip Bluetooth Data".
On the app's page, tap the Install button.
Setup for Apple iPhone
On your Apple device, tap the App Store icon (usually found on the home screen or in the app drawer).
At the top of the App Store, tap the search bar and type "Microchip Bluetooth Data".
On the app's page, tap the Get button.
Set Up the SD Card and Board
Copy the downloaded file into the SD memory card using balenaEtcher.
Insert the SD memory card into the host computer.
Download, install and run balenaEtcher.
Select the downloaded linux4sam-buildroot-sam9x75_curiosity-headless-2024.10.img.bz2.
Select the target to download.
Select the mounted SD card.
Select Flash.
The SD card will be ready for use once flashing is completed.
Set the J2 power selection jumper of the RNBD451 board to 3V3_MIKRO.
Connect the components as described in the following steps:
Connect the RNDB451 BLE Click board™ to the J25 mikroBUS™ connector.
Insert the SD card on the SD Boot J14 slot.
Connect the serial USB dongle to UART DEBUG J35 header.
Connect the USB-A to Micro USB-B cable to the J2 Micro USB-B port for power.
Set Up and Start SAM9X75 Curiosity Board Serial Terminal
Set up the SAM9X75 Curiosity Board Serial Terminal on the host computer.
On the host computer, open a Serial Terminal with the following settings:
- Baud Rate: 115200
- Data: 8-bit
- Parity: None
- Stop: 1-bit
- Flow Control: None
Check serial port in the system.
-i 'serial|ttyUSB'
Confirm serial port settings, assuming ttyUSB0 is the hardware connected.
Set the parameters.
115200 cs8 -cstopb -parenb
Set the serial port to use, for example, ttyS0 is selected.
A built-in serial emulator is "cu". Assuming /dev/ttyUSB0 is the terminal you want to use, run cu:
Press the RESET (SW3) button on the SAM9X75 Curiosity Board to force a reset.
When the system is ready, the Serial Terminal you set up earlier in this tutorial will show a prompt. This is the target console.
Verify the login prompt is shown Curiosity Board Serial Terminal.
Type or enter "root" to log in. No password is required.
In case you do not see the prompt, press the enter key to force the prompt to refresh.
Set Up Transparent UART
Set up the SAM9X75 Curiosity Board + BLE Click board for transparent UART.
In the target console, navigate to the given directory:
Using the HCI Transport Interface, execute the hciattach command:
- 115200 bps
- any - no vendor specific option
- noflow - no hardware flow control
Verify that the setup was successful by running the hciconfig command:
Open and initialize the Bluetooth device using the hciconfig command:
Execute the application:
The following command describes how the device begins advertising automatically after the command execution:
Set Up Mobile Application
Set up the mobile application.
Open the MBD mobile application and select BLE UART.
Select the PIC32CXBZ option.
Scan for devices. Once BLUEZ_6BD1 is listed cancel the scan.
Pair and connect to the RNDB451.
Enable Text mode.
Once Text mode is enabled, a TRP link will be established.
Confirm that the TRP link is established using the target console.
Perform the Test
Type the text to be sent on the app then press SEND.
Verify that the same string was received in the target console.
Transmit text from the console to the mobile app.
First check for the device index connected with RNBD. In the target console type "dev".
Note the dev list index number assigned to the connected device. In the accompanying screenshot, it is assigned to zero.
Where zero is the same index assigned to the connected device, type the following:
Then press enter.
Confirm the received message transmitted from the SAM9x75 Curiosity Console to the MBD Mobile APP matches.
Explore Applications
Wireless Applications | The SAM9X75 Curiosity Wireless Kit has a soft access point (SoftAP) that allows a smartphone or PC to access a static web page through a browser (See the "SAM9X75 Curiosity Wireless Kit—WiFi Getting Started Guide for Linux®"page). |
Ethernet Applications | Iperf networking test between Host PC (as a TCP Client) on Microchip Curiosity Board (as a TCP Server) (See the "SAM9X75 Curiosity LAN Kit - Getting Started Guide for MPLAB® Harmony V3" page.) |
MPLAB Discover Code Examples | SAM9X75 Peripherals and Drivers Code Examples |
Explore Hardware
SAM9X75 Curiosity LAN Kit | The SAM9X75 Curiosity Development Board, featuring the high-performance, ultra-low power SAM9X75D2G MPU with an ARM926EJ-S CPU running up to 800 MHz and integrated 2 Gbit DDR3L memory, serves as the evaluation platform for the SAM9X7 Series MPU devices. |
The RNBD451 Add-on Board is a cost-effective development platform for evaluating the RNBD451PE Bluetooth LE module. It features compliance with the mikroBUS standard and an onboard MCP2200 USB-to-UART converter for immediate use without additional hardware. | |
LAN8840 EDS2 Daughter Card | The EV12N54A LAN8840 EDS2 PHY Daughter Card offers copper Gigabit Ethernet connectivity for Microchip development platforms using the EDS2 interface. It features the LAN8840 transceiver with PTP support for data transmission over standard CAT-5, CAT-5e, and CAT-6 UTP cables. |
WINCS02UC Wi-Fi Network Controller Module | The WINCS02IC is a low-power IC featuring a 2.4 GHz IEEE 802.11b/g/n-compliant radio with integrated HPA, LNA, RF switches for TX/RX control, and a hardware-based security accelerator, designed to run Microchip's Wi-Fi and Networking stack via SPI. |
Troubleshooting
Common
Serial Terminal is not showing anything | There are multiple possible reasons why the terminal does not show anything:
|
Running hciconfig command in the curiosity terminal results in an "initialization timeout" error. | Run hciattach with -r option (raw mode). |
The terminal shows RomBoot message. |
|
I ran 'cu' in Linux command line, how do I exit? | Press keys Shift and ~ (tilde) then the . (dot) key and cu will exit and return to the command line. |
I already have 'picocom' installed. How do I use 'picocom' instead of 'cu' for my serial terminal? | To use 'picocom' replace all of Step 4 with the following:
user@comp:~/test$ picocom -b 115200 -r -l /dev/ttyUSB0 |