我可以使用 USB 转串口适配器通过 VMWare Fusion 与我的开发板通信吗?

发布于 2024-08-12 14:54:12 字数 140 浏览 5 评论 0原文

我有一个在 VMWare Fusion(在 Mac OS X 上)上运行的 Linux 虚拟机,我打算将其用作嵌入式系统的开发环境。我的 Linux VM 是否可以使用 USB 转串口适配器与我的嵌入式系统的串行端口通信?关于我应该购买哪种类型的适配器有什么建议吗?

I have a Linux virtual machine running on VMWare Fusion (on Mac OS X) that I intend to use as a development environment for an embedded system. Would it be possible for my Linux VM to talk to my embedded system's serial port using a USB-to-serial adapter? Any recommendations for what sort of adapter I should get?

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

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

发布评论

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

评论(7

猫瑾少女 2024-08-19 14:54:13

有两种方法可以做到这一点:

  1. 您的主机操作系统支持您的 USB<-> 串行转换器(很可能)。如果是这样,您可以只允许您的虚拟机与串行端口通信。如果是这样,VM 将看到一个标准串行端口,一切都会好起来。

  2. VM 中的来宾操作系统支持 USB<-> 串行转换器,并且您的主机操作系统允许原始 USB 转发。

总而言之,它工作的可能性很大。

顺便说一句:USB<->串行转换器有好有坏 。如果您发现串行连接似乎可以工作(几秒钟内一切都按预期检测/工作),但您无法在较长时间内获得可靠的连接,那么很可能是 USB<-> 损坏了。串行加密狗很糟糕……

一分钱一分货……在购买这些东西时,我会检查 comp.arch.embedded 并询问哪些 USB 加密狗可以正常工作,哪些不能。 (我的建议是坚持使用 Assmann 的产品。您可以在 digikey 上订购)。

There are two ways to do it:

  1. Your host-OS supports your USB<->serial converter (very likely). If so you can just allow your VM to talk to the serial port. If so the VM will see a standard serial port and everything will be fine.

  2. Your guest-os in the VM supports the USB<->serial converter, AND your host-OS allows raw USB forwarding.

All in all the chances are good that it works..

Btw: there are good and bad USB<->Serial converters. If you find out that the serial connection seems to work (everything detects/works as expected for a couple of seconds), but you can't get a reliable connection for a longer time, then it's very possible that the usb<->serial dongle sucks....

You get what you pay for... When buying these things I'd check comp.arch.embedded and ask which usb dongles are known to just work, and which not. (My recommendation is to stick with products from Assmann. You can order them at digikey).

乱了心跳 2024-08-19 14:54:13

我发现 USB 串行适配器有点受欢迎。怀念嵌入式工作。需要注意的一件事是,缓冲的工作方式往往与“真实”串行端口不同,并且字符通过系统的延迟可能变化很大。一些嵌入式开发系统(例如引导加载程序、廉价的 JTAG 探针等)可能对此非常敏感,并且会出现超时等情况。

请注意,这不仅适用于 USB 串行适配器,我在高端多端口串行卡上也遇到过类似的问题,但通常您可以调整 FIFO / IRQ 设置来使其正常工作。

I've found USB serial adaptors to be a bit hit & miss with embedded work. One thing to be aware of is that the buffering tends to work differently from "real" serial ports, and latency of characters through the system can be quite variable. Some embedded development systems (think bootloaders, cheap JTAG probes etc) can be quite sensitive to this and will give timeouts and so on.

Note this doesn't only apply to USB serial adaptors, I've had similar problems with high end multi-port serial cards, but usually with those you can tweak the FIFO / IRQ settings to get something working.

苏别ゝ 2024-08-19 14:54:13

我体验过带有 FTDI 芯片组的 USB 转串口适配器与 Prolific 芯片组相比,驱动程序更可靠且与更多设备兼容

I have experienced that a USB to serial adapter with a FTDI chipset and drivers is more reliable and compatible with more devices than the Prolific chipset

最后的乘客 2024-08-19 14:54:13

取决于 VM 软件,但 VMWare Fusion 确实支持 USB 设备。问题是,您的 IDE 是否支持与 USB 设备而不是老式串行端口通信?对于 Linux,可能是的。

Depends upon the VM software, but VMWare Fusion does support USB devices. The question becomes, does your IDE support talking to a USB device instead of an old-fashioned serial port? With Linux, probably yes.

情话难免假 2024-08-19 14:54:13

我在使用 ATEN 串行适配器时没有遇到任何问题。

USB 串行适配器是 USB 标准设备(就像大容量存储一样),这意味着任何 USB 兼容适配器都应该可以工作。

I had no problems whit serial adapters from ATEN.

USB serial adapter is USB standard device (just like mass storage) that mean that any USB compliant adapter should work.

小兔几 2024-08-19 14:54:13

pl2303:我发现这个设备非常可靠,并且经常出现在通用且廉价的 USB 转 RS232 适配器中。我见过昂贵的适配器失败,而我的 geeks.com 通用适配器工作得很好。

pl2303: I have found this device to be very reliable and are often in the generic and cheap USB to RS232 adapters. I've seen expensive adapters fail and my generic adapter from geeks.com work great.

寒江雪… 2024-08-19 14:54:13

我刚刚以 10 美元的价格从 WeirdStuff 购买了一个 USB 1.1 - RS232 适配器 (Digitus DA-70119)。我将其插入 Mac mini,VMWare Fusion 向我展示了这一点。

输入图片此处描述

单击 USB 图标后,我的 Ubuntu 9.10 VM 可以轻松看到它

$ lsusb
Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

$ dmesg
    usb 2-1: new full speed USB device using uhci_hcd and address 4
    usb 2-1: configuration #1 chosen from 1 choice
    pl2303 2-1:1.0: pl2303 converter detected
    usb 2-1: pl2303 converter now attached to ttyUSB0

我现在可以在 Linux VM 中使用 /dev/ttyUSB0 与我的目标系统通信。

I just picked up a USB 1.1 - RS232 adapter (Digitus DA-70119) from WeirdStuff for 10 bucks. I plugged it into my Mac mini and VMWare Fusion showed me this.

enter image description here

Once I clicked on the USB icon, my Ubuntu 9.10 VM had no trouble seeing it

$ lsusb
Bus 002 Device 004: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

$ dmesg
    usb 2-1: new full speed USB device using uhci_hcd and address 4
    usb 2-1: configuration #1 chosen from 1 choice
    pl2303 2-1:1.0: pl2303 converter detected
    usb 2-1: pl2303 converter now attached to ttyUSB0

I can now use /dev/ttyUSB0 in my Linux VM to talk to my target system.

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