NDIS driver for modem



  • Is it possible to configure pfsense to use Huawei E3272 LTE modem in NDIS mode? Without any PPP. Can it recognize modem as network adapter like Windows?
    I found this article where you can take windows ndis friver and make it for freebsd but pfsense doesn't have make for build .ko module. Anybody faced with thing I wrote, can it work?
    https://www.freebsd.org/doc/handbook/config-network-setup.html



  • This is as far as I go
    Trying to create module from windows driver

    ndisgen ew_juwwanecm.inf ew_juwwanecm.sys
    

    But it end up with a lot of errors

    Building kernel module... /usr/share/misc/windrv_stub.c:94:2: error: incompatible pointer to integer conversion ini                                                             tializing 'uint16_t'
          (aka 'unsigned short') with an expression of type 'char [40]' [-Werror,-Wint-conversion]
            NDIS_USB_DEV_TABLE
            ^~~~~~~~~~~~~~~~~~
    ./windrv.h:11:2: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - 3G Network Card" },    \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/share/misc/windrv_stub.c:94:2: error: suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
            NDIS_USB_DEV_TABLE
            ^~~~~~~~~~~~~~~~~~
            {
    ./windrv.h:11:2: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - 3G Network Card" },    \
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/share/misc/windrv_stub.c:93:47: error: initializer element is not a compile-time constant
    static struct ndis_usb_type ndis_devs_usb[] = {
                                                  ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
            NDIS_USB_DEV_TABLE
            ^
    ./windrv.h:12:2: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - Network Card" },       \
            ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected ';' after top level declarator
    ./windrv.h:12:2: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - Network Card" },       \
            ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:12:41: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - Network Card" },       \
                                                   ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:12:42: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - Network Card" },       \
                                                    ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:13:55: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Vodafone Mobile Broadband Network Adapter (Huawei)" }, \
                                                                 ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:13:56: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Vodafone Mobile Broadband Network Adapter (Huawei)" }, \
                                                                  ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:14:34: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Mobile Connect - Network Card" },      \
                                            ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:14:35: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Mobile Connect - Network Card" },      \
                                             ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:29:44: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - 3G Network Card" },    \
                                                      ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:29:45: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - 3G Network Card" },    \
                                                       ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:30:41: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - Network Card" },       \
                                                   ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:30:42: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "HUAWEI Mobile Connect - Network Card" },       \
                                                    ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:31:55: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Vodafone Mobile Broadband Network Adapter (Huawei)" }, \
                                                                 ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:31:56: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Vodafone Mobile Broadband Network Adapter (Huawei)" }, \
                                                                  ^
    /usr/share/misc/windrv_stub.c:94:2: error: extraneous closing brace ('}')
    ./windrv.h:32:34: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Mobile Connect - Network Card" },      \
                                            ^
    /usr/share/misc/windrv_stub.c:94:2: error: expected identifier or '('
    ./windrv.h:32:35: note: expanded from macro 'NDIS_USB_DEV_TABLE'
            "Mobile Connect - Network Card" },      \
                                             ^
    fatal error: too many errors emitted, stopping now [-ferror-limit=]
    20 errors generated.
    build failed. Exiting.
    


  • I looked through the FreeBSD docs and I come away with a feeling that ndis(4) is intended for wireless cards. WWAN connections require a layer of software for connections and authentication which i think would be missing in an ethernet driver wrapper.

    There are three models of your modem shown here.
    http://www.dd-wrt.com/wiki/index.php/3G_/_3.5G

    Huawei E3272s-153 (Serial & NCM)
    Huawei E3272s-503(NCM and MBIM -PID's)

    Which do you have?



  • Did you see this thread. Simply modeswitch it and use -If your VID/PID is the same.
    http://lists.freebsd.org/pipermail/freebsd-current/2014-September/052221.html

    And if you read the last post of the pfSense forum post you will see the problem.

    pfSense has no capabilities for connecting an UE0 connection. Nowhere to enter APN.
    So unless you are using a tethered device, UE0 will not "Connect"

    I had the same issue with Novatel E371. Fully hardware supported, but there are gaps in connection protocol.

    There maybe ways to manually connect to card via console.



  • I want to use the Huawei E3272 LTE modem as well, but I have no idea about VID PID asn so on. I want to buy a pfsense applicance, and use the e3272 for my internet connection.
    Is that working? Where are the limitations?



  • My suggestion would be to use an internal modem such as the Sierra MC7700 or an tethered device such as a Sierra LS450 or Verizon Jetpack.



  • https://forum.pfsense.org/index.php?topic=95003.0

    Well if the modems are similar try this. Ignore UE0 interface and go to PPP and see if you have interfaces like this. cuaU0.1, cuaU0.2 ext…. If you do -then find the correct port(guessing game) and then at bottom of PPP setup page hit advanced and go to modem initialization string and put something like the above post for the string. I used "AT+CFUN=1" as mine.

    All this does is interrupt the default modem script and use a barebone config, which works with many modern modems...My Ericsson H5321HW had this type issue.

    Are you sure U3G is not picking it up? PPP Is the only way this will work in pfSense.