usb-serial

220 views
Skip to first unread message

Tamer Alamiri

unread,
Jun 29, 2016, 5:36:26 PM6/29/16
to BeagleBoard
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

but no difference 

Regards,
Tamer

William Hermans

unread,
Jun 29, 2016, 6:01:08 PM6/29/16
to beagl...@googlegroups.com
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.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/1f864f4c-3aa9-46ec-9252-34dec3d6f4f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Nelson

unread,
Jun 29, 2016, 6:03:11 PM6/29/16
to Beagle Board
we probally dropped a config..

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

lsmod

Regards,

--
Robert Nelson
https://rcn-ee.com/

Tamer Alamiri

unread,
Jun 29, 2016, 6:06:35 PM6/29/16
to BeagleBoard
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? 

William Hermans

unread,
Jun 29, 2016, 6:08:37 PM6/29/16
to beagl...@googlegroups.com
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

Tamer Alamiri

unread,
Jun 29, 2016, 6:13:20 PM6/29/16
to BeagleBoard
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

Tamer Alamiri

unread,
Jun 29, 2016, 6:20:43 PM6/29/16
to BeagleBoard
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

toni incog

unread,
Jul 1, 2016, 7:46:04 AM7/1/16
to BeagleBoard
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.

William Hermans

unread,
Jul 1, 2016, 1:19:02 PM7/1/16
to beagl...@googlegroups.com
These types of USB "modems" typically present themselves as a Serial device . . .

On Fri, Jul 1, 2016 at 4:46 AM, toni incog <toni....@gmail.com> wrote:
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.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.

Tamer Alamiri

unread,
Jul 1, 2016, 8:40:41 PM7/1/16
to BeagleBoard
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




On Friday, July 1, 2016 at 12:19:02 PM UTC-5, William Hermans wrote:
These types of USB "modems" typically present themselves as a Serial device . . .
On Fri, Jul 1, 2016 at 4:46 AM, toni incog <toni....@gmail.com> wrote:
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 turn it into a ttyUSBx.

Tamer Alamiri

unread,
Jul 1, 2016, 9:08:52 PM7/1/16
to BeagleBoard
i found the solution in this link

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

William Hermans

unread,
Jul 1, 2016, 9:41:53 PM7/1/16
to beagl...@googlegroups.com
Yeap. google works great on compiler errors. Doesn't it ? ;)

Reply all
Reply to author
Forward
0 new messages