Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Huawei k5160 4g usb mobile broadband

    Scheduled Pinned Locked Moved Hardware
    53 Posts 6 Posters 16.8k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      AndrewZ
      last edited by

      The whole story has no relation to the radio part (3G, 4G, signal level, etc).

      To avoid boot issues I suggest to always use the same USB port and keep the modem on. Alternatively you can have a backup configuration file with or without ue0 and load it then necessary.
      idProduct or PID depends on the modem itself, on it's branding and composition (CD-ROM + Network card). You should see the same PID regardless of port your modem is plugged in.

      I can send you some links to firmware files as well as a flash code. Please PM me with IMEI of the modem. Please be careful with upgrade - I heard that some people had issues loading generic/unbranded firmware on Vodafone branded 5372. Just search what people say.

      Few other possibilities to complete the picture:

      • on some modems it is possible to change a PID directly, never tried on 5372
      • having support for the modern PIDs in the kernel will significantly simplify our lifes; at the moment people are patching/recompiling a kernel to their needs
      1 Reply Last reply Reply Quote 0
      • R
        rajbps
        last edited by

        Hi AndrewZ,

        Just send you a PM with the IMEI as requested.

        Regards,

        Raj

        1 Reply Last reply Reply Quote 0
        • I
          igloox
          last edited by

          Hello

          i would like to plug my Huawei E5372 to my virtual pfsense build on my esxi. But Esxi don't recognize it. (Generic firmware upgrade OK)

          The AT commands  AT^SETPORT? returns:

          ^SETPORT:A1,A2;12,16,A1,A2
          

          Do you know the AT commands to resolve my problems?

          Regards

          1 Reply Last reply Reply Quote 0
          • A
            AndrewZ
            last edited by

            Hi igloox, just noticed your question

            Please correct me if I'm wrong - you have an operator branded modem and you already loaded universal/generic firmware?
            Could you please show the result of AT^NVRD=50071

            Prior to that you need to unlock some commands with AT^DATALOCK="v201 code"
            If you don't have the code - please PM me your IMEI.

            1 Reply Last reply Reply Quote 0
            • E
              eiger3970
              last edited by

              Post 5, step 5, USB is seen by pfSense 2.4.4, however the interface ue0 does not appear?

              1 Reply Last reply Reply Quote 0
              • GiaNNG
                GiaNN
                last edited by GiaNN

                Is there any news about the K5160? Now on FreeBSD14 it's still recognized as an usb mass device and not as an LTE mode. I think before buying a new LTE modem it's worth a shot.
                In the system log i find this:

                Sep 16 23:56:05 	ppp 	40698 	[opt1_link0] LCP: Down event
                Sep 16 23:56:05 	ppp 	40698 	[opt1_link0] Link: DOWN event
                Sep 16 23:56:05 	ppp 	40698 	[opt1_link0] MODEM: chat script failed
                Sep 16 23:56:05 	ppp 	40698 	[opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
                Sep 16 23:55:52 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 5
                Sep 16 23:55:49 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 5 in 3 seconds
                Sep 16 23:55:49 	ppp 	40698 	[opt1_link0] LCP: Down event
                Sep 16 23:55:49 	ppp 	40698 	[opt1_link0] Link: DOWN event
                Sep 16 23:55:49 	ppp 	40698 	[opt1_link0] MODEM: chat script failed
                Sep 16 23:55:49 	ppp 	40698 	[opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
                Sep 16 23:55:36 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 4
                Sep 16 23:55:33 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 4 in 3 seconds
                Sep 16 23:55:33 	ppp 	40698 	[opt1_link0] LCP: Down event
                Sep 16 23:55:33 	ppp 	40698 	[opt1_link0] Link: DOWN event
                Sep 16 23:55:33 	ppp 	40698 	[opt1_link0] MODEM: chat script failed
                Sep 16 23:55:33 	ppp 	40698 	[opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
                Sep 16 23:55:18 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 3
                Sep 16 23:55:16 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 3 in 2 seconds
                Sep 16 23:55:16 	ppp 	40698 	[opt1_link0] LCP: Down event
                Sep 16 23:55:16 	ppp 	40698 	[opt1_link0] Link: DOWN event
                Sep 16 23:55:16 	ppp 	40698 	[opt1_link0] MODEM: chat script failed
                Sep 16 23:55:16 	ppp 	40698 	[opt1_link0] CHAT: The modem is not responding to "AT" at ModemCmd: label.
                Sep 16 23:55:01 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 2
                Sep 16 23:55:00 	ppp 	40698 	[opt1_link0] Link: reconnection attempt 2 in 1 seconds
                Sep 16 23:55:00 	ppp 	40698 	[opt1_link0] LCP: Down event
                Sep 16 23:55:00 	ppp 	40698 	[opt1_link0] Link: DOWN event
                Sep 16 23:55:00 	ppp 	40698 	[opt1_link0] MODEM: chat script failed 
                
                GiaNNG 1 Reply Last reply Reply Quote 0
                • GiaNNG
                  GiaNN @GiaNN
                  last edited by

                  I also add that if i create a PPP the Huawei LED starts blinking until it reaches purple which should mean that it's connected but you should check the connection if it's active

                  stephenw10S 1 Reply Last reply Reply Quote 0
                  • stephenw10S
                    stephenw10 Netgate Administrator @GiaNN
                    last edited by

                    @GiaNN said in Huawei k5160 4g usb mobile broadband:

                    if i create a PPP the Huawei LED starts blinking

                    Create it how?

                    There's a good chance there are multiple versions of that modem and that they behave differently, Many modems do.

                    Steve

                    GiaNNG 1 Reply Last reply Reply Quote 0
                    • stephenw10S stephenw10 moved this topic from Problems Installing or Upgrading pfSense Software on
                    • GiaNNG
                      GiaNN @stephenw10
                      last edited by GiaNN

                      @stephenw10 through the interfaces GUI, in the section PPP.
                      Then if i enable the interface the LED starts blinking but it cannot properly start PPP

                      1 Reply Last reply Reply Quote 0
                      • stephenw10S
                        stephenw10 Netgate Administrator
                        last edited by

                        So you see USB serial ports created? Like cuaU0-3?

                        GiaNNG 1 Reply Last reply Reply Quote 0
                        • GiaNNG
                          GiaNN @stephenw10
                          last edited by

                          @stephenw10 i don't remember, where i see that?
                          I used as device the /dev/cuau0 and then it started blinking if enabled.

                          1 Reply Last reply Reply Quote 0
                          • stephenw10S
                            stephenw10 Netgate Administrator
                            last edited by

                            /dev/cuau0 is one of the on-board com ports not the modem. The ports created by a modem are shown with an uppercase 'U' to indicate they are USB connected.

                            Plug in the modem and then check the system log. If it's recognised you will see log entries showing the new ports created.

                            GiaNNG 1 Reply Last reply Reply Quote 0
                            • GiaNNG
                              GiaNN @stephenw10
                              last edited by

                              @stephenw10 in dmesg shows this:

                              ugen2.2: <Vodafone (Huawei) Vodafone (Huawei)> at usbus2
                              umass0 on uhub0
                              umass0: <Mass Storage> on usbus2
                              cd0 at umass-sim0 bus 0 scbus2 target 0 lun 0
                              cd0: <HUAWEI Mass Storage 2.31> Removable CD-ROM SCSI-2 device
                              cd0: Serial Number 0123456789ABCDEF
                              cd0: 40.000MB/s transfers
                              cd0: Attempt to query device size failed: NOT READY, Medium not present
                              cd0: quirks=0x10<10_BYTE_ONLY>
                              da0 at umass-sim0 bus 0 scbus2 target 0 lun 1
                              da0: <HUAWEI TF CARD Storage 2.31> Removable Direct Access SCSI-2 device
                              da0: Serial Number 0123456789ABCDEF
                              da0: 40.000MB/s transfers
                              da0: Attempt to query device size failed: NOT READY, Medium not present
                              da0: quirks=0x2<NO_6_BYTE>
                              
                              
                              
                              1 Reply Last reply Reply Quote 0
                              • stephenw10S
                                stephenw10 Netgate Administrator
                                last edited by stephenw10

                                Ok, so u3g doesn't recognise it. You should see something like:

                                uhub0: 8 ports with 8 removable, self powered
                                ugen0.2: <Huawei Technologies Co., Ltd. HUAWEI Mobile> at usbus0
                                u3g0 on uhub0
                                u3g0: <Huawei Mobile Connect - Modem> on usbus0
                                u3g0: Found 5 ports.
                                

                                If it can work at all it probably needs to be modeswitched. Or reflashed with different firmware.

                                Note that the OP here never got this modem working, they switched to a different device. And I don't see an entry for it in u3g:
                                https://github.com/pfsense/FreeBSD-src/blob/devel-main/sys/dev/usb/serial/u3g.c#L339

                                Steve

                                GiaNNG 1 Reply Last reply Reply Quote 1
                                • GiaNNG
                                  GiaNN @stephenw10
                                  last edited by

                                  @stephenw10 said in Huawei k5160 4g usb mobile broadband:

                                  If it can work at all it probably needs to be modeswitched. Or reflashed with different firmware.

                                  How? i'll make the last try. Then maybe i'll get a different model o try maybe with an OpenWRT VM or something linux based (i tried on Debian and there it's plug & play)

                                  1 Reply Last reply Reply Quote 0
                                  • stephenw10S
                                    stephenw10 Netgate Administrator
                                    last edited by

                                    Ok, first thing is to get the USB IDs it's presenting as currently using the usbconfig command:

                                    usbconfig -d ugen2.2 dump_all_desc
                                    
                                    GiaNNG 1 Reply Last reply Reply Quote 0
                                    • GiaNNG
                                      GiaNN @stephenw10
                                      last edited by GiaNN

                                      @stephenw10 i'm putting it on pastebin because it gets flagged as spam idk why. If there a way to post it without getting it flagged i'll do it.

                                      1 Reply Last reply Reply Quote 0
                                      • stephenw10S
                                        stephenw10 Netgate Administrator
                                        last edited by

                                        Aha, it has two config indexes and second one has a coms device interface. Try:

                                        usbconfig -d ugen2.2 set_config 1
                                        

                                        See what the system log shows. Or on the console if you're using that directly.

                                        GiaNNG 1 Reply Last reply Reply Quote 0
                                        • GiaNNG
                                          GiaNN @stephenw10
                                          last edited by GiaNN

                                          @stephenw10 if i do dmesg it doesn't show anything new after that comand.
                                          And in PPP there's still the default interface
                                          391c2018-b02d-433d-a32e-5f409f046962-immagine.png

                                          1 Reply Last reply Reply Quote 0
                                          • stephenw10S
                                            stephenw10 Netgate Administrator
                                            last edited by

                                            Hmm, it really showed nothing in the system log?

                                            That other config doesn't have com ports but it should have exposed the USB Ethernet interface, ue0. That should be in the log.

                                            Try: usbconfig -d ugen2.2 dump_curr_config_desc

                                            Make sure it shows config index 1.

                                            GiaNNG 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.