Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须能够无线通信,这意味着它可以是通过 wifi 的 MODBUS TCP/IP 或通过蓝牙的 MODBUS RTU。我找不到任何带有 ObjectiveC 包装器的 modbus 实现,但我可以在 C 库上编写包装器。我应该如何前进?
您将无法使用蓝牙方法:iPhone 只能通过蓝牙与使用 iPhone 附件协议的设备通信。
Wifi应该可以工作。使用 C 包装器也可以:objective-C 是 C 的超集,因此您应该能够使用未修改的库。
万一有人遇到同样的问题,您可以购买一个anybus 盒将设备连接到网络,然后使用此库连接到它。
要通过蓝牙进行通信,您可以使用 BLE 和 RedBearLab 库,但可能需要自己创建框架。如果我找到一个图书馆,我会更新我的答案。