Jump to content

SB Gadget Serial (g_serial) not working on Noble 6.12.51 build NanoPi Duo


Recommended Posts

Posted

I built an unofficial Armbian 6.12.51 (Noble) image using the build tool:

 

Armbian-unofficial_25.11.0-trunk_Nanopiduo_noble_current_6.12.51.img

 

I am trying to get the micro-USB port to work as a USB serial gadget (g_serial / libcomposite).

 

What I have done / observed:

 

g_serial and libcomposite modules are loaded:

lsmod | grep g_serial g_serial 12288 0 libcomposite 49152 2 g_serial,usb_f_acm

 

ConfigFS is mounted:

mount | grep configfs configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)

 

UDC exists:

ls /sys/class/udc/ musb-hdrc.2.auto

 

Gadget folder does not exist:

ls /sys/kernel/config/usb_gadget/ # output: empty

 

Trying to manually bind a gadget fails:

echo musb-hdrc.2.auto | sudo tee /sys/kernel/config/usb_gadget/g1/UDC # Output: tee: UDC: Device or resource busy

 

Current UDC mode:

cat /sys/class/udc/musb-hdrc.2.auto/device/mode b_idle

 

There is no /sys/class/usb_role/usb0/role available to force device mode.

 

This setup works fine on Jammy kernel, same cable, same SD card rootfs.

 

Problem:

 

The OTG controller comes up in b_idle mode, preventing the USB gadget from binding. /dev/ttyACM0 never appears on the host PC. It seems like the device tree / overlay for Noble 6.12.51 is not configuring the OTG port for peripheral mode.

 

What I want:

 

USB serial gadget (g_serial) working over the micro-USB port on Noble 6.12.51 build.

Any advice on the correct overlay or device tree modification needed to bring the OTG port into device mode at boot.

 

Extra info:

CONFIG_USB_CONFIGFS_SERIAL=y in kernel

CONFIG_USB_LIBCOMPOSITE compiled as module

Micro-USB cable confirmed working with Jammy kernel

Modules: libcomposite, g_serial, usb_f_acm present

 

Thanks in advance for guidance!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines