1

I have a Pi 3 running Raspian Jessie Trying to connect an HMI application (AdvancedHMI - VB - .net running using mono) to a PLC (Velocio) via Modbus RTU. The PLC can handle direct USB comm input (works on a Windows PC) The AdvancedHMI applications have been proven to run fine on RPi using mono

The difficulty is this: The AHMI app allows me to configure its comm driver to 'talk' via any named com port. On the PC, this works via USB as "COM1" (or 2, etc.)

My question is, how do I "name" one of the USB ports on the Pi so that I can call it from the AHMI application?

Using info found elsewhere in this forum, this is what I have.

Using hwinfo;

32: USB 00.0: 10200 Modem
  [Created at usb.122]
  Unique ID: dwDZ.fmlx_qPsbe1
  Parent ID: ADDn.IKhPgutgmvF
  SysFS ID: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.0
  SysFS BusID: 1-1.3:1.0
  Hardware Class: modem
  Model: "VelocioNetworks Virtual COM Port"
  Hotplug: USB
  Vendor: usb 0x1cbe "VelocioNetworks"
  Device: usb 0x0002 "Virtual COM Port"
  Revision: "1.00"
  Serial ID: "12345678"
  Driver: "cdc_acm"
  Driver Modules: "cdc_acm"
  Device File: /dev/ttyACM0
  Device Files: /dev/ttyACM0, /dev/serial/by-id/usb-VelocioNetworks_Virtual_COM_Port_12345678-if00, /dev/serial/by-path/platform-3f980000.usb-usb-0:1.3:1.0
  Speed: 12 Mbps
  Module Alias: "usb:v1CBEp0002d0100dc02dsc00dp00ic02isc02ip01in00"
  Driver Info #0:
    Driver Status: cdc_acm is active
    Driver Activation Cmd: "modprobe cdc_acm"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #39 (Hub)

33: USB 00.1: 0000 Unclassified device
  [Created at usb.122]
  Unique ID: 46Ud.sSsmD+3XTjA
  Parent ID: ADDn.IKhPgutgmvF
  SysFS ID: /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3/1-1.3:1.1
  SysFS BusID: 1-1.3:1.1
  Hardware Class: unknown
  Model: "VelocioNetworks Virtual COM Port"
  Hotplug: USB
  Vendor: usb 0x1cbe "VelocioNetworks"
  Device: usb 0x0002 "Virtual COM Port"
  Revision: "1.00"
  Serial ID: "12345678"
  Driver: "cdc_acm"
  Driver Modules: "cdc_acm"
  Speed: 12 Mbps
  Module Alias: "usb:v1CBEp0002d0100dc02dsc00dp00ic0Aisc00ip00in01"
  Config Status: cfg=new, avail=yes, need=no, active=unknown
  Attached to: #39 (Hub)

Using dmesg;

[297279.510219] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[297279.612906] usb 1-1.3: New USB device found, idVendor=1cbe, idProduct=0002
[297279.612927] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[297279.612940] usb 1-1.3: Product: Virtual COM Port
[297279.612952] usb 1-1.3: Manufacturer: VelocioNetworks  
[297279.612964] usb 1-1.3: SerialNumber: 12345678
[297279.647323] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
[297279.648291] usbcore: registered new interface driver cdc_acm
[297279.648303] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

[300148.333297] st: Version 20101219, fixed bufsize 32768, s/g segs 256
pi@raspberrypi:/dev $ 

Can anyone help me solve my dilemma ?

1 Answer 1

1

Without a deeper knowledge of what you want to achieve specifically, I would assume that you are looking for ttyACM0 or /dev/ttyACM0- this is the Raspberry's virtual com port via USB. Is it possible to call this from your AHMI application?


Update: It should be possible to set an alias for a port following this instruction and maybe this information helps as well. I haven't tried it, though.

2
  • I'll give it a try. Is there a way to 'alias' the port ? i.e. b able to address it as "COMn" ?
    – WayneW
    Commented Nov 3, 2016 at 2:26
  • Yes, see updated answer. Commented Nov 3, 2016 at 12:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.