Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

Bluez and serial communcations

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
abduct
Apprentice
Apprentice
Posts: 222
Joined: Thu Mar 19, 2015 6:51 am

Bluez and serial communcations

  • Quote

Post by abduct » Mon Nov 05, 2018 6:24 pm

Hi, I have a piece of bluetooth hardware that uses serial communications to deliver data to and from the device.

I have successfully discovered, paired, and trusted the device, but when I attempt to connect I get the following log:

Code: Select all

[bluetooth]# connect 00:13:43:42:D6:8B
Attempting to connect to 00:13:43:42:D6:8B
[CHG] Device 00:13:43:42:D6:8B Connected: yes
[CHG] Device 00:13:43:42:D6:8B ServicesResolved: yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device 00:13:43:42:D6:8B ServicesResolved: no
[CHG] Device 00:13:43:42:D6:8B Connected: no
[CHG] Device 00:13:43:42:D6:8B LegacyPairing: yes
[CHG] Device 00:13:43:42:D6:8B LegacyPairing: no
[CHG] Device 00:13:43:42:D6:8B LegacyPairing: yes
[CHG] Device 00:13:43:42:D6:8B LegacyPairing: no
[CHG] Device 00:13:43:42:D6:8B LegacyPairing: yes
[CHG] Device 00:13:43:42:D6:8B LegacyPairing: no
I have googled this and it appears I may be missing a serial profile (SPP), but I can't find any concrete ways to enable this. Likewise I no longer have utilities such as RFCOMM. I have tried emerging with depreciated and extra-tools useflags, but I still am missing a lot of tools. I have enabled all kernel related bluetooth options.

How can I get bluez to connect to this device, as well as give me utilities such as RFCOMM.

Thanks.

Edit:: After a little more digging I edited `/etc/init.d/bluetooth` to run the bluetoothd command with -C compatibility mode, and It seems to connect, but after removing the bluetooth device (untrust, remove) and repairing and attempting to connect again, I get `Failed to connect: org.bluez.Error.NotAvailable` after pairing and attempting to connect.

Edit2:: I seem to be getting a lot of `[ 4323.138748] Bluetooth: hci0: last event is not cmd complete (0x0f)` in my dmesg. Not sure what it means.

Edit3:: I got the rfcomm tool installed, I must of typod the depreciated use flag. Although when trying to pair now via bluetoothctl I get `Failed to pair: org.bluez.Error.AuthenticationCanceled` after about 10 seconds of it being "connected"

Edit4:: After a bit of digging this piece of hardware uses the createInsecureRfcommSocket method in Android, Is there a way to mimic this connection standard? I am not positive, but I think I need to authenticate using a UUID? Might explain the reason for the AuthenticationCanceled error?
Top
abduct
Apprentice
Apprentice
Posts: 222
Joined: Thu Mar 19, 2015 6:51 am

  • Quote

Post by abduct » Mon Nov 05, 2018 9:25 pm

No idea why, but it seems to be working now.

I had to manually launch

Code: Select all

/usr/libexec/bluetooth/bluetoothd -C
to get compatibility mode. Afterwards I ran

Code: Select all

hciconfig hci0 up
rfcomm -i hci0 connect /dev/rfcomm0 addr 5
Meanwhile `bluetoothctl` was running in the background and seemed to automatically pair and connect when the rfcomm command is ran.
Top
Post Reply

2 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic