Help needed: Compile driver (USB nic)



  • Hey all,

    i've set up a pfSense-full 1.2.1 on an Alix-Board. Now i need to have 2 USB-NICs connected to the system.
    I know about speed-problems and other issues… that would all be okay for me.

    I do not have much idea about FreeBSD, so it would be great if someone could help me get the USB-NICs running.

    usbdevs recognizes the devices. everything okay IMHO:


    usbdevs -v

    Controller /dev/usb0:
    addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), AMD(0x0000), rev 1.00
    port 1 powered
    port 2 powered
    port 3 powered
    port 4 powered
    Controller /dev/usb1:
    addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), AMD(0x0000), rev 1.00
    port 1 addr 2: high speed, power 500 mA, config 1, USB-MAC Controller(0x7830), Moschip Semiconductor(0x9710), rev 1.00
    port 2 addr 3: high speed, power 500 mA, config 1, USB-MAC Con??????????(0x7830), Moschip Semiconductor(0x9710), rev 1.00
    port 3 powered
    port 4 powered

    But in ifconfig -a, they won't show up as ethernet-devices.
    I think that must be a driver problem!? I don't know how to solve that. I think 2 ways are possible:

    1. i read something about if_udav. Can somebody tell me how to get that running in my pfsense?

    2. take the freebsd-driver from the moschip-website. it is only available for freebsd 6.2, but maybe it works with 7.
    the readme tells me to do a "make ld". as far as i know, i cannot do that with pfsense. so i would need to have a developers edition or a freebsd7-livecd. Since i spend a few hours till now, i hoped that some of you can give me more information. will that work? maybe some of you guys could do the compiling-stuff for me and send me the file?

    The driver is on the moschip-website (mcs7830), but you need to register there. You may download it at: http://www-DOT-dateiserver-DOT-net/Driver_FreeBSD_7830.tar.gz

    i'm sorry i have no more knowledge of freebsd -> thank you VERY much in advance for your step-by-step help ;-)



  • Just a couple of comments.

    1. udav is for a different device, so that wouldn't help.
    2. Initial testing on my Alix shows that 1.2.1 seems to work with the newer (B1) revisions of the D-Link  DUB-E100 that are currently available (from newegg for instance).


  • Thanks for your reply dotdash.

    I found out that i would need to patch the kernel in some way… because the driver would be a "kernel loadable device" or something. i dont have enough knowledge about these things ;-)

    i will cancel the task if there is no one else who can give me good hint.

    dotdash: you said "INITIAL testing". can you give me some more info onto that? i would buy 2 E100s if they are okay on pfSense! THX!!!!



  • RE: DUB-E100's- I've setup a test Alix 2c3 with the D-Link USB as WAN, put a laptop behind it and got to the Internet. The actual deployment will used for an additional DSL, I'm thinking it should run fine, but there is still a chance it could misbehave under real world conditions. I have also not tested running two at the same time beyond verifying they will both fit and show up as interfaces.

    EDIT- I took a quick look at that moschip driver, and it says it was tested on FreeBSD 6.2. That means your best chance of getting a working driver might be to compile it on a 6.2 box and try to drop it into a pfSense 1.2 system. (Not 1.2.1 or 1.2.2, which are based on FreeBSD 7.0)



  • Hi,
    I was able to compile the driver in this way (usuing a computer with FreeBSD 7):

    tar zxvf Driver_FreeBSD_7830.tar.gz

    x Driver_FreeBSD_7830/README~
    x Driver_FreeBSD_7830/if_mosreg.h
    x Driver_FreeBSD_7830/if_mos.c
    x Driver_FreeBSD_7830/README
    x Driver_FreeBSD_7830/Makefile

    cd Driver_FreeBSD_7830

    vi if_mos.c

    Add the following

    #include <dev usb="" usb_port.h="">Then compile and load the module

    make

    kldload if_mos.ko

    You will see the interface as mos0

    ifconfig

    mos0: flags=108802 <broadcast,simplex,multicast,needsgiant>metric 0 mtu 1500
            ether 00:50:c5:70:1c:9b
            media: Ethernet autoselect (none)
            status: active

    I think if you want it to get it working in PFSense you should copy if_mos.ko to /boot/kernel and then add  if_mos_load="YES" to /boot/loader.conf so the module will be started every time you boot the system..
    Regards,

    Juan Priotti</broadcast,simplex,multicast,needsgiant></dev>


Log in to reply