Serial Console Over USB Gadget Serial Driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

is it possible in general to have a serial console output over USB gadget port? I have a device using U-Boot and Linux. In U-Boot a serial console over USB gadget works fine but I get stucked on Linux.

If U-Boot boots on the target, on the host a ttyACM0 device appears which can be connected to using minicom. After loading the kernel image into the device's RAM and booting it, minicom looses the connection to ttyACM0. Instead a new device appears on the host called ttyACM1. But if I try connecting to it minicom locks in "modem initialization" state... Thus, the kernel boot is a kind of black box for me since I cant see whats going on there (Maybe there is a kernel oops?). But it seems that it can initialize the serial USB gadget port because of the ttyACM1 device on the host.

Here is my kernel config / what I've done so far / kernel host output:

Device's USB serial / gadget kernel config:
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y

CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y

CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_CONSOLE=y
CONFIG_USB_SERIAL_GENERIC=y

CONFIG_USB_GADGET_MUSB_HDRC=y
CONFIG_USB_GADGET=y

CONFIG_USB_GADGET_VBUS_DRAW=2
CONFIG_USB_GADGET_SELECTED=y

CONFIG_USB_GADGET_DUALSPEED=y


What I've done so far on the device's U-Boot console:

OMAP3 beagleboard.org # mmc init
mmc1 is available
OMAP3 beagleboard.org # fatload mmc 0:2 0x80300000 uImage
reading uImage

1991316 bytes read
OMAP3 beagleboard.org # fatload mmc 0:2 0x81600000 rd-ext2.bin
reading rd-ext2.bin

3394477 bytes rea' - try 'help'
OMAP3 beagleboard.org #
OMAP3 beagleboard.org #
OMAP3 beagleboard.org #
OMAP3 beagleboard.org # setenv bootargs console=ttyGS0,115200n8 ramdisk_size=8192 root=/dev/ram0 rw initrd=0x81600000,8M nohz=off rootfstype=ext2
OMAP3 beagleboard.org # bootm 0x80300000

And last but not least the kernel output on the host:
redwing@euklid:~$ dmesg
usb 2-1: USB disconnect, address 6
usb 2-1: new high speed USB device using ehci_hcd and address 7
usb 2-1: config 1 interface 0 altsetting 0 endpoint 0x81 has an invalid bInterval 255, changing to 11
usb 2-1: configuration #1 chosen from 1 choice
cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 2-1:1.0: ttyACM0: USB ACM device
<--- This is after booting U-Boot with working serial console on ttyACM0.
usb 2-1: USB disconnect, address 7
tty_port_close_start: count = -1
usb 2-1: new high speed USB device using ehci_hcd and address 8
hub 2-0:1.0: unable to enumerate USB device on port 1
tty_port_close_start: count = -1
usb 2-1: new high speed USB device using ehci_hcd and address 9
usb 2-1: configuration #2 chosen from 1 choice
cdc_acm 2-1:2.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 2-1:2.0: ttyACM1: USB ACM device
<--- This is after kernel startup

Do you have any suggestions for me? Is it possible to have a serial console via USB gadget or at least the kernel output? Any help on this issue would be very appreciated.

If you need additional information, please let me know.

Kind Regards,
Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux