如何写入 USB 而不显示为串行设备

发布于 2025-01-03 00:57:20 字数 1287 浏览 1 评论 0原文

作为一个宠物项目,我想通过 USB 从血糖仪中获取数据。但该设备不会显示为串行设备。我需要帮助来确定我的下一步是什么,非常欢迎文档和/或示例。

这是我第一次尝试通过 USB 进行通信。

我仅从 nrjavaserial 获取这些列为串行设备的设备(我使用的是 Mac):

/dev/cu.Bluetooth-PDA-Sync
/dev/tty.Bluetooth-Modem

但如果我运行下面的命令,我可以看到有关该设备的信息:

$ system_profiler SPUSBDataType

Hub:
      Product ID: 0x2513
      Vendor ID: 0x0424  (SMSC)
      Version:  b.b3
      Speed: Up to 480 Mb/sec
      Location ID: 0xfd100000 / 2
      Current Available (mA): 500
      Current Required (mA): 2

        Abbott Stereo Plug Cable:

          Product ID: 0x3410
          Vendor ID: 0x1a61  (Abbott Diabetes Care)
          Version: 1,01
          Speed: Up to 12 Mb/sec
          Manufacturer: Abbott Labs
          Location ID: 0xfd120000 / 4
          Current Available (mA): 500
          Current Required (mA): Unknown (Device has not been configured)

当我在 Linux 中测试类似的命令(lsusb 和 ls /dev/ttyS*)时,它没有被列为串行设备,这让我认为我缺少一些东西 明显的。

我见过有人使用 C# 和串行 USB 与类似设备进行通信的示例 (The-Beginnings-of-a-Glucose-Meter-Downloader) 这让我相信我应该能够做到与此设备相同。

As a pet project I want to get data out of a Glucose Meter over USB. But the device won't show up as a serial device. I need help figuring out what my next step would be, documentation and/or examples are very welcome.

This is my first take at communicating with something over USB.

I only get these devices listed as serial devices from nrjavaserial (I'm on a Mac):

/dev/cu.Bluetooth-PDA-Sync
/dev/tty.Bluetooth-Modem

but if I run the command below I can see information about the device:

$ system_profiler SPUSBDataType

Hub:
      Product ID: 0x2513
      Vendor ID: 0x0424  (SMSC)
      Version:  b.b3
      Speed: Up to 480 Mb/sec
      Location ID: 0xfd100000 / 2
      Current Available (mA): 500
      Current Required (mA): 2

        Abbott Stereo Plug Cable:

          Product ID: 0x3410
          Vendor ID: 0x1a61  (Abbott Diabetes Care)
          Version: 1,01
          Speed: Up to 12 Mb/sec
          Manufacturer: Abbott Labs
          Location ID: 0xfd120000 / 4
          Current Available (mA): 500
          Current Required (mA): Unknown (Device has not been configured)

When I tested the similar commands in Linux (lsusb and ls /dev/ttyS*) and it is not listed as a Serial device there neither which makes me think that I'm missing something obvious.

I've seen an example of someone using C# and Serial USB to communicate with a similar device (The-Beginnings-of-a-Glucose-Meter-Downloader) which makes me believe that I should be able to do the same with this device.

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

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

发布评论

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

评论(1

梦太阳 2025-01-10 00:57:20

正如 Brad 建议的那样,答案是找到正确的 USB 驱动程序。在我的例子中,productId 是 0x3410,它是 TUSB3410 串行到 USB 适配器电缆。

以下是我最终在 Linux 中获得工作串行端口所做的事情:
sudo modprobe ti_usb_3410_5052vendor_3410=0x1a61product_3410=0x3410

之后,我可以将命令 mem 发送到我的 Abbott Freestyle Lite 并获取读数,非常好。

我还有一个非官方 Mac OS X 驱动程序还没有尝试过。

The answer was to, as Brad suggested, find out the correct USB Driver. In my case the productId was 0x3410 which is the TUSB3410 Serial to USB adapter cable.

Here is what I did to finally get a working Serial port in Linux:
sudo modprobe ti_usb_3410_5052 vendor_3410=0x1a61 product_3410=0x3410

After that I could send the command mem into my Abbott Freestyle Lite and get the readings back, very nice.

There is also an unofficial Mac OS X driver that I have not tried yet.

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