簡體   English   中英

raspberrypi 到 raspberrypi /bluetooth/errorcode 111,連接被拒絕

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

我正在學習 rasp pi3 b+

我想通過藍牙與 rasp pi - rasp pi 通信

已經設置pair,在cmd中互相連接(奇怪的情況:(命令)scan on >Relative address沒有出現,但是pair add,connect add是成功的)

我輸入了如下的繩索

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”后

發生了錯誤

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

請幫幫我...

鏈路另一端的設備是什么?

遠程設備是否支持 RFCOMM 或串行端口配置文件 (SPP)?

您可以通過以下方式查看遠程設備的服務列表:

bluetoothctl info <mac_address_of_remote_Device>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM