Go to the source code of this file.
| #define BLUETOOTH_ADDRESS_LENGTH 18 |
| #define MAX_BLUETOOTH_NAME_LENGTH 128 |
Connect to the remote device given his bluetooth name or address. This function will block until the connection has been established.
- Parameters
-
- Returns
- Connection handle or -1 if wasn't possible to find the address given the device name
Receives a string from a bluetooth connection. This function will block until a message has been received from the connection. It's guaranteed that the string copied in the buffer will be null-terminated. If the incoming message is longer that the buffer length, only the first characters will be copied. A successive call to this function will allow to read the remaining characters.
- Parameters
-
| from | |
| buffer | Buffer to which the incoming message will be copied to |
| bufferLength | Maximum Size of the buffer |
- Returns
- Length of the received message.
Wait for an incoming bluetooth connection. This function will block until a connection has been established.
- Returns
- Connection handle