Return-Path: MIME-Version: 1.0 In-Reply-To: References: Date: Wed, 22 Sep 2010 13:42:18 -0700 Message-ID: Subject: Fwd: Gumstix Overo running OE 2.6.34 Bluetooth Serial Device; Problem: cannot open /dev/rfcomm0: Connection refused or No such file or directory From: Paul Matz To: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-bluetooth-owner@vger.kernel.org List-ID: In addition to minicom failing to be able to open /dev/rfcomm0 (see details below), we also noticed that rfcomm connect fails with this: Can't connect RFCOMM socket: Connection refused However, think I found something;  https://bugs.archlinux.org/task/4930 Details bluez changed the pin_helper concept in the last release. If pairing with a device requires a PIN, then it will send a dbus-message. Unfortunately, there are currently no dbus helpers compatible with the new bluez dbus API. There is a small program called passkey-agent in the bluez-utils source, which solves this problem. If you call "passkey-agent --default " just before the pairing attempt, it will use the right pin. This program is built with bluez-utils, but make install ignores it. Fix: Add install -D -m755 $startdir/src/bluez-utils-3.1/hcid/passkey-agent $startdir/pkg/usr/bin/passkey-agent to the PKGBUILD. In bluez-4.71 (bluez4), there appears to be no more utils release; (last one was bluez-utils-3.36). Looking thru the source right now to see if there's some sort of equivalent utility. Anybody know what's up in the most recent release of bluez? Thanks in advance, -PEM ---------- Forwarded message ---------- From: Paul Matz Date: Mon, Sep 20, 2010 at 1:11 PM Subject: Overo running OE 2.6.34 Bluetooth Serial Device; Problem: cannot open /dev/rfcomm0: Connection refused or No such file or directory To: gumstix-users@lists.sourceforge.net We are trying to read input from a Bluetooth embedded serial device. We are using the bluez4-4.66-r7.0 stack in Open Embedded 2.6.34. We have been assuming that once the serial BT device pairs and connects, that we can use rfcomm to map it to a /dev/rfcomm0 serial device that we can open and read. The BT serial device is sending data out continuously.  We find that we can pair it with other systems - Windows for example - and see serial data blasting out of it. A lot works, but not enough.  Unsure if pairing is happening successfully.  Can't seem to get debug info to turn on,  (Tried launching bluetoothd with -d, but doesn't seem to help). Here's what we see. root@overo:~# hcitool scan Scanning ...         34:15:9E:90:D9:E6       ODG10050         00:12:A1:B0:5B:4A       SPP-B root@overo:~# hcitool inq Inquiring ...         34:15:9E:90:D9:E6       clock offset: 0x4129    class: 0x38010c         00:12:A1:B0:5B:4A       clock offset: 0x3305    class: 0x001f00 (The serial device, SPP-B, does have a weird class; not sure if this is OK or not). root@overo:~# hciconfig -a hci0:   Type: BR/EDR  Bus: UART         BD Address: 00:19:88:39:F3:90  ACL MTU: 310:10  SCO MTU: 64:8         UP RUNNING PSCAN         RX bytes:1419 acl:0 sco:0 events:51 errors:0         TX bytes:389 acl:0 sco:0 commands:26 errors:0         Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80         Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3         Link policy: RSWITCH HOLD SNIFF PARK         Link mode: SLAVE ACCEPT         Name: 'overo-0'         Class: 0x4a0100         Service Classes: Networking, Capturing, Telephony         Device Class: Computer, Uncategorized         HCI Version: 2.0 (0x3)  Revision: 0xc5c         LMP Version: 2.0 (0x3)  Subversion: 0xc5c         Manufacturer: Cambridge Silicon Radio (10) root@overo:~# hcitool info 00:12:A1:B0:5B:4A Requesting information ...         BD Address:  00:12:A1:B0:5B:4A         Device Name: SPP-B         LMP Version: 2.0 (0x3) LMP Subversion: 0x10b7         Manufacturer: Cambridge Silicon Radio (10)         Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80                 <3-slot packets> <5-slot packets>                                                                                                                                         <3-slot EDR ACL> <5-slot EDR ACL>                                   <3-slot EDR eSCO> root@overo:~# rfcomm bind 0 root@overo:~# rfcomm rfcomm0: 00:12:A1:B0:5B:4A channel 2 clean Processes running of interest:   PID TTY      STAT   TIME COMMAND   874 ?        S      0:00 /usr/sbin/hciattach -s 115200 ttyS1 csr 115200 noflow   878 ?        S