我正在学习rasp pi3 b+
我想通过蓝牙与rasp pi - rasp pi进行通信
已经设置成对,在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')请帮帮我。
发布于 2020-07-11 21:43:24
链路另一端的设备是什么?
远程设备是否支持RFCOMM或串行端口配置文件(SPP)?
您可以使用以下命令查看远程设备的服务列表:
bluetoothctl info <mac_address_of_remote_Device>
https://stackoverflow.com/questions/62847488
复制相似问题