How to reboot mobile modem attached to the extension board?

Which Khadas SBC do you use?

VIM3 Pro

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 20.04 (comes with Fenix version)

Which version of system do you use? Khadas official images, self built images, or others?

  • vim3-ubuntu-20.04-server-linux-4.9-fenix-1.4-221229-emmc
  • vim3-ubuntu-20.04-server-linux-4.9-fenix-1.1.1-220725-emmc (trying to update these to 1.4 but the devices are in the field so taking cautious step)

Please describe your issue below:

We learned that issuing ‘reboot’ to the VIM3 won’t reboot the (Quectel) mobile modem (not a hard power reboot). We need to be able to ‘hard reboot’ the modem so that it takes in the changes from the SIM provider. Currently, we have to do physical power cycle, which is not easy if the device is on a tower or a rooftop.

I’ve tried to dig into pcie related reboot online but don’t see much useful info. Any suggestions from you would be much appreciated.

FYI. Devices with Fenix v1.4 use wwan0, the older Fenix v1.1.1 or older uses ppp0.

Post a console log of your issue below:

No console log of the issue, but perhaps this might give some info:

root@xyz:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/2p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Vendor Specific Class, Driver=r8152, 480M
|__ Port 3: Dev 4, If 0, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 3: Dev 4, If 1, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 3: Dev 4, If 2, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 3: Dev 4, If 3, Class=Vendor Specific Class, Driver=option, 480M
|__ Port 3: Dev 4, If 4, Class=Communications, Driver=cdc_mbim, 480M
|__ Port 3: Dev 4, If 5, Class=CDC Data, Driver=cdc_mbim, 480M

root@xyz:~# lsmod
Module Size Used by
r8152 237568 0
overlay 57344 2
cpufreq_conservative 16384 0
cpufreq_ondemand 20480 0
cpufreq_powersave 16384 0
cpufreq_userspace 16384 0
iv009_isp_sensor 270336 0
iv009_isp_lens 69632 0
cdc_mbim 16384 0
iv009_isp_iq 544768 0
option 57344 3
usb_wwan 24576 1 option
galcore 450560 0
vpu 49152 0
encoder 53248 0
amvdec_avs2 192512 0
amvdec_vp9 151552 0
amvdec_vc1 53248 0
mali_kbase 475136 0
amvdec_real 40960 0
iv009_isp 540672 2
amvdec_mmpeg4 32768 0
amvdec_mpeg4 53248 0
amvdec_mmpeg12 40960 0
amvdec_mpeg12 90112 0
amvdec_mmjpeg 28672 0
amvdec_mjpeg 36864 0
amvdec_h265 135168 0
amvdec_h264mvc 49152 0
amvdec_mh264 151552 0
amvdec_h264 118784 0
amvdec_avs 61440 0
stream_input 180224 10 amvdec_h265,amvdec_mh264,amvdec_h264mvc,amvdec_real,amvdec_vp9,amvdec_h264,amvdec_avs2,amvdec_mpeg12,amvdec_avs,amvdec_mmpeg12
decoder_common 176128 17 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,encoder,amvdec_avs2,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mmpeg12,amvdec_mpeg4
firmware 28672 18 amvdec_h265,amvdec_mjpeg,amvdec_mh264,amvdec_mmpeg4,amvdec_h264mvc,amvdec_mmjpeg,decoder_common,amvdec_real,stream_input,amvdec_vp9,amvdec_h264,encoder,amvdec_avs2,amvdec_mpeg12,amvdec_avs,amvdec_vc1,amvdec_mmpeg12,amvdec_mpeg4
media_clock 45056 12 amvdec_h265,amvdec_mh264,decoder_common,vpu,firmware,stream_input,amvdec_vp9,amvdec_h264,encoder,amvdec_avs2,amvdec_mpeg12,amvdec_avs
zram 36864 4
dhd 1404928 0
btrfs 1269760 0
xor 20480 1 btrfs
raid6_pq 106496 1 btrfs

Khadas team, any comment on this please?

We tried to follow one of the suggestions found online How to Reset/Cycle Power to a PCIe Device? - Unix & Linux Stack Exchange
but with this path (we guessed): /sys/devices/platform/fc000000.pcieA

It doesn’t work, of course, since there’s no ‘/remove’ option in that path & its subpaths.