Can I use a USB-to-serial adapter to talk to my de

2019-03-22 04:36发布

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?

7条回答
Viruses.
2楼-- · 2019-03-22 05:01

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.

查看更多
欢心
3楼-- · 2019-03-22 05:02

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.

查看更多
冷血范
4楼-- · 2019-03-22 05:04

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).

查看更多
Animai°情兽
5楼-- · 2019-03-22 05:05

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

查看更多
6楼-- · 2019-03-22 05:14

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.

查看更多
对你真心纯属浪费
7楼-- · 2019-03-22 05:15

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.

查看更多
登录 后发表回答