Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: heiheshang on January 08, 2024, 09:13:07 AM

Title: usb 4g modem huawei
Post by: heiheshang on January 08, 2024, 09:13:07 AM
Bus 001 Device 008: ID 12d1:15e7 Huawei Technologies Co., Ltd.

I'm trying to connect we can 4g. I installed usb_modeswitch , wvdial , but I don't see ttyUSB in dev. what package am I missing?
Title: Re: usb 4g modem huawei
Post by: Paul_123 on January 08, 2024, 12:37:41 PM
12d1:15e7 is the USB CDROM device ID.  What is your modeswitch command that you are using to switch it to modem mode?

Title: Re: usb 4g modem huawei
Post by: heiheshang on January 08, 2024, 08:30:36 PM
12d1:15e7 is the USB CDROM device ID.  What is your modeswitch command that you are using to switch it to modem mode?

switched to modem mode, still the ttyUSB device does not appear
Bus 001 Device 005: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Title: Re: usb 4g modem huawei
Post by: Paul_123 on January 08, 2024, 09:11:33 PM
There is more than one line in dmesg if the kernel is loading drivers.   Do you have the net-usb  kernel modules loaded?
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 08, 2024, 11:12:28 PM
There is more than one line in dmesg if the kernel is loading drivers.   Do you have the net-usb  kernel modules loaded?

net-usb-6.1.25-piCore-v7 is already installed!

tc@box:~$ modprobe net-usb
modprobe: module net-usb not found in modules.dep


how to download it?
Title: Re: usb 4g modem huawei
Post by: Paul_123 on January 09, 2024, 11:21:27 AM
net-usb is a collection of modules, there is no kernel module named net usb.

Perhaps copy and paste the whole output of dmesg and lsmod.
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 10, 2024, 11:00:53 AM
net-usb is a collection of modules, there is no kernel module named net usb.

Perhaps copy and paste the whole output of dmesg and lsmod.

log
Title: Re: usb 4g modem huawei
Post by: Paul_123 on January 10, 2024, 02:37:52 PM
so the driver is registered as a network device at wwan0

Have you tried running udhcpc on the network interface?   Or do you have a static address from your provider?
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 10, 2024, 09:09:57 PM
so the driver is registered as a network device at wwan0

Have you tried running udhcpc on the network interface?   Or do you have a static address from your provider?
I don’t see wwan0 rising
Title: Re: usb 4g modem huawei
Post by: curaga on January 11, 2024, 02:54:58 AM
IIRC wwan0 was its own protocol, not ethernet and not ppp, and it required either modemmanager or the smaller alternative from openwrt.
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 11, 2024, 04:06:24 AM
IIRC wwan0 was its own protocol, not ethernet and not ppp, and it required either modemmanager or the smaller alternative from openwrt.
how to use this, how to establish a connection?
Title: Re: usb 4g modem huawei
Post by: curaga on January 11, 2024, 10:41:51 AM
I never used it, I configured mine to use pppd. You'll have to look up your model's details if you can do that or ethernet, or have to use that protocol.
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 11, 2024, 11:54:32 PM
I never used it, I configured mine to use pppd. You'll have to look up your model's details if you can do that or ethernet, or have to use that protocol.
how can you configure pppd if there is no ttyUSB device, how was your modem detected?
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 11, 2024, 11:56:33 PM

as I understand it, for ttyUSB you need to load the ftdi_sio module, but I can’t find it in tinycore 14
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 12, 2024, 01:19:38 AM
Device Information
Code: [Select]
lsusb -vvv -d 12d1:1506
Protocol spec without prior Class and Subclass spec at line 23179

Bus 001 Device 005: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x12d1 Huawei Technologies Co., Ltd.
  idProduct          0x1506 Modem/Networkcard
  bcdDevice            1.02
  iManufacturer           1 MOBILE
  iProduct                2 MOBILE
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          221
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol     98
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 01 00 00
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol     97
      iInterface              0
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  04 24 02 02
      ** UNRECOGNIZED:  05 24 01 00 01
      ** UNRECOGNIZED:  05 24 06 00 00
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x000a  1x 10 bytes
        bInterval               9
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol    118
      iInterface              8 NCM Network Control Model
      ** UNRECOGNIZED:  05 24 00 10 01
      ** UNRECOGNIZED:  06 24 1a 00 01 1f
      ** UNRECOGNIZED:  0d 24 0f 0a 0f 00 00 00 ea 05 03 00 01
      ** UNRECOGNIZED:  05 24 06 02 02
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               5
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      2
      bInterfaceProtocol    118
      iInterface              9 CDC Network Data
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x86  EP 6 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0010  1x 16 bytes
        bInterval               5
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x04  EP 4 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x87  EP 7 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              4 Mass Storage
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x88  EP 8 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x06  EP 6 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               1
Binary Object Store Descriptor:
  bLength                 5
  bDescriptorType        15
  wTotalLength           22
  bNumDeviceCaps          2
  USB 2.0 Extension Device Capability:
    bLength                 7
    bDescriptorType        16
    bDevCapabilityType      2
    bmAttributes   0x00000002
      Link Power Management (LPM) Supported
  SuperSpeed USB Device Capability:
    bLength                10
    bDescriptorType        16
    bDevCapabilityType      3
    bmAttributes         0x00
    wSpeedsSupported   0x000f
      Device can operate at Low Speed (1Mbps)
      Device can operate at Full Speed (12Mbps)
      Device can operate at High Speed (480Mbps)
      Device can operate at SuperSpeed (5Gbps)
    bFunctionalitySupport   1
      Lowest fully-functional device speed is Full Speed (12Mbps)
    bU1DevExitLat           1 micro seconds
    bU2DevExitLat         500 micro seconds
Device Status:     0x0001
  Self Powered
Title: Re: usb 4g modem huawei
Post by: Paul_123 on January 12, 2024, 06:50:41 AM
Extensions are created for the common used modules,  but everything compiled with the kernel is available http://www.tinycorelinux.net/14.x/armv7/releases/RPi/src/kernel/modules-6.1.25-piCore-v7.tar.xz

If the module is not in that archive, the you will have to compile it.  Kernel source and needed files is in that same directory.
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 12, 2024, 09:05:42 AM
Extensions are created for the common used modules,  but everything compiled with the kernel is available http://www.tinycorelinux.net/14.x/armv7/releases/RPi/src/kernel/modules-6.1.25-piCore-v7.tar.xz

If the module is not in that archive, the you will have to compile it.  Kernel source and needed files is in that same directory.
there are also modules-6.1.68-piCore-v7.tar.xz, aren’t they better?
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 12, 2024, 09:13:29 AM
Extensions are created for the common used modules,  but everything compiled with the kernel is available http://www.tinycorelinux.net/14.x/armv7/releases/RPi/src/kernel/modules-6.1.25-piCore-v7.tar.xz

If the module is not in that archive, the you will have to compile it.  Kernel source and needed files is in that same directory.
I looked at this module, it’s there, I don’t understand why I can’t load it
Title: Re: usb 4g modem huawei
Post by: Paul_123 on January 12, 2024, 10:06:18 AM
Extract the module from the archive.  Copy it to /lib/modules/6.1.25-piCore-v7/kernel/drivers

Then run "depmod -a"

You might run modinfo on the module to see if there are any listed dependencies.  But then you should be able to modprobe it.
Title: Re: usb 4g modem huawei
Post by: heiheshang on January 12, 2024, 10:31:39 AM
I don't see the module usbserial loading

lsmod
Module                  Size  Used by    Not tainted
huawei_cdc_ncm         16384  0
cdc_ncm                28672  1 huawei_cdc_ncm
cdc_ether              16384  1 cdc_ncm
cdc_wdm                20480  1 huawei_cdc_ncm
uas                    24576  0
brcmfmac              335872  0
brcmutil               20480  1 brcmfmac
sha256_generic         16384  0
cfg80211              819200  1 brcmfmac
rfkill                 32768  2 cfg80211
squashfs               53248 44
i2c_bcm2835            16384  0
raspberrypi_hwmon      16384  0
zram                   28672  2
zsmalloc               28672  1 zram