You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

配置Windows主机与Ubuntu虚拟机间的串口COM端口连接

Hey there! Let's work through this serial communication challenge you're facing with your Samsung Artik710 (running Ubuntu) in VirtualBox—especially since your go-to serial app only works on Windows. I’ve got a few practical solutions based on your mention of trying virtual ports, plus some alternatives to make this smoother:

Solution 1: Bridge Virtual Serial Ports Between Windows (Host/VM) and Ubuntu VM

Since you already started with virtual ports, let’s refine that approach using a virtual serial pair and VirtualBox’s pipe mapping:

  • First, on your Windows system (whether it’s your physical host or a Windows VM in VirtualBox), install a tool like com0com to create a paired set of virtual serial ports (e.g., COM3 ↔ COM4). These ports act as a bridge—data sent to one goes straight to the other.
  • For your Ubuntu VM in VirtualBox:
    1. Shut down the VM first (settings won’t apply if it’s running).
    2. Go to Settings → Ports → Serial Ports.
    3. Check "Enable Serial Port", set the port number to COM1 (this maps to /dev/ttyS0 in Ubuntu).
    4. Under "Port Mode", select Host Pipe, then enter a pipe path like \\.\pipe\artik_serial (Windows-style path if your host is Windows, or /tmp/artik_serial if your host is Linux).
    5. Toggle "Create Pipe" if it’s not already checked, then save settings.
  • Back on Windows, configure one of your com0com virtual ports (e.g., COM4) to connect to that same pipe. Now, when you open COM3 in your Windows serial app, it’ll talk directly to /dev/ttyS0 in your Ubuntu VM.
Solution 2: Pass Through Physical Serial Port to Ubuntu VM

If your Samsung Artik710 is connected to your host machine via a physical RS232/USB-serial adapter, you can pass that device straight to your Ubuntu VM:

  • Shut down the Ubuntu VM.
  • Open VirtualBox Settings → Ports → Serial Ports.
  • Check "Enable Serial Port", set port number to COM1.
  • Under "Port Mode", select Host Device, then pick your physical serial adapter from the dropdown list (it’ll look like /dev/ttyUSB0 on Linux hosts or a COM port on Windows hosts).
  • Boot up the Ubuntu VM, then run ls /dev/tty* to confirm the device is visible. You may need to add your user to the dialout group first to access it:
    sudo usermod -aG dialout $USER
    
    Log out and back in for this change to take effect.
Solution 3: Ditch the Windows App—Use Ubuntu Native Serial Tools

If you’d rather avoid juggling VMs and virtual ports, Ubuntu has great native tools that can replace your Windows serial app:

  • screen: A lightweight command-line tool. Install it with sudo apt install screen, then connect to your serial port with:
    screen /dev/ttyS0 9600 8N1
    
    (Replace /dev/ttyS0 with your actual device, 9600 with your baud rate, and 8N1 with your data/parity/stop bit settings.)
  • minicom: A more feature-rich CLI tool with menus for configuration. Install with sudo apt install minicom, then run sudo minicom -s to set up your port settings.
  • gtkterm: A graphical serial tool if you prefer a GUI. Install with sudo apt install gtkterm, then select your port and configure parameters from the menu.
Quick Pro Tips
  • Always double-check that your serial parameters (baud rate, data bits, stop bits, parity) match exactly between your app/tool and the Artik710—mismatches cause garbled data or no communication at all.
  • If you’re having trouble seeing the serial device in Ubuntu, run dmesg | grep tty right after plugging in the adapter—it’ll show you the device path.

内容的提问来源于stack exchange,提问作者Itay Almani

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 02:29:54