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

    New 3g usb stick not supported - how to add support ?

    Scheduled Pinned Locked Moved 2.0-RC Snapshot Feedback and Problems - RETIRED
    6 Posts 3 Posters 2.7k 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.
    • F
      Fennel
      last edited by

      Hi,

      My existing Huwaei 3g stick works fine in 2.0, though I had to patch the rrd graphs to get signal levels.

      I have a new model Huwaei k4505  (20mbps hspa+ ) that I would imagine will work fine, but the vendor/model id's are not known to pfsense.

      How do I add them to pfsense to take this a step further ?  is it a recompile of the kernel module ?

      Thanks !

      1 Reply Last reply Reply Quote 0
      • E
        eri--
        last edited by

        For now yes.
        For 2.1 we might consider some tools provided in FreeBSD 9 to make this without recompiling

        1 Reply Last reply Reply Quote 0
        • F
          Fennel
          last edited by

          Is this as 'simple' as take a stock freebsd 8 and recompile the module, make sure it works, then insert that into my pfsense image ?which is probably documented somewhere here.

          1 Reply Last reply Reply Quote 0
          • E
            eri--
            last edited by

            Nope.
            You have to build a pfSense kernel with those changes.
            Search the devwiki for instrunctions.

            1 Reply Last reply Reply Quote 0
            • F
              Fennel
              last edited by

              ok, that was made more painful by a usb bug under vmware :-(

              making a new kernel under virtualbox with the new modem attached worked

              output from```
              screen /dev/cuaU0.0

              
              

              AT
              OK
              ATI5
              Manufacturer: Vodafone (Huawei)
              Model: K4505
              Revision: 11.828.03.01.11
              IMEI: xxxxxx <- I changed this
              +GCAP: +CGSM,+DS,+ES

              OK

              
              So looks good
              
              added```
              U3G_DEV(HUAWEI, K4505, U3GINIT_HUAWEI),
              
              ```to /usr/src/sys/dev/usb/serial/u3g.c
              
              and```
              product HUAWEI K4505		0x1464	3G modem
              
              ```to /usr/src/sys/dev/usb/usbdevs
              
              so , now just to add it to pfsense, which, by the way, you have done an excellent job of making into a sane task !
              
              I hacked your script for signal strength to look like this btw, as 3gstat binary didn't work, using an if statement of
              

              3gmodel=usbconfig -d $dev dump_device_desc | grep id | cut -f2 -d "=" | xargs

              if [ "$3gmodel" = "0x12d1 0x1464" ]; then

              
              The 'hack was'
              
              

              /usr/bin/nice -n20 /usr/local/bin/rrdtool update /var/db/rrd/ppp-cellular.rrd N: ( sleep 1; echo "AT+CSQ" > /dev/cuaU0.2 ) | head -n16 /dev/cuaU0.2 | grep -m1 CSQ | cut -d',' -f1 | cut -d ':' -f2 | xargs -I {} echo "{} * 2 -113" | bc:U

              
              instead of```
              
              if [ -n "$dev" ]; then /usr/bin/nice -n20 /usr/local/bin/rrdtool update /var/db/rrd/ppp-cellular.rrd N:`3gstat -s -d $dev`
              
              
              1 Reply Last reply Reply Quote 0
              • G
                GrandmasterB
                last edited by

                I did the same.

                Added a line to 'usbdevs' and a line to 'u3g.c', compiled the PFsense kernel and installed it on my box.
                But the Huawei K4505 will only see 2 disks (1 CDrom and 1 flashdisk). No serial ports what so ever.

                Are you sure these are the only changes you made to enable youre K4505 on PFsense?

                thanks,
                bas

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