# serial terminal port does not appear

## marinosk_81

I am trying to access a single-board computer through the serial terminal (C.H.I.P. from getchip.com). The problem is that whenever I connect the device with the usb the port is not automatically generated. With other operating systems I get a /dev/tty.usbXXX or /dev/ttyUSBXX port automatically generated. I can confirm that device is indeed seen by the system (both lsusb and dmesq report that it is there). It's just that the port is not automatically created. I have no experience with that sort of things so I'm probably missing something simple here. Maybe I need to recompile my kernel with some particular setting added? Maybe I need some special udev rule?

----------

## NeddySeagoon

marinosk_81,

You probably need to rebuild your kernel.  Devices being seen by lsusb and/or dmesg only means that the device IDs havu been read from the device.

They may be used te load the driver, if its available.

Please post the output of lsusb, with the device connected, so we can work out which driver you need.

We only need the line showing the device.

----------

## marinosk_81

Hi, thx for the help. The output is this: 

```
Bus 001 Device 005: ID 0525:a4aa Netchip Technology, Inc. Linux-USB CDC Composite Gadge (Ethernet and ACM)

```

----------

## NeddySeagoon

marinosk_81,

It looks like you need the 

```
< >     CDC Composite Device (Ethernet and ACM) (NEW)
```

option on the

```
> Device Drivers > USB support > USB Gadget Support
```

menu.

Grepping the entire kernel for your device ID 

```
/usr/src/linux $ grep -R -i a4aa ./
```

Returns a lot of rubbish and 

```
./drivers/usb/gadget/legacy/cdc2.c:#define CDC_PRODUCT_NUM      0xa4aa   /* CDC Composite: ECM + ACM */
```

which matches your device, so your need the option in the kernel that builds the file./drivers/usb/gadget/legacy/cdc2.c

Your serial port may be called /dev/ttyACMxx

On its own, this may not be everything you need.

----------

## marinosk_81

I've compiled the driver into the kernel (built-in, not as a module) and added this as a udev rule (/etc/udev/rules.d/99-rule.rules)

```
SUBSYSTEM=="tty", ATTRS{idVendor}=="0525", ATTRS{idProduct}=="a4aa", SYMLINK+="COM1l, MODE=660"
```

the output of udevadm monitor when connecting the device is

```
KERNEL[49698.013340] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1 (usb)

KERNEL[49698.022758] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.0 (usb)

KERNEL[49698.022871] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.1 (usb)

KERNEL[49698.022975] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.2 (usb)

KERNEL[49698.023141] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.3 (usb)

UDEV  [49698.027494] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1 (usb)

UDEV  [49698.035377] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.1 (usb)

UDEV  [49698.040634] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.2 (usb)

UDEV  [49698.041457] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.0 (usb)

UDEV  [49698.042785] add      /devices/pci0000:00/0000:00:04.1/usb1/1-1/1-1:1.3 (usb)

```

the output of lsusb is (as before)

```
Bus 001 Device 009: ID 0525:a4aa Netchip Technology, Inc. Linux-USB CDC Composite Gadge (Ethernet and ACM)

```

I still can't see anything relevant in /dev, any other ideas?

m

----------

## NeddySeagoon

marinosk_81,

Your udev rule only adds a symlink.

What does dmesg say when you plug the device in once the system is booted?

Use wgetpaste to put it on a pastebin, as it won't fit in a post.

----------

## marinosk_81

the relevant part from dmesg is this: 

```
[55984.848029] usb 1-1: new high-speed USB device number 10 using ehci-pci

[55984.967081] usb 1-1: New USB device found, idVendor=0525, idProduct=a4aa

[55984.967084] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[55984.967086] usb 1-1: Product: CDC Composite Gadget

[55984.967088] usb 1-1: Manufacturer: Linux 4.4.11-ntc with musb-hdrc

```

----------

## NeddySeagoon

marinosk_81,

I like to see all of dmesg. Just in case you missed something.

If that's correct, its all there is, it looks like you are not running your new kernel. 

Look at the time and date in 

```
uname -a
```

that the build time of the running kernel.  Is it what you expected?

----------

## marinosk_81

dmesg -> https://paste.pound-python.org/show/uBdPail5NSJvq1SVMWxA/

uname -a -> 

```
Linux argento-funtoo 4.9.9-gentoo #1 SMP PREEMPT Mon Feb 13 18:58:22 EET 2017 x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux
```

cat /usr/src/linux/.config ->  https://paste.pound-python.org/show/HiZdUV4tqAiveH7xVTby/

I do see some errors in the dmesg, not sure if they are relevant tho. thanks

----------

