Bluetooth is an industry specification for wireless personal area networks created by the Bluetooth Special Interest Group, Inc. that enables voice and data transmission between different devices using a radio frequency link in the 2.4 GHz ISM band.
Industrial Shields Raspberry PLC has BLE wireless communication by default. It uses the 5.0 BLE version.
In this blog, you are going to learn how to setup the Bluetooth of your Raspberry industrial PLC.
Connect Raspberry PLC to Wi-Fi
Raspberry Pi PLC Analog Outputs
Pairing mode on industrial Raspberry PLC
Once you have everything you need, let's test the bluetooth between your industrial Raspberry Pi PLC and an Android phone!
First of all, let’s set pairing mode on your Raspberry Pi industrial PLC.
At the [bluetooth]# prompt, enter the following commands:
Wait for a message to appear showing the Android phone has been found:
[NEW] Device 12:23:34:45:56:67 devicename
Type pair with the mac address of your Android phone:
On your Android phone and Raspberry Pi, confirm the passcode. Then run the following command in order to exit the bluetooth prompt:
Connecting mode on your Raspberry Pi PLC controller
To be able to get data from your Android phone, you must install a text-based modem control and terminal emulator program called minicom following the next instructions:
sudo apt update
sudo apt install minicom
Once minicom is installed, you will need to open the serial port using an Android app on your mobile phone:
Go to the Play Store and install the "Serial Bluetooth Terminal" app.
Tab on Devices and select the Raspberry Pi device.
If everything went fine, you will finally be able to establish communication between your Raspberry Pi based PLC and your Android smartphone!