I want to connect two raspberry pi B's to Bluetooth.

Asked 2 years ago, Updated 2 years ago, 105 views

As the title says, I would like to connect two raspberry pi Bs to Bluetooth.

$bluetoothctl
[bluetooth] #agentDisplayYesNo
[bluetooth] #pair<addr>
Attempting to pair with <addr>
Failed to pair: org.bluez.Error.AlreadyExists
[bluetooth]#connect<addr>
Attempting to connect to <addr>
[CHG] Device <addr>Connected:yes
Failed to connect: org.bluez.Error.NotAvailable
[CHG] Device <addr>Connected: no

Next, no further connection has been established.
As a countermeasure,

[bluetooth]#remove<addr>

Re-connect the device from scan on,

 sudo reboot

I rebooted in , but the result remains the same.

As a bluetooth dongle,
iBuffalo Bluetooth 4.0+EDR/LE
is used.
If you have the same problem, I'd appreciate it if you could give me some advice.

raspberry-pi bluetooth

2022-09-30 21:24

1 Answers

It's settled.
I gave up trying to establish a connection, and as soon as I paired it, I was able to execute the following commands to communicate with the serial port.

 raspberrypi#1 $sudorfcomm listen/dev/rfcomm022 

raspberrypi#2$sudorfcomm connect<addr#1>22

It seems impossible to simply establish a connection, and it was necessary to establish a connection after publishing the service you provided.


2022-09-30 21:24

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.