usb-serial

hello all,
after upgrading the linux kernel from 3.14 to 4.1 on BBB the ttyUSBx devices are not appearing.
what should i active or change when i build the kernel to make /dev/serial/by-id /dev/serial/by-path generate again when i connect a 3G modem or weather station to my BBB?
or is there anything i can do manually to fix this issue?
i tried both kernels in
https://github.com/RobertCNelson/bb-kernel
https://github.com/beagleboard/linux

but no difference

Regards,
Tamer

It probably has to do with the differences between Wheezy, and Jessies, which namely is systemd in Jessie versus sysv in Wheezy.

So how I personally fix this is install sysv, and remove systemd, but that might not be best for everyone. So you’ll have to figure out how to setup a systemd service for your serial devices.

we probally dropped a config..

with 3.14.x, plug in your module, type:

lsmod

Regards,

i was using systemd with 3.14 but the kernel is not stable it was rebooting alot that’s why i upgraded to 4.1. unfortunately i can’t delete systemd because all the applications i developed on my OS are using systemd.

do you have any other suggestions?

i was using systemd with 3.14 but the kernel is not stable it was rebooting alot that’s why i upgraded to 4.1. unfortunately i can’t delete systemd because all the applications i developed on my OS are using systemd.

do you have any other suggestions?

I gave you another suggestion. However I was assuming you upgraded to Jessies, and not just did a kernel upgrade. Do what RObert suggested, and see which modules you have loaded in 3.14 and compare to 4.1.x

this is the lsmod for the old kernel 3.14

Module Size Used by
g_multi 57380 2
libcomposite 17153 1 g_multi
rfcomm 30970 0
ircomm_tty 17295 0
ircomm 10190 1 ircomm_tty
irda 108238 2 ircomm_tty,ircomm
hidp 12758 0
bluetooth 190298 4 hidp,rfcomm
rfkill 18341 1 bluetooth
autofs4 22234 2

and this is the lsmod for the new one 4.1

Module Size Used by
qmi_wwan 12455 0
cdc_wdm 11343 1 qmi_wwan
usbnet 30121 1 qmi_wwan
uas 11747 0
usb_storage 47867 1 uas
cp210x 14926 0
usbserial 34286 1 cp210x
evdev 7972 0
omap_sham 19088 0
omap_aes 13033 0
tda998x 11671 1
tilcdc 27853 0
omap_rng 4334 0
drm_kms_helper 107506 3 tda998x,tilcdc
rng_core 7246 1 omap_rng
snd_soc_davinci_mcasp 14367 0
snd_soc_edma 1142 1 snd_soc_davinci_mcasp
snd_soc_omap 2573 1 snd_soc_davinci_mcasp
snd_soc_core 156897 3 snd_soc_davinci_mcasp,snd_soc_edma,snd_soc_omap
snd_compress 11581 1 snd_soc_core
snd_pcm_dmaengine 5053 2 snd_soc_core,snd_soc_omap
snd_pcm 76985 4 snd_soc_davinci_mcasp,snd_soc_core,snd_soc_omap,snd_pcm_dmaengine
snd_timer 17153 1 snd_pcm
snd 56782 4 snd_soc_core,snd_timer,snd_pcm,snd_compress
soundcore 6885 1 snd
spi_omap2_mcspi 10464 0
leds_gpio 3086 0
uio_pdrv_genirq 3301 0
uio 8435 1 uio_pdrv_genirq
usb_f_acm 6914 1
u_serial 9858 3 usb_f_acm
usb_f_rndis 22443 1
g_multi 5147 0
usb_f_mass_storage 40700 2 g_multi
u_ether 11001 2 usb_f_rndis,g_multi
libcomposite 43072 4 usb_f_acm,usb_f_rndis,g_multi,usb_f_mass_storage
rfcomm 52076 0
hidp 14632 0
bluetooth 392077 4 hidp,rfcomm

this is the output of dmesg when i connect the lte modem

490.871326] usb 1-1.4: new high-speed USB device number 8 using musb-hdrc
[ 490.991736] usb 1-1.4: config 1 has an invalid interface number: 9 but max is 0
[ 490.999088] usb 1-1.4: config 1 has no interface number 0
[ 491.005632] usb 1-1.4: New USB device found, idVendor=1199, idProduct=0fff
[ 491.012571] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 491.019910] usb 1-1.4: Product: AC341U
[ 491.023684] usb 1-1.4: Manufacturer: Sierra Wireless, Incorporated
[ 491.029890] usb 1-1.4: SerialNumber: 355745050419317
[ 491.092415] usb-storage 1-1.4:1.9: USB Mass Storage device detected
[ 491.111265] usb-storage: probe of 1-1.4:1.9 failed with error -5
[ 491.118747] usbcore: registered new interface driver usb-storage
[ 491.166011] usbcore: registered new interface driver uas
[ 491.661910] usb 1-1.4: USB disconnect, device number 8
[ 491.901405] usb 1-1.4: new high-speed USB device number 9 using musb-hdrc
[ 492.025373] usb 1-1.4: config 1 has an invalid interface number: 8 but max is 3
[ 492.032788] usb 1-1.4: config 1 has no interface number 1
[ 492.052018] usb 1-1.4: New USB device found, idVendor=1199, idProduct=9057
[ 492.058940] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 492.066330] usb 1-1.4: Product: AC341U
[ 492.070094] usb 1-1.4: Manufacturer: Sierra Wireless, Incorporated
[ 492.076322] usb 1-1.4: SerialNumber: 355745050419317
[ 492.271519] usbcore: registered new interface driver cdc_wdm
[ 492.357698] qmi_wwan 1-1.4:1.8: cdc-wdm0: USB WDM device
[ 492.438371] qmi_wwan 1-1.4:1.8 wwan0: register ‘qmi_wwan’ at usb-musb-hdrc.1.auto-1.4, WWAN/QMI device, ce:1c:2f:54:86:3b
[ 492.529540] usbcore: registered new interface driver qmi_wwan

it never links it to ttyUSBx and the directory /dev/serial is not generated

Could it be you’re missing the usbmodeswitch package? A usb modem present itself as a cdrom and if the type is known usbmodeswitch will automagically turn it into a ttyUSBx.

These types of USB “modems” typically present themselves as a Serial device . . .

i found the problem. in the kernel 3.14 there was the GobiNet and GobiSerial driver modules for this usb modem Sierra AC341U. however when I tried to build the same driver again for the kernel 4.1 many errors appeared

specially this error ‘struct file’ has no member named ‘f_dentry’

when i built the same file on kernel 3.14 and 3.8 the error didn’t come up and i was able to build the module is there any solution for kernel 4.x

`

T@ThinkPad-T450s:~/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
rm -rf *.o ~ core .depend ..cmd *.ko .mod.c .tmp_versions Module. modules.order
make -C /home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/lib/modules/4.1.27/build M=/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet modules
make[1]: Entering directory ‘/home/T/Workspace/KernelDevelopment/kernelFile/linux-4.1’
CC [M] /home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/GobiUSBNet.o
In file included from include/net/sock.h:58:0,
from include/net/inet_sock.h:27,
from include/net/ip.h:30,
from /home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/GobiUSBNet.c:89:
include/linux/memcontrol.h: In function ‘task_in_memcg_oom’:
include/linux/memcontrol.h:146:9: warning: return makes integer from pointer without a cast [-Wint-conversion]
return p->memcg_oom.memcg;
^
CC [M] /home/T/Workspace/KernelDevelopment/kernelFile/output-4.1-modified/GobiDrivers/GobiNet/QMIDevice.o
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c: In function ‘UserspaceunlockedIOCTL’:
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:2311:26: error: ‘struct file’ has no member named ‘f_dentry’
pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
^
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c: In function ‘UserspaceClose’:
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:2758:26: error: ‘struct file’ has no member named ‘f_dentry’
pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
^
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c: In function ‘UserspaceRead’:
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:2816:26: error: ‘struct file’ has no member named ‘f_dentry’
pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
^
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c: In function ‘UserspaceWrite’:
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:2899:26: error: ‘struct file’ has no member named ‘f_dentry’
pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
^
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c: In function ‘UserspacePoll’:
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:2977:26: error: ‘struct file’ has no member named ‘f_dentry’
pFilp->f_op = pFilp->f_dentry->d_inode->i_fop;
^
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c: In function ‘DeregisterQMIDevice’:
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:3364:43: error: ‘struct file’ has no member named ‘f_dentry’
if (pFilp != NULL && pFilp->f_dentry != NULL)
^
/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.c:3366:28: error: ‘struct file’ has no member named ‘f_dentry’
if (pFilp->f_dentry->d_inode == pOpenInode)
^
scripts/Makefile.build:258: recipe for target ‘/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.o’ failed
make[2]: *** [/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet/QMIDevice.o] Error 1
Makefile:1385: recipe for target ‘module/home/ou-4305/Workspace/KernelDevelopment/kernelFile/output-4.1-modified-trash/GobiDrivers/GobiNet’ failed
make[1]: *** [module/home/T/Workspace/KernelDevelopment/kernelFile/output-4.1/GobiDrivers/GobiNet] Error 2
make[1]: Leaving directory ‘/home/T/Workspace/KernelDevelopment/kernelFile/linux-4.1’
Makefile:10: recipe for target ‘all’ failed
make: *** [all] Error 2

`

i found the solution in this link
http://www.orbit-lab.org/wiki/Software/hDrivers

for kernels ≥ 3.19, you will have to modify all occurrences in GobiNet?/QMIDevice.c of f_dentry to f_path.dentry.

Yeap. google works great on compiler errors. Doesn’t it ? :wink: