首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >raspberrypi到raspberrypi /bluetooth/errorcode 111,连接被拒绝

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

Stack Overflow用户
提问于 2020-07-11 17:38:25
回答 1查看 105关注 0票数 0

我正在学习rasp pi3 b+

我想通过蓝牙与rasp pi - rasp pi进行通信

已经设置成对,在cmd中互相连接(奇怪的情况:(命令)scan on >Relative address没有出现,但是pair add,connect add成功)

我输入了下面的代码

代码语言:javascript
复制
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()

在cmd中输入"python filename.penter code herey“之后

发生错误

代码语言:javascript
复制
bluetooth.btcommon.BluetoothError: (111, "connection refused')

请帮帮我。

EN

回答 1

Stack Overflow用户

发布于 2020-07-11 21:43:24

链路另一端的设备是什么?

远程设备是否支持RFCOMM或串行端口配置文件(SPP)?

您可以使用以下命令查看远程设备的服务列表:

bluetoothctl info <mac_address_of_remote_Device>

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62847488

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档