Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/arduino/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过BLE连接到Arduino-Arduino可以成为主控吗?_Arduino_Bluetooth Lowenergy_Core Bluetooth - Fatal编程技术网

通过BLE连接到Arduino-Arduino可以成为主控吗?

通过BLE连接到Arduino-Arduino可以成为主控吗?,arduino,bluetooth-lowenergy,core-bluetooth,Arduino,Bluetooth Lowenergy,Core Bluetooth,我需要两台IOS设备通过ABLE连接到Arduino。我正在使用连接到Arduino的BLE调制解调器,并使用SoftwareSerial管理Arduino端的通信。我正在使用CoreBluetooth管理IOS端的通信。只要BLE调制解调器被配置为“从机”,这就可以正常工作。但我的理解是,如果它是一个奴隶,它将只支持与单个“主人”的通信。所以,既然我想让两台IOS设备与Arduino通话,我就需要Arduino成为主控设备,对吗 如果是,我该怎么做?如果Arduino是主设备,我需要在那一端有

我需要两台IOS设备通过ABLE连接到Arduino。我正在使用连接到Arduino的BLE调制解调器,并使用SoftwareSerial管理Arduino端的通信。我正在使用CoreBluetooth管理IOS端的通信。只要BLE调制解调器被配置为“从机”,这就可以正常工作。但我的理解是,如果它是一个奴隶,它将只支持与单个“主人”的通信。所以,既然我想让两台IOS设备与Arduino通话,我就需要Arduino成为主控设备,对吗

如果是,我该怎么做?如果Arduino是主设备,我需要在那一端有代码来扫描并连接到IOS设备,这将是从设备,对吗?我不知道怎么做。是否有我可以使用的文档或库?显然,我会关心Arduino上的代码大小

有人能给我指个正确的方向让它工作吗


谢谢。

这属于on,或者正确的术语是“中心”和“外围”。iOS可以充当外围设备。Arduino作为中心的能力将取决于您的BLE模块的能力以及它是否支持中心模式是的,我知道术语“中心”和“外围”。BLE模块确实支持在中央模式下工作,至少有at命令将其置于该模式,但据我所知,一旦进入该模式,我将自行编写逻辑以启动连接。我将在electronics.stackexchange.com上重新发布此信息。谢谢