简体   繁体   English

raspberrypi 到 raspberrypi /bluetooth/errorcode 111,连接被拒绝

[英]raspberrypi to raspberrypi /bluetooth/errorcode 111, connection refused

I'm studying rasp pi3 b+我正在学习 rasp pi3 b+

I want to communication rasp pi - rasp pi by Bluetooth我想通过蓝牙与 rasp pi - rasp pi 通信

already set pair, connect each other in cmd ( a strange situation: (command)scan on >Relative address doesn't appear, but pair add, connect add is a success)已经设置pair,在cmd中互相连接(奇怪的情况:(命令)scan on >Relative address没有出现,但是pair add,connect add是成功的)

and

I entered the cording as below我输入了如下的绳索

From Bluetooth import*

client_socket=BluetoothSocket(RFCOMM)
client_socket.connect(("Add , port"))

while True:
      msg = client_socket.recv(1024)
      print("receive msg: {}".format(msg))
client_socket.close()

    enter code here
    enter code here
    enter code here

----------------

another one

same ...
while True:
      msg=raw_input("send")
      print(msg)
      clinet_socket.send(msg)
client_socket.close()

after input "python filename.penter code herey " in cmd在 cmd 中输入“python filename.penter code herey”后

error occurred发生了错误

bluetooth.btcommon.BluetoothError: (111, "connection refused')

help me plz...请帮帮我...

What is the device on the other end of the link?链路另一端的设备是什么?

Does the remote device support RFCOMM or Serial Port Profile (SPP)?远程设备是否支持 RFCOMM 或串行端口配置文件 (SPP)?

You can see the list of services for the remote device with:您可以通过以下方式查看远程设备的服务列表:

bluetoothctl info <mac_address_of_remote_Device>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM