After designing the Android application, pairing the devices, and enabling the serial port, it is now time to program the RPi so that it can receive text data from the Android smartphone. To receive incoming text data from the smartphone, we are going to use sockets from socket programming.
Developing the Bluetooth program for RPi
Socket programming
A socket is an endpoint of a two-way communication system in a network. We create sockets so that we can send bits of information through them. To establish a Bluetooth communication between the devices, we need to create a socket. One socket will be on the server side and the other will be on the client side. In our case, the Android smartphone is the client and the RPi is the...