Editbluetooth linux.pl

Source code: bluetooth_linux.pl

Provided variables:

$UpdateInterval
$RfcommPath

Description

This module implements serial port communication in GNU/Linux. Although it is called bluetooth_linux.pl, it just reads from a serial port. Therefore you can use it with anything as long as the serial port is used.

Like all other communication modules, it provides !InitConnection, Read and Write subroutines.

By default, $!RfcommPath is set to /dev/rfcomm0. You might want to change it only if you are using other bluetooth devices and rfcomm0 is already busy.

Please note that on most distributions you must be in dialout group in order to talk with serial ports without root privileges:

sudo adduser youruser dialout

It is possible that reboot is required after this.
If you did that but you still cannot use /dev/rfcommX without root priveleges and the error you see is "Device or resource busy", then try to find out what is using it:

sudo lsof /dev/rfcomm0

If it lists bluetooth, that's fine. But if you see something else, for example !ModemManager, it is very likely causing your problem. Try killing it!



To save this page you must answer this question:

Type "ProgArm" here: