我可以使用蓝牙适配器连接到多个蓝牙设备吗?

我可以使用蓝牙适配器连接到多个蓝牙设备吗?

我在 PI 2 上使用 USB 蓝牙适配器,它使用 HC-06 蓝牙模块与 arduino 进行通信。运行此脚本以连接到该模块:

#! /usr/bin/python

import serial
from time import sleep

    bluetoothSerial = serial.Serial( "/dev/rfcomm1", baudrate=9600 )

    count = None
    while count == None:
        try:
            count = int(raw_input( "Please enter the number of times to blink the L$
        except:
            pass    # Ignore any errors that may occur and try again


    bluetoothSerial.write( str(count) )
    print bluetoothSerial.readline()

这就是我的 /etc/bluetooth/rfcomm.conf 的样子:

rfcomm1 {
    bind yes;
    device xx:xx:xx:xx:xx:xx;
    channel 1;
    comment "Connection to Bluetooth serial module";
}

现在,我想要另一个 arduino 和另一个 HC-6 连接到我的 USB 蓝牙。可以同时进行吗?我想要同时从这两个 HC-06 进行双向数据连接。

为了获得更多参考,我按照本教程来运行第一个蓝牙: http://www.uugear.com/portfolio/bluetooth-communication- Between-raspberry-pi-and-arduino/

相关内容