我必须制作一个与支持 Modbus 协议的设备进行通信的 iPhone 应用程序

发布于 2024-09-10 15:14:59 字数 129 浏览 9 评论 0原文

我必须能够进行无线通信,这意味着它要么是通过 WiFi 的 MODBUS TCP/IP,要么是通过蓝牙的 MODBUS RTU。我找不到任何带有 ObjectiveC 包装器的 modbus 实现,但我可以通过 C 库编写包装器。我该如何前进?

I have to be able to communicate wirelessly which means it would either be MODBUS TCP/IP over wifi or MODBUS RTU over bluetooth. I cannot find any modbus implementations with an objectiveC wrapper, but I can write the wrapper over a C library. How should I go forward?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

扬花落满肩 2024-09-17 15:14:59

您将无法使用蓝牙方法:iPhone 只能与通过蓝牙使用 iPhone 配件协议的设备进行通信。

不过无线网络应该可以用。使用 C 包装器也可以工作:objective-C 是 C 的超集,因此您应该能够不加修改地使用该库。

You won't be able to use the Bluetooth method: the iPhone can only talk to devices that use the iPhone Accessory Protocol over Bluetooth.

Wifi should work though. Using the C wrapper will also work: objective-C is a superset of C, so you should be able to use the library unmodified.

橙味迷妹 2024-09-17 15:14:59

以防万一有人遇到同样的问题,您可以购买 anybus box 将设备连接到网络,然后使用此 连接到它。

要通过蓝牙进行通信,您可以使用 BLE 和 RedBearLab 库,但可能需要自己创建框架。如果我找到一个图书馆,我会更新我的答案。

Just in case someone has the same problem you can buy an anybus box to connect the device to the network and then use this library to connect to it.

To communicate through Bluetooth you can use BLE and RedBearLab library but probably need to create the frames yourself. I'll update my answer if I find a library for that.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文