summaryrefslogtreecommitdiffstats
path: root/rfcomm/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'rfcomm/main.c')
-rw-r--r--rfcomm/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/rfcomm/main.c b/rfcomm/main.c
index 2f793faa..f0275f74 100644
--- a/rfcomm/main.c
+++ b/rfcomm/main.c
@@ -249,8 +249,11 @@ static void cmd_connect(int ctl, int dev, bdaddr_t *bdaddr, int argc, char **arg
snprintf(devname, MAXPATHLEN - 1, "/dev/rfcomm%d", dev);
if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
- perror("Can't open RFCOMM device");
- goto release;
+ snprintf(devname, MAXPATHLEN - 1, "/dev/bluetooth/rfcomm/%d", dev);
+ if ((fd = open(devname, O_RDONLY | O_NOCTTY)) < 0) {
+ perror("Can't open RFCOMM device");
+ goto release;
+ }
}
memset(&sa, 0, sizeof(sa));