Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
serial terminal port does not appear
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
marinosk_81
n00b
n00b


Joined: 20 Dec 2016
Posts: 14

PostPosted: Mon Feb 13, 2017 11:13 am    Post subject: serial terminal port does not appear Reply with quote

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?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43184
Location: 56N 3W

PostPosted: Mon Feb 13, 2017 12:44 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
marinosk_81
n00b
n00b


Joined: 20 Dec 2016
Posts: 14

PostPosted: Mon Feb 13, 2017 2:12 pm    Post subject: Reply with quote

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

Code:
Bus 001 Device 005: ID 0525:a4aa Netchip Technology, Inc. Linux-USB CDC Composite Gadge (Ethernet and ACM)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43184
Location: 56N 3W

PostPosted: Mon Feb 13, 2017 3:22 pm    Post subject: Reply with quote

marinosk_81,

It looks like you need the
Code:
< >     CDC Composite Device (Ethernet and ACM) (NEW)
option on the
Code:
> Device Drivers > USB support > USB Gadget Support
menu.

Grepping the entire kernel for your device ID
Code:
/usr/src/linux $ grep -R -i a4aa ./

Returns a lot of rubbish and
Code:
./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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
marinosk_81
n00b
n00b


Joined: 20 Dec 2016
Posts: 14

PostPosted: Tue Feb 14, 2017 12:54 pm    Post subject: Reply with quote

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)

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


the output of udevadm monitor when connecting the device is

Code:
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)

Code:
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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43184
Location: 56N 3W

PostPosted: Tue Feb 14, 2017 5:00 pm    Post subject: Reply with quote

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.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
marinosk_81
n00b
n00b


Joined: 20 Dec 2016
Posts: 14

PostPosted: Tue Feb 14, 2017 5:18 pm    Post subject: Reply with quote

the relevant part from dmesg is this:

Code:
[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
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43184
Location: 56N 3W

PostPosted: Tue Feb 14, 2017 6:55 pm    Post subject: Reply with quote

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
Code:
uname -a
that the build time of the running kernel. Is it what you expected?
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
marinosk_81
n00b
n00b


Joined: 20 Dec 2016
Posts: 14

PostPosted: Tue Feb 14, 2017 7:58 pm    Post subject: Reply with quote

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

uname -a ->
Code:
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
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum