First to start the tutorial configure the board, using the Getting Started guide and auto-expanding the file system using Pivot Overlay .
Now connect the board via SSH, it is possible to use the Terminal from Arduino OS or directly from Arduino IDE.
Arduino OS is accessible typing on the browser the IP address or hostname.local/ of the board after that it is been configured on the same network of PC.
The Terminal is available from Utilities menu.
Instead from Arduino IDE open the MIPS console selecting the Arduino Tian (MIPS console port) from Tools>Port menu, setting the baud-rate to 115200 and clicking on Send button.
If you are using the Arduino IDE 1.8.x then download the corresponding platform (Arduino SAMD Boards (32-bits ARM Cortex-M0+)) using the Boards Manager.
Now, Login as root and insert the corresponding password.
Download and install Bluez-libs, Bluez utils and Bluez daemon:
$ opkg update
$ opkg install bluez-libs bluez-utils bluez-daemon
Type bluetoothctl command to launch the tool:
It is shown the identification hexadecimal code of the board.
Open the bluetooth:
To start a scanning of bluetooth device typing this command:
They are shown all bluetooth devices detected by the board.
Digit scan off to end the scanning.
If you want to pair with a device, execute the below command, specifying the corresponding hexadecimal code of the bluetooth device:
Wait the device pairing.
When the board is connected to device the blue BT Led on the board blinks.
Instead if you want to make visible your board on the other devices then type the command below:
Digit power off to close bluetooth and quit to exit program.
To know all other functionalities, type the help command:
list List available controllers
show [ctrl] Controller information
select <ctrl> Select default controller
devices List available devices
paired-devices List paired devices
power <on/off> Set controller power
pairable <on/off> Set controller pairable mode
discoverable <on/off> Set controller discoverable mode
agent <on/off/capability> Enable/disable agent with given capability
default-agent Set agent as the default one
set-scan-filter-uuids [uuid1 uuid2 ...] Set scan filter uuids
set-scan-filter-rssi [rssi] Set scan filter rssi, and clears pathloss
set-scan-filter-pathloss [pathloss] Set scan filter pathloss, and clears rssi
set-scan-filter-transport [transport] Set scan filter transport
set-scan-filter-clear Clears discovery filter.
scan <on/off> Scan for devices
info [dev] Device information
pair [dev] Pair with device
trust [dev] Trust device
untrust [dev] Untrust device
block [dev] Block device
unblock [dev] Unblock device
remove <dev> Remove device
connect <dev> Connect device
disconnect [dev] Disconnect device
list-attributes [dev] List attributes
select-attribute <attribute> Select attribute
attribute-info [attribute] Select attribute
read Read attribute value
write <data=[xx xx ...]> Write attribute value
notify <on/off> Notify attribute value
register-profile <UUID ...> Register profile to connect
unregister-profile Unregister profile
version Display version
quit Quit program
The bluetooth on the Tian is managed only Linux side.