Jump to content

NanoPi DUO2 microUSB serial stop working on 24.11.0


Slawek

Recommended Posts

Hi,

 

I'm using Nanopi DUO2 for few IoT projects. Using the microUSB serial console connection is very convenient and fast method to manage this SBC.

Unfortunately with latest version of Armbian (tested with v24.11.0) it not working any more. Version 23.11.1 works fine out from the box, but after

sudo apt update && sudo apt full-upgrade

the microUSB serial console is not available.

 

Any suggestion how to switch it back will be very appreciated.

 

Slawek

Link to comment
Share on other sites

If still not working, install the newest OS image in a different microSD card, verify that you have the USB-serial function.

 

Then check the differences in armbianEnv.txt, and the result of "lsmod", against your old microSD.

 

If you succeed or not, post your results here, because that's how we build up the knowledge base.

Link to comment
Share on other sites

Hi I did following steps:

 

install fresh Armbian_23.11.1_Nanopiduo2_jammy_current_6.1.63.img.xz. After boot the COM19 is available:

 

Armbian_23_11.1_Nanopiduo2_jammy_current_6.1_63.img-COM19.png.699caaa5d9e06adb2f562061ea241caf.png

 

root@nanopiduo2:~# cat /boot/armbianEnv.txt

 

verbosity=1
bootlogo=false
console=serial
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=usbhost0 usbhost2 usbhost3
fdtfile=sun8i-h3-nanopi-duo2.dtb
rootdev=UUID=0cff826e-57ba-4014-a11e-8827efd9a1a0
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

root@nanopiduo2:~# lsmod

 

Module                  Size  Used by
sunrpc                339968  1
hci_uart               61440  0
btbcm                  16384  1 hci_uart
bluetooth             540672  3 hci_uart,btbcm
lz4hc                  16384  0
lz4hc_compress         24576  1 lz4hc
brcmfmac              188416  0
ecdh_generic           16384  1 bluetooth
ecc                    28672  1 ecdh_generic
brcmutil               16384  1 brcmfmac
lz4                    16384  0
lz4_compress           32768  1 lz4
sunxi_cedrus           40960  0
sun4i_gpadc_iio        16384  0
industrialio           61440  1 sun4i_gpadc_iio
cfg80211              573440  1 brcmfmac
v4l2_mem2mem           20480  1 sunxi_cedrus
videobuf2_dma_contig    20480  1 sunxi_cedrus
videobuf2_memops       20480  1 videobuf2_dma_contig
videobuf2_v4l2         20480  2 sunxi_cedrus,v4l2_mem2mem
sun8i_thermal          16384  0
videobuf2_common       45056  5 sunxi_cedrus,videobuf2_dma_contig,videobuf2_memops,v4l2_mem2mem,videobuf2_v4l2
rfkill                 20480  5 bluetooth,cfg80211
videodev              167936  4 sunxi_cedrus,videobuf2_common,v4l2_mem2mem,videobuf2_v4l2
mc                     40960  5 sunxi_cedrus,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
evdev                  20480  1
cpufreq_dt             20480  0
uio_pdrv_genirq        20480  0
uio                    16384  1 uio_pdrv_genirq
zram                   24576  3
binfmt_misc            20480  1
sch_fq_codel           20480  3
usb_f_acm              20480  1
u_serial               24576  3 usb_f_acm
g_serial               16384  0
libcomposite           45056  2 g_serial,usb_f_acm
ip_tables              24576  0
x_tables               28672  1 ip_tables
autofs4                36864  2
ac200_phy              16384  1
pwrseq_simple          16384  1
dwmac_sun8i            28672  0
stmmac_platform        24576  1 dwmac_sun8i
stmmac                172032  2 stmmac_platform,dwmac_sun8i
pcs_xpcs               20480  1 stmmac
phylink                36864  2 pcs_xpcs,stmmac
mdio_mux               16384  2 dwmac_sun8i
sunxi                  16384  0
phy_generic            20480  2 sunxi
gpio_keys              20480  0

 

then I run: apt update && apt full-upgrade and reboot

 

update_full-upgrade_login.thumb.png.1b354ac5c836f6ca12917ad524706fcc.png

 

the COM19 is gone from my Windows PC

 

No-com-after-upgrade.png.db5b97aeee41295bd67ad67824ef3118.png

 

root@nanopiduo2:~# cat /boot/armbianEnv.txt

 

verbosity=1
bootlogo=false
console=serial
disp_mode=1920x1080p60
overlay_prefix=sun8i-h3
overlays=usbhost0 usbhost2 usbhost3
fdtfile=sun8i-h3-nanopi-duo2.dtb
rootdev=UUID=0cff826e-57ba-4014-a11e-8827efd9a1a0
rootfstype=ext4
usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u

 

no difference to previous one

 

and

 

root@nanopiduo2:~# lsmod

 

Module                  Size  Used by
sunrpc                339968  1
hci_uart               61440  0
btbcm                  16384  1 hci_uart
bluetooth             540672  3 hci_uart,btbcm
lz4hc                  16384  0
lz4hc_compress         24576  1 lz4hc
brcmfmac              188416  0
ecdh_generic           16384  1 bluetooth
ecc                    28672  1 ecdh_generic
brcmutil               16384  1 brcmfmac
lz4                    16384  0
lz4_compress           32768  1 lz4
sunxi_cedrus           40960  0
sun4i_gpadc_iio        16384  0
industrialio           61440  1 sun4i_gpadc_iio
cfg80211              573440  1 brcmfmac
v4l2_mem2mem           20480  1 sunxi_cedrus
videobuf2_dma_contig    20480  1 sunxi_cedrus
videobuf2_memops       20480  1 videobuf2_dma_contig
videobuf2_v4l2         20480  2 sunxi_cedrus,v4l2_mem2mem
sun8i_thermal          16384  0
videobuf2_common       45056  5 sunxi_cedrus,videobuf2_dma_contig,videobuf2_memops,v4l2_mem2mem,videobuf2_v4l2
rfkill                 20480  5 bluetooth,cfg80211
videodev              167936  4 sunxi_cedrus,videobuf2_common,v4l2_mem2mem,videobuf2_v4l2
mc                     40960  5 sunxi_cedrus,videobuf2_common,videodev,v4l2_mem2mem,videobuf2_v4l2
evdev                  20480  1
cpufreq_dt             20480  0
uio_pdrv_genirq        20480  0
uio                    16384  1 uio_pdrv_genirq
zram                   24576  3
binfmt_misc            20480  1
sch_fq_codel           20480  3
usb_f_acm              20480  1
u_serial               24576  3 usb_f_acm
g_serial               16384  0
libcomposite           45056  2 g_serial,usb_f_acm
ip_tables              24576  0
x_tables               28672  1 ip_tables
autofs4                36864  2
ac200_phy              16384  1
pwrseq_simple          16384  1
dwmac_sun8i            28672  0
stmmac_platform        24576  1 dwmac_sun8i
stmmac                172032  2 stmmac_platform,dwmac_sun8i
pcs_xpcs               20480  1 stmmac
phylink                36864  2 pcs_xpcs,stmmac
mdio_mux               16384  2 dwmac_sun8i
sunxi                  16384  0
phy_generic            20480  2 sunxi
gpio_keys              20480  0

 

Should I test also installation of latest Armbian_community_24.11.0-trunk.66_Nanopiduo2_noble_current_6.6.44.img.xz

before_upgrade.txt after_upgrade.txt

Link to comment
Share on other sites

I cant see the problem XD

 

In this latest-working setup, run "armbianmonitor -u" to get a snapshot of the boot execution, and copy the resulting link here. Also, show the result of "dmesg | grep g_serial" (the ko driver that enables the USB-serial-device function in the CPU.

 

Try again with the Armbian_community_24.11.0-trunk.66_Nanopiduo2_noble_current_6.6.44.img.xz. Verify that the USB-serial-device function is working. Don't update, and run the 2 tests as above: armbianmonitor and dmesg|grep g_serial

Link to comment
Share on other sites

Voila:

 

Armbian_23.11.1_Nanopiduo2_jammy_current_6.1.63.img.xz

 

root@nanopiduo2:~# armbianmonitor -u
Collecting info and sending to paste.armbian.com, wait...

 

https://paste.armbian.com/jareyilapa

 

root@nanopiduo2:~# dmesg | grep g_serial
[    7.735341] g_serial gadget.0: Gadget Serial v2.4
[    7.735366] g_serial gadget.0: g_serial ready

 

Armbian_community_24.11.0-trunk.66_Nanopiduo2_noble_current_6.6.44.img.xz

 

root@nanopiduo2:~# armbianmonitor -u
Collecting info and sending to paste.armbian.com, wait...
/usr/bin/armbianmonitor: line 976: iostat: command not found

 

https://paste.armbian.com/hogapesowi

 

root@nanopiduo2:~# dmesg | grep g_serial
[    6.003420] UDC core: g_serial: couldn't find an available UDC
[    8.984241] g_serial gadget.0: Gadget Serial v2.4
[    8.984274] g_serial gadget.0: g_serial ready

 

first line above looks suspicious IMHO ....

 

Link to comment
Share on other sites

Looks like UDC is a part of the g_serial that fails to load.

 

Not an easy problem for me. Just revert to working OS, and reinstall your applications :(

 

Similar problems: https://support.xilinx.com/s/question/0D52E00006iHmGwSAK/usb-udccore-couldnt-find-an-available-udc-added-gmassstorage-to-list-of-pendi?language=en_US  

https://stackoverflow.com/questions/65012555/how-to-enable-usb-gadget-mode-from-menuconfig 

https://github.com/gokrazy/kernel/issues/418

I hope i didnt lose this functionality in my orange pi zero

Link to comment
Share on other sites

When the SBC is connected to the WiFi network I can ssh - not a problem, but in my setup I'm using most of the pins of NanoPi duo2 including debug uart. So in case of maintenence the mini-usb serial was only option. So I have to be very careful and at any cost avoid upgrading my system.

 

Do you have spare opi zero "on the drawer" to run the test?

Link to comment
Share on other sites

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