SAM9X75 Curiosity Wireless Kit - BLE Getting Started Guide for Linux®

Last modified by Microchip on 2025/01/08 11:06

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.

Confirm the following components are present out of the box:

  • SAM9X75 Curiosity Board 
  • LAN8840 EDS2 SODIMM extension board (P/N: EV12N54A)
  • RNBD451 Add-on Board (P/N EV25F14A)
  • WILCS02 M.2 Wi-Fi® Module Card (P/N EV59Y78A)
  • Secure Digital (SD) card
  • USB A to Micro-USB (power)

Required components not included in the box:

  • Serial to USB dongle
  • Microchip Bluetooth® Data (MBD) App (to be installed on a smartphone from the Apple® App Store® for iPhone® or Google Play™ Store for Android™)

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.

Back to Top


At the top of Google Play store, tap the search bar and type "Microchip Bluetooth Data". 

Android MBD Search
 

Back to Top


On the app's page, tap the Install button.

Android MBD Install button

Back to Top

Setup for Apple iPhone

On your Apple device, tap the App Store icon (usually found on the home screen or in the app drawer).

Back to Top


At the top of the App Store, tap the search bar and type "Microchip Bluetooth Data".

IPhone Store MBD Search

Back to Top


On the app's page, tap the Get button.

IPhone Install MBD

Back to Top

Set Up the SD Card and Board

Download the image.

Place in any directory of your choice.

Back to Top


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 target to download.

balenaEtcher Select target window

Select the mounted SD card.

balenaEtcher select the SD card

Select Flash.

The SD card will be ready for use once flashing is completed.

balenaEtcher Flash window

Back to Top


Set the J2 ​​​​​​power selection jumper of the RNBD451 board to 3V3_MIKRO.

Connection setup

Back to Top


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.

Connection setup

 

 

Back to Top

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.

user@comp:~/test$ dmesg | egrep
                     -i 'serial|ttyUSB'

Confirm serial port settings, assuming ttyUSB0 is the hardware connected.

user@comp:~/test$ stty -F /dev/ttyUSB0 -a

Set the parameters.

user@comp:~/test$ stty -F /dev/ttyUSB0
             115200 cs8 -cstopb -parenb

Set the serial port to use, for example, ttyS0 is selected.

user@comp:~/test$ setserial -g /dev/ttyUSB0

A built-in serial emulator is "cu". Assuming /dev/ttyUSB0 is the terminal you want to use, run cu: 

user@comp:~/test$ cu -l dev/ttyUSB0

Back to Top


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.

SAM9x75 Curiosity TeraTerm boot login

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.

Back to Top

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: 

# cd /usr/bin 

Using the HCI Transport Interface, execute the hciattach command:

  • 115200 bps
  • any - no vendor specific option
  • noflow - no hardware flow control
# hciattach ttyS1 any 115200 noflow

 HCI Attach ttyS1 Command

Verify that the setup was successful by running the hciconfig command:

# hciconfig 

Connection setup

Open and initialize the Bluetooth device using the hciconfig command:

# hciconfig hci0 up

Execute the application:

# ./ble-uart-bluez 

Running BLE UART Executable

The following command describes how the device begins advertising automatically after the command execution:

# adv 1

Advertisement command

Back to Top

Set Up Mobile Application

Set up the mobile application.

Open the MBD mobile application and select BLE UART.

BLE UART Sub App

 

Select the PIC32CXBZ option.

PIC32CXBZ MBD Image

 

Scan for devices. Once BLUEZ_6BD1 is listed cancel the scan.

MBD PIC32CXBZ Scan Image   Device visible in MBD

Pair and connect to the RNDB451.

Pair and Connect

Enable Text mode.

Enable the TextMode

Once Text mode is enabled, a TRP link will be established.

Confirm that the TRP link is established using the target console. 

Console output for Enabled TextMode

Back to Top

Perform the Test

Type the text to be sent on the app then press SEND.

Message from Mobile to Console

Verify that the same string was received in the target console. 

Console log of Hello from Mobile

 


Transmit text from the console to the mobile app. 

First check for the device index connected with RNBD. In the target console type "dev".

# dev 

Device list

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:

# raw 0 "Hello From SAM9x75 Curiosity Console"

Then press enter.

Message from Console to Mobile

Confirm the received message transmitted from the SAM9x75 Curiosity Console to the MBD Mobile APP matches.

Message Display from Console to Mobile APP image

Back to Top

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 ExamplesSAM9X75 Peripherals and Drivers Code Examples

Explore Hardware

SAM9X75 Curiosity LAN KitThe 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.

Back to Top

Troubleshooting

Common

Serial Terminal is not showing anything

There are multiple possible reasons why the terminal does not show anything:

  • Double-check that the RX-TX signals of the serial cable are properly connected to the RX-TX signals of the board.
  • Double-check that the ground signal is properly connected.
  • Verify that the SD card contains the right files.

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.
  • Verify whether the SD card contains the right files.
  • Verify that the SD card is inserted properly.
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:

  • Connect the serial USB dongle to the host PC.
  • Assuming  /dev/ttyUSB0 is  the terminal you want to use, run:
user@comp:~/test$ picocom -b 115200 -r -l /dev/ttyUSB0

Back to Top