USB Modem detected - but not showing under Interfaces?



  • If I plug my USB modem int o PFSense2.0,
    it tells me in the setup console that it is:

    Ugen0.2 <dupont incorporated="">at usbus0</dupont>

    Is the driver installed if I can see this message?
    Where can I see this  {using Win SCP from Windows computer} ?
    Why is it not showing under Interfaces so that I can configure it under PPPoE?

    Additional info:
    In Ubuntu  it is detected as a Usbserial vendor=0x1d09 product=0x4000
    Attached is a driver for Smoothwall  I found. I renamed it to .ko.txt

    Thanks,
    Zani
    usbserial.ko.txt



  • A quick google search indicate that it is a Huawei E220
    You first need to add it as ppp
    interfaces->assign->ppps



  • Hi - thanks,  ;)
    That's the problem - No Link interface(s) show up! ???

    When I first plugged it in - The PfSense console setup menu asked me what to do.
    i did not respond correctly, and thereafter I could never get it to ask me the question again.
    I still need to know - is it installed?
    What should I have done under the menu: no 1 gives me network cards….. :-\

    I get on a Huawei E220 search :
    Huawei E220
    Type USB-dongle
    Vendor/Device ID 0×12d1/0×1003
    Switch method None/USB_SET_FEATURE. Use usb_modeswitch or patch that sends SET_FEATURE
    Driver Supported by u3g (or ubsa with device-id patch required)
    OEM versions Re-branded by Tele2 SE
    URL http://www.huawei.com/mobileweb/en/products/view.do?id=282

    Is this it?

    vendor=0x1d09 gets me to Techfaith - am I doing the search wrong?



  • You can try usbconfig -d ugen0.2 dump_device_desc



  • Thanks, using PuTTY , I used the shell option - no 8 - on the PfSense setup console and got this:  ;D

    usbconfig -d ugen0.2 dump_device_desc
    ugen0.2: <dupont cdma="" technologies="" msm="" dupont,="" incorporated="">at usbus0, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON

    bLength = 0x0012
     bDescriptorType = 0x0001
     bcdUSB = 0x0110
     bDeviceClass = 0x0000
     bDeviceSubClass = 0x0000
     bDeviceProtocol = 0x0000
     bMaxPacketSize0 = 0x0040
     idVendor = 0x1d09
     idProduct = 0x4000
     bcdDevice = 0x0000
     iManufacturer = 0x0001   <dupont, incorporated="">iProduct = 0x0002   <dupont cdma="" technologies="" msm="">iSerialNumber = 0x0000   <no string="">bNumConfigurations = 0x0001

    1] What does this tell us?  :-\

    2] What next?  8)

    [ As I am very ignorant with Linux - you have to feed me by spoon…]  :-[</no></dupont></dupont,></dupont>



  • Doesn't seem to be a e220 after all http://doc.pfsense.org/index.php/Policy_on_FreeBSD_issues



  • Perry,
    is this device working or not?

    I presume not. I see ugen is a "generic USB device" driver. Support for the device is not built into the kernel.  :(



  • Only you can answer that as it's your device….



  • Perry, how do i test it?



  • I Found the following - but dont know what to do as PfSense is different than FreeGSD8:

    USB-based 3G modem driver:

    This driver supports 3G (UMTS, HSDPA, HSUPA, HSPA) cards that provide access to 1 or more serial ports through a USB interface. On 1 or more of these interfaces AT commands can be used to talk to the device.

    Transfer speeds should be above 30k on a good UMTS connection and a fast server:

    % curl -o /dev/null ftp://ftp.nl.freebsd.org/pub/FreeBSD/ls-lR.gz
    % Total    % Received % Xferd  Average Speed   Time    Time     Time    Current
    Dload      Upload     Total                    Spent   Left             Speed
    12 19.9M   12 2486k    0     0  40203      0  0:08:39  0:01:03  0:07:36 43921

    Some devices (from Sierra for example) support the ETSI / 3GPP 27.010 Multiplex protocol. A basic implementation which works on an Option Globetrotter GPRS card is available. Contact me for details.
    Verified to work

    See the man page.
    Installation instructions

    The driver is available in both FBSD7 and FBSD8. The one in FBSD8 was written by Hans Peter Selasky. Consult freebsd-usb@ for more information and bug reports.

    The driver should be usable on FBSD6, without too many changes. You will need to patch ucom.c though with this patch.
    Tricks

    * To start your connection automatically use something like the following snippet in your devd.conf:

    attach 100 {
             device-name "ucom[0-9]+";
             match "vendor" "0x12d1";
             match "product" "0x1003";
             action "/usr/sbin/ppp -ddial kpn";
           };

    * Some people have been able to get their device to successfully switch from driver mode to modem mode using usb_modeswitch. You can compile it on FreeBSD with

    cc -L /usr/local/lib -I/usr/local/include -lusb -o usb_modeswitch usb_modeswitch.c

    if you have libusb installed. Note that umass must not be present in your kernel nor as a module.
       * To see signal strength for example while online:
            1. Start ppp (See this page for more info on configuring ppp).
            2. Connect to the other port, in my case /dev/cuaU0.2, using cu -l /dev/cuaU0.2 and type in commands like AT+CSQ and ATI1. You should see responses from the USB dongle.

    http://people.freebsd.org/~n_hibma/u3g.html



  • We have that driver. Just it never heard of your device.

    All drivers have signatures of vendors and type of product and cannot automatically, as of yet, attach to devices you tell too.
    So you have to patch the driver and teach it about your vendor and product type and see if it works for your device.
    Not a job for novices i would say.

    If i had a card to test i would do it by i don't so, you are on your own or ask on freebsd forums.



  • Thanks for the info - I did presume that the generic driver that picked up my modem - is the one designed for FreeBSD8 as mentioned above.

    So - I need someone competent & willing to guide me trough the process…

    Step by step… - or write me a patch.

    PS - this modem is widely used by Neotel in South Africa.



  • It looks to me that the E220 (Vendor/Device ID    0×12d1/0×1003) should be supported by the FreeBSD u3g driver (see src/sys/dev/usb/serial/u3g.c in the source tree). The u3g man page is at http://www.freebsd.org/cgi/man.cgi?query=u3g&apropos=0&sektion=0&manpath=FreeBSD+8.1-RELEASE&format=html

    The "Dupont" device (Vendor/Device ID    0×1d09/0×4000) is not listed in the u3g source file. It would be a easy enough matter to add the ID codes but that will gain nothing except trouble if the Dupont doesn't have a programming interface that is "similar enough" to the E220.

    I suspect it will be more time effective and cost effective to replace the Dupont device by one of the FreeBSD supported devices.



  • Thanks for the answer.

    **We live in the sunshine country. Remember us? World cup?  ;D
    But this need a little background:
    Until Neotel came into the picture and laid undersea optic cables from South Africa [last year],
    we had a state owned monopoly here that supplied users with internet - and the affordable rates gave us 3 gig per month!  >:(
    Neotel only uses this device. So - if, by some help we could get it working - it won't be in vain…
    There are no alternatives… :-\

    In Linux [Smoothwall 2.6 Linux kernel  ] a volunteer got it working - I did attach the driver…. and here it is again.
    Just rename it to usb.tgz from usb.tgz.txt
    Maybe looking at it, somebody can figure out exactly what to do. :)**

    In Smoothwall - This is a complete summary of what should be done:
    "Neotel USB ADSL Modem"
    You dont do the ADSL or IDSN during setup
    Setup using GREEN [and whatever] modem is RED
    Setup IP adresses & DHCP and so on.

    • Do modem setup in ppp on the webbrowser  menu
      Setup username, password and dial number [#777]
      Set modem speed as high as possible.
      Set Idle time to 0 to disable.
    • Under Sevices enable Remote Access
    • Using WinSCP (Neat program) [setup to port 222 and with SSH on 2ONLY]
      edit /etc/rc.d/rc.sysinit and insert the modprobe line
      echo "Loading Neotel USB ADSL"
      /sbin/modprobe usbserial vendor=0x1d09 product=0x4000
      under the following as noted below:
      echo "Loading USB subsystem"
      /sbin/modprobe usbcore 2> /dev/null
      /sbin/modprobe ohci-hcd 2> /dev/null
      /sbin/modprobe uhci-hcd 2> /dev/null
      /sbin/modprobe usbhid 2> /dev/null
      mount -t usbfs none /proc/bus/usb
      echo "Loading Neotel USB ADSL"
      /sbin/modprobe usbserial vendor=0x1d09 product=0x4000
    • Red is the added part - and it must be inserted below the blue part -
    • Using WinSCP Copy the file usb.tgz driver from your pc to  /root on SmoothWall

    Attachment:
    usb.tgz [10.83 KiB]

    • Then use PuTTY (Also neat program) as console to copy paste the exact commands  to be executed.
      [also setup to port 222 and with SSH on 2ONLY]

    Right-click copy the code in this post - just right-click in the console - it will be copied by doing this:

    Code:
    tar -zxvf usb.tgz -C /

    Result:

    SmoothWall (root) ~ $ tar -zxvf usb.tgz -C /
         lib/modules/2.6.16.60/kernel/drivers/usb/serial/
         lib/modules/2.6.16.60/kernel/drivers/usb/serial/usbserial.ko
         SmoothWall (root) ~ $

    and

    Code:
    depmod -a

    Result:

    SmoothWall (root) ~ $ depmod -a
    SmoothWall (root) ~ $

    Reboot.

    Test com ports again. No go. :roll:

    [ You have to change to different com ports in ppp settings under networking (in your brouser),
    SAVE for each change on com ports and then dial in from the menu under Control in the menu]

    So, do the following:

    Code:
    rm -f /dev/ttyS{3,4}
    mknod /dev/ttyUSB0 c 188 0
    mknod /dev/ttyUSB1 c 188 1
    ln -s /dev/ttyUSB0 /dev/ttyS3
    ln -s /dev/ttyUSB1 /dev/ttyS4

    Result:

    SmoothWall (root) ~ $ rm -f /dev/ttyS{3,4}
         SmoothWall (root) ~ $ mknod /dev/ttyUSB0 c 188 0
         mknod: /dev/ttyUSB0': File exists      SmoothWall (root) ~ $ mknod /dev/ttyUSB1 c 188 1      mknod:/dev/ttyUSB1': File exists
         SmoothWall (root) ~ $ ln -s /dev/ttyUSB0 /dev/ttyS3
         SmoothWall (root) ~ $ ln -s /dev/ttyUSB1 /dev/ttyS4
         SmoothWall (root) ~ $

    Reboot not needed

    Test com ports again.

    And LIFTOF! :!:
    ON COM4 on my Smoothie
    Panel lighting up on modem. Smoothwall beeps.

    [the Code:
    rm -f /dev/ttyS{3,4}
    ln -s /dev/ttyUSB0 /dev/ttyS3
    ln -s /dev/ttyUSB1 /dev/ttyS4
    only needs to be done once (best to do it when you install the usb module). all this does is map the usb com]
    ports to standard ones as the smoothwall interface doen't know about usb com ports.

    usb.tgz.txt



  • For other linux - the driver is in the kernel:

    Instructions:

    Steps are as follows (with sample explanation to follow):

    • modprobe the usbserial driver directly for the device
    • ppp dialer config

    How to do it:
    Plug in your modem, and then use the 'lsusb' command.

    Code
    user@linux:~$> lsusb
    Bus 002 Device 002: ID 1d09:4000
    Bus 002 Device 001: ID 0000:0000
    Bus 001 Device 001: ID 0000:0000

    Here we get the USB vendor and product ID's (the first one, in this case).

    Now we load the 'usbserial' driver specifically for this device:

    Code
    user@linux:~$> sudo modprobe usbserial vendor=0x1d09 product=0x4000

    As you can see, we use the first segment of the ID number as the vendor, and the second segment as the product ID, both with 0x prepended.

    Now, we check /dev to see that the devices are there:

    Code:

    user@linux:~$>ls /dev/ttyU*
    /dev/ttyUSB0 /dev/ttyUSB1

    Next step is to configure the ppp connection. Since this example is done on an Ubuntu installation, we can use the Debian pppconfig utility

    Code:
    user@linux:~$> sudo pppconfig

    In this utility, you enter the your username, password and the telephone number as needed, and then save the connection. Be sure to pick a descriptive name, as it is what you will be using to dial it up. Exit, and then we're ready to dial.

    Dialing on Ubuntu:

    Code:
    user@linux:~$> sudo pon neotel

    Where "neotel" is the connection name you picked in setup.

    And that's it. At this point if nothing went wrong, you'll have a fully working ppp0 connection up.

    Code:

    ifconfig | grep ppp0



  • Windows 7 driver files - rename txt to zip

    The sys driver file mentions Techfaith  Wireless
    TechFaith USB Modem/Serial Device

    Model Flying EAQ looks like model - 800 mHz is correct

    http://www.techfaithwireless.com/english/products/products_handsets_CDMA.htm
    Compare to
    http://www.duponttelecom.co.za/
    the NeoConnect Prime model

    More info below in mac driver post:

    [Driver Install.zip.txt](/public/imported_attachments/1/Driver Install.zip.txt)
    DriverCfg.txt
    DriverConf.zip.txt
    DriverWin7.zip.txt



  • And the Mac driver called Axesstel_MAC_Driver - maybe another useful clue -
    the site:
    http://www.axesstel.com

    our phone uses CDMA2000 1x-EvDO - the most widely deployed of the global 3G standard:
    Du Pont Telecom
    ModelBC2703 CDMA EVDO Deskphone V/D
    Partno: TR2633313

    Package - neoconnect Prime [the Ethernet model does not give unlimited data ]

    http://www.duponttelecom.co.za/
    http://dupont-solutions.com/index.html
    http://www.teles.de/en/about-us/news/2008/25/

    Axesstel_MAC_Driver_Last.zip.txt



  • OK, now we have a Windows, Mac & Linux driver to figure something out….



  • There is something wrong with your usb.tgz.txt:

    $ tar -zxvf usb.tgz 
    
    gzip: stdin: invalid compressed data–format violated
    tar: Child returned status 1
    tar: Exiting with failure status due to previous errors
    $ 
    


  • @Zani:

    Windows 7 driver files - rename txt to zip

    The sys driver file mentions Techfaith  Wireless
    TechFaith USB Modem/Serial Device

    Model Flying EAQ looks like model - 800 mHz is correct

    http://www.techfaithwireless.com/english/products/products_handsets_CDMA.htm
    Compare to
    http://www.duponttelecom.co.za/
    the NeoConnect Prime model

    Why not use the LAN interface in the phone? (The documentation at techfaithwireless doesn't make it clear whether the phone has BOTH USB and LAN or the choice of USB OR LAN. I couldn't find any mention on the web page or the tariff document of being required to use the USB port.)



  • hi, not to open another topic, I have the same problem with Vodafone (Huawei) K3765. the modem is detected but not shown under interfaces, here is the output:

    ugen1.2: <huawei mobile="" huawei="" technology="">at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON

    bLength = 0x0012
      bDescriptorType = 0x0001
      bcdUSB = 0x0200
      bDeviceClass = 0x0000
      bDeviceSubClass = 0x0000
      bDeviceProtocol = 0x0000
      bMaxPacketSize0 = 0x0040
      idVendor = 0x12d1
      idProduct = 0x1520
      bcdDevice = 0x0000
      iManufacturer = 0x0003  <huawei technology="">iProduct = 0x0002  <huawei mobile="">What this mean? That the modem is supported by the freeBSD or not? With Huawei E220 its working nice but I would like to have 7.2Mbit modem atached.

    Thank you,</huawei></huawei></huawei>



  • Firstly the Linux driver for smoothwall. I tested it back and forth and attach it again :-\ There are 3 copies now… it contains folders.
    Secondly the modem is USB only
    I would have liked another option with ethernet.
    Wallabybob, if you could open the linux driver , can it be used?

    Let us try to get a way to make drivers. 8)

    Yes - I have been reading about reverse engineering the windows USB drivers for Linux.
    U start the USB device in Windows, with its correct drivers, and snoop what they do and how they are functioning.
    SniffUSB 2.0 then creates the log files.
    [Emacs is then used to read the info]
    One would use the log files generated to create a simple libusb skeleton driver through a perl parser.
    Windows have 3 drivers for it:  The modem driver, a composite usb driver, and a diagnostic driver. All their log files is included.

    I don't know how to use the last yet.
    I created  the modems log files. Took me quite a while. I have a second set if there are a need.
    Attached are my log files, again remove.txt. to get the zipped file. ;)

    And yes, let us document the process so that PfSense USB drivers get well populated.

    So let us document each step and at success, post a new How to USB Drivers post - summing up each step.

    [usb - Copy.tgz.txt](/public/imported_attachments/1/usb - Copy.tgz.txt)
    DupontLogs.zip.txt



  • @dimi3:

    I have the same problem with Vodafone (Huawei) K3765. the modem is detected but not shown under interfaces

    The u3g driver does not have that Huawei device in its table of known devices. The fact that FreeBSD calls it ugen1.2 indicates the kernel doesn't have a driver that specifically knows about that device so the USB "generic" device driver has attached to it.

    Perhaps this device is "similar enough" to the other Huawei devices already supported by the u3g driver, perhaps its substantially different.

    I suggest you discuss this with the authors of the FreeBSD u3g driver: Andrea Guzzo aguzzo@anywi.comand Nick Hibma n_hibma@freebsd.org@dimi3:

    With Huawei E220 its working nice but I would like to have 7.2Mbit modem atached.

    It could take a while to get this issue sorted out. The Huawei E1762 and E169 both appear to be supported in FreeBSD 8.1 (see http://azrixx.blogspot.com/2010/05/simple-way-to-use-huawei-e1762-maxis.html and http://www.listware.net/201007/freebsd-mobile/36378-australian-3g-pppconf.html FreeBSD) and both appear to support the 7.2Mbps mode (see http://www.3gmodem.com.hk/Huawei/E169.html and http://www.3gmodem.com.hk/Huawei/E1762.html) although it has been reported that the E1762 is "faster" than the E169 (see http://forums.whirlpool.net.au/forum-replies-archive.cfm/1288764.html)./n_hibma@freebsd.org/aguzzo@anywi.com



  • @Zani:

    Firstly the Linux driver for smoothwall. I tested it back and forth and attach it again :-\

    I originally downloaded it to a Linux system. I have now downloaded the copy to a windows system and WinZip reports "Trailing garbage in GZIP file" and refuses to show me anything in the archive. In both cases I downloaded with Firefox. What are you doing differently to what I've done?

    What you have outlined is certainly possible but can take considerably longer to actually do than it does to describe it.



  • It does seem to be changed when I download the drivers from the post like you did.
    That means I have to think of something else…. >:(

    Anyone that want to look at any of the zipped files, send me a private message.
    Email is the answer….. I SHALL SEND THEM TO YOU :'(



  • Here are the Window USBSniff log files for reverse engineering,  - they are .txt - but maybe rename to .log for use in Emacs  to create a driver from them ….

    The USB modem driver logs

    [MODEM - INIT.log.txt](/public/imported_attachments/1/MODEM - INIT.log.txt)
    [MODEM DIAL MANAGER STARTED.log.txt](/public/imported_attachments/1/MODEM DIAL MANAGER STARTED.log.txt)
    [MODEM DIALED.log.txt](/public/imported_attachments/1/MODEM DIALED.log.txt)
    [MODEM DISCONNECTED.log.txt](/public/imported_attachments/1/MODEM DISCONNECTED.log.txt)
    [MODEM STOPPED.log.txt](/public/imported_attachments/1/MODEM STOPPED.log.txt)



  • Driver 2 Composite USB Driver:

    [COMPOSITE USB - INIT.log.txt](/public/imported_attachments/1/COMPOSITE USB - INIT.log.txt)
    [COMPOSITE USB DIAL MANAGER STARTED.log.txt](/public/imported_attachments/1/COMPOSITE USB DIAL MANAGER STARTED.log.txt)
    [COMPOSITE USB DIALED.log.txt](/public/imported_attachments/1/COMPOSITE USB DIALED.log.txt)



  • Composite diver remaining logs:

    [COMPOSITE USB DISCONNECTED.log.txt](/public/imported_attachments/1/COMPOSITE USB DISCONNECTED.log.txt)
    [COMPOSITE USB STOPPED.log.txt](/public/imported_attachments/1/COMPOSITE USB STOPPED.log.txt)



  • Driver 3 - Diagnostic driver:

    [DIAGNOSTICS on modem - INIT.log.txt](/public/imported_attachments/1/DIAGNOSTICS on modem - INIT.log.txt)
    [DIAGNOSTICS on modem DIAL MANAGER STARTED.log.txt](/public/imported_attachments/1/DIAGNOSTICS on modem DIAL MANAGER STARTED.log.txt)
    [DIAGNOSTICS on modem DIALED.log.txt](/public/imported_attachments/1/DIAGNOSTICS on modem DIALED.log.txt)



  • Diagnostic driver remaining logs:

    [DIAGNOSTICS on modem DISCONNECTED.log.txt](/public/imported_attachments/1/DIAGNOSTICS on modem DISCONNECTED.log.txt)
    [DIAGNOSTICS on modem STOPPED.log.txt](/public/imported_attachments/1/DIAGNOSTICS on modem STOPPED.log.txt)



  • I looked at http://mybroadband.co.za/vb/showthread.php/171823-How-I-got-Neotel-running-on-Ubuntu-9.04… and the Linux source file patched by the procedure.

    It looks to me that just adding the IDs for the "Neotel" modem to the Linux driver that handles a lot of 3G USB modems was sufficient to get this modem working on Linux. This suggests that just adding the Neotel modem IDs to the FreeBSD 3G USB modem driver might just be enough to get it working.

    I'll try to put aside some time in the next few days to work out a binary patch procedure for the kernel to replace one of the existing IDs.



  • Don't know if it will help you wallabybob but it shows how support for E1752 was added.
    http://lists.freebsd.org/pipermail/freebsd-usb/2010-February/008294.html
    http://svn.freebsd.org/viewvc/base?view=revision&revision=206306



  • **Thanks  Wallabybob, I think you are on the right track. ;)  **

    Also - the USBSnoop/Sniff log files can help with what you actually have to do.
    i it does, please let us know - so that others can follow….
    Did you get my private message? i gave you my e-mail address so that I can give you the Linix diver - [also written by an Australian]





  • Thanks Perry.
    A Note: The modem speed is 2.4 Mbps - if you need to take into account when writing the driver….



  • @Zani:

    **Thanks  Wallabybob, I think you are on the right track. ;) **

    @Zani:

    A Note: The modem speed is 2.4 Mbps - if you need to take into account when writing the driver….

    Ah, The perils of volunteering!  :)

    Please be clear about this! I haven't signed up to write a FreeBSD device driver for this device. I did sign up to INVESTIGATE if I could provide a way to get the existing FreeBSD u3g driver to attach to the device so someone could investigate if it would then function correctly enough to be useful.

    Zani: I did get your email. By that stage I had already found the link I posted earlier, showing a patch procedure for the Linux driver.

    @Perry:

    Don't know if it will help you wallabybob but it shows how support for E1752 was added.

    This involved adding the IDs for the E1752 to the u3g driver table AND adding a new initialisation function. The link I posted earlier for the Linux driver update just added the IDs.



  • Wallabybob I do understand :)

    In the meantime I gave Hans Petter Selasky the info,
    and about the getting the driver working under Ubuntu [Code:

    [b]// +++ chrisb

    #define NEOTEL_DEVICE_VENDOR_ID 0x1d09

    #define NEOTEL_DEVICE_PRODUCT_ID 0x4000

    // +++[/b]

    "and then in the struct add:" (the line in colour)

    Code:

    [b]Static struct USB_device_id option_ids[] = {

    { USB_DEVICE(NEOTEL_DEVICE_VENDOR_ID, NEOTEL_DEVICE_PRODUCT_ID) },

    { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },

    { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },
    [/b]

    Save and close gedit.

    "To compile:"

    Code:

    [b]$ cd /usr/src/Linux-source-2.6.28/drivers/USB/serial/

    $ make -C /lib/modules/uname -r/build M=pwd[/b]

    If successful you should see a long list without errors resembling the following:

    Code:

    [b]Make: Entering directory `/usr/src/Linux-headers-2.6.24-21-generic'

    LD /usr/src/Linux-source-2.6.24/drivers/USB/serial/built-in.o

    CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/USB-serial.o

    CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/generic.o

    CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/bus.o

    ....

    Make: Leaving directory `/usr/src/Linux-headers-2.6.24-21-generic'[/b]

    "Backup the old drivers"

    Code:

    [b]$ mv /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko.backup[/b]

    "Now add new drivers (compiled):"

    Code:

    [b]$ cp /usr/src/Linux-source-2.6.28/drivers/USB/serial/option.ko /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko[/b]

    "You also need to load the new option:"

    Code:

    [b]$ gedit /etc/modules[/b]

    "And just add to the end of the file:"

    Code:

    [b]Option[/b]

    Reboot your computer, open a terminal again and type:

    Code:

    [b]$ lsusb[/b]

    Which should produce, among others:

    Code:
    [b]
    Bus 002 Device 002: ID 1d09:4000 TechFaith Wireless Technology Limited[/b]

    [b]Step 3) [/b]

    Open a terminal and type:

    Code:

    [b]$ sudo -s[/b]

    And then:

    Code:

    [b]$ wvdialconf[/b]

    Which should produce something similar to:

    Code:

    [b]Editing `/etc/wvdial.conf'.

    Scanning your serial ports for a modem.

    ttyS0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud

    ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud

    ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

    Modem Port Scan<*1>: S1 S2 S3

    WvModem<*1>: Cannot get information for serial port.

    ttyUSB0<*1>: ATQ0 V1 E1 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

    ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: QUALCOMM INCORPORATED

    ttyUSB0<*1>: Speed 9600: AT -- OK

    ttyUSB0<*1>: Max speed is 9600; that should be safe.

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

    WvModem<*1>: Cannot get information for serial port.

    ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud

    ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud

    ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

    Found a modem on /dev/ttyUSB0.

    Modem configuration written to /etc/wvdial.conf.

    ttyUSB0<info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"
    [/b]

    Now run:

    [b]$ gedit /etc/wvdial.conf[/b]

    Copy and paste the following and change your username and password:

    Code:

    [b][Dialer Defaults]

    Init1 = ATZ

    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    Modem Type = USB Modem

    Baud = 9600

    New PPPD = yes

    Modem = /dev/ttyUSB0

    ISDN = 0

    Stupid Mode = 1

    Phone = #777

    Modem = /dev/ttyUSB0

    Username = 1234567890@neotel.co.za

    Dial Command = ATDT

    Password = 1234

    Baud = 460800

    PPPD Options = crtcts multilink usepeerdns lock defaultroute

    [Dialer neotel]

    Init1 = ATZ

    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    Baud = 460800

    Stupid Mode = 1

    Modem = /dev/ttyUSB0

    Modem Type = USB Modem

    Dial Command = ATDT

    PPPD Options = crtcts multilink usepeerdns lock defaultroute
    [/b]

    Save and close gedit
    [b]
    Step 4)[/b]

    In the terminal, as any user, type:

    [b]$ wvdial[/b]

    Which, if successful, should result in:

    --> WvDial: Internet dialer version 1.60

    --> Cannot get information for serial port.

    --> Initializing modem.

    --> Sending: ATZ ATZ OK

    --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK

    --> Modem initialized. --> Sending: ATDT#777

    --> Waiting for carrier. ATDT#777 CONNECT

    --> Carrier detected. Starting PPP immediately.

    --> Starting pppd at Thu May 14 22:59:46 2009

    --> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied

    --> --> PAP (Password Authentication Protocol) may be flaky.

    --> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied

    --> --> CHAP (Challenge Handshake) may be flaky.

    --> Pid of pppd: 4541

    --> Using interface ppp0

    --> pppd: 0 [1c][08]P [1c][08]

    --> pppd: 0 [1c][08]P [1c][08]

    --> pppd: 0 [1c][08]P [1c][08]

    --> pppd: 0 [1c][08]P [1c][08]

    --> pppd: 0 [1c][08]P [1c][08]

    --> local IP address 41.174.2.250

    --> pppd: 0 [1c][08]P [1c][08]

    --> remote IP address 2.2.2.2

    --> pppd: 0 [1c][08]P [1c][08]

    --> primary DNS address 41.160.0.36

    --> pppd: 0 [1c][08]P [1c][08]

    --> secondary DNS address 41.160.0.37

    --> pppd: 0 [1c][08]P [1c][08]

    and a fully working internet connection!!!!! :D

    to disconnect, in the terminal that is running wvdial, hold ctrl-c

    For a graphical way of dialing...

    Install Gnome-PPP, it uses wvdial as it's backend and works perfectly.

    " target="_blank"> he wrote:

    His answer :
    I think the driver is called uhso.c, see /sys/dev/usb/net/uhso.c . Maybe there
    is a missing VID+PID in the table there if it does not get detected under
    FreeBSD 8+.

    –HPS

    Fredrik Lindberg's answer on HPS:

    I don't recognize the device name nor the IDs. If it's a standard plain
    serial modem for use with ppp then u3g is most likely the correct
    driver.

    Fredrik

    So now I repeat the Ubuntu process from the forum for the sake of comprehensiveness:

    How I [somebody else] got Neotel running on Ubuntu 9.04…

    Decided to install Jaunty as my Hardy was very messy. I've been running Linux since Breezy but still regard myself as a noobie.

    After much trial and tribulation, and many failed attempts on Hardy, I finally got my Neotel Prime running, first time round on Jaunty.

    Following is a step-by-step process which I take NO CREDIT for!

    I am merely posting this in an attempt to make the process a bit easier to understand and follow for all Linux(Ubuntu) users out there wishing to use Neotel.

    This was done on a fresh installation of Ubuntu 9.04 Jaunty Jackalope.

    It helps having an Internet connection for the first step of the process... Otherwise packages can be downloaded seperately and Google will provide details on unpacking and installing.

    Step 1)

    First download the necessary packages we need.

    Open System>Administration>Synaptic Package Manager

    Find and install:

    Code:

    **1) wvdial

    1. Linux-source**

    If the above are not listed, open terminal, use the code(s):

    Code:

    **1) $ sudo apt-get install wvdial

    1. $ sudo apt-get install Linux-source**

    Step 2)

    Open a terminal and type:

    Code:

    **$ sudo -s

    $ cd /usr/src

    $ tar xjvf Linux-source-2.6.28.tar.bz2

    $ gedit /usr/src/Linux-source-2.6.28/drivers/USB/serial/option.c**

    "Now look for static struct USB_device_id option_ids[] about line 300 and add the following just above it:"

    Code:

    **// +++ chrisb

    #define NEOTEL_DEVICE_VENDOR_ID 0x1d09

    #define NEOTEL_DEVICE_PRODUCT_ID 0x4000

    // +++**

    "and then in the struct add:" (the line in colour)

    Code:

    **Static struct USB_device_id option_ids[] = {

    { USB_DEVICE(NEOTEL_DEVICE_VENDOR_ID, NEOTEL_DEVICE_PRODUCT_ID) },

    { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_COLT) },

    { USB_DEVICE(OPTION_VENDOR_ID, OPTION_PRODUCT_RICOLA) },**

    Save and close gedit.

    "To compile:"

    Code:

    **$ cd /usr/src/Linux-source-2.6.28/drivers/USB/serial/

    $ make -C /lib/modules/uname -r/build M=pwd**

    If successful you should see a long list without errors resembling the following:

    Code:

    **Make: Entering directory `/usr/src/Linux-headers-2.6.24-21-generic'

    LD /usr/src/Linux-source-2.6.24/drivers/USB/serial/built-in.o

    CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/USB-serial.o

    CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/generic.o

    CC [M] /usr/src/Linux-source-2.6.24/drivers/USB/serial/bus.o

    ….

    Make: Leaving directory `/usr/src/Linux-headers-2.6.24-21-generic'**

    "Backup the old drivers"

    Code:

    $ mv /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko.backup

    "Now add new drivers (compiled):"

    Code:

    $ cp /usr/src/Linux-source-2.6.28/drivers/USB/serial/option.ko /lib/modules/2.6.28-11-generic/kernel/drivers/USB/serial/option.ko

    "You also need to load the new option:"

    Code:

    $ gedit /etc/modules

    "And just add to the end of the file:"

    Code:

    Option

    Reboot your computer, open a terminal again and type:

    Code:

    $ lsusb

    Which should produce, among others:

    Code:
    Bus 002 Device 002: ID 1d09:4000 TechFaith Wireless Technology Limited

    Step 3)

    Open a terminal and type:

    Code:

    $ sudo -s

    And then:

    Code:

    $ wvdialconf

    Which should produce something similar to:

    Code:

    **Editing `/etc/wvdial.conf'.

    Scanning your serial ports for a modem.

    ttyS0<*1>: ATQ0 V1 E1 – failed with 2400 baud, next try: 9600 baud

    ttyS0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 115200 baud

    ttyS0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

    Modem Port Scan<*1>: S1 S2 S3

    WvModem<*1>: Cannot get information for serial port.

    ttyUSB0<*1>: ATQ0 V1 E1 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 Z -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 -- OK

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

    ttyUSB0<*1>: Modem Identifier: ATI -- Manufacturer: QUALCOMM INCORPORATED

    ttyUSB0<*1>: Speed 9600: AT -- OK

    ttyUSB0<*1>: Max speed is 9600; that should be safe.

    ttyUSB0<*1>: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 -- OK

    WvModem<*1>: Cannot get information for serial port.

    ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud

    ttyUSB1<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud

    ttyUSB1<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.

    Found a modem on /dev/ttyUSB0.

    Modem configuration written to /etc/wvdial.conf.

    ttyUSB0<info>: Speed 9600; init "ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0"</info>**

    Now run:

    $ gedit /etc/wvdial.conf

    Copy and paste the following and change your username and password:

    Code:

    **[Dialer Defaults]

    Init1 = ATZ

    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    Modem Type = USB Modem

    Baud = 9600

    New PPPD = yes

    Modem = /dev/ttyUSB0

    ISDN = 0

    Stupid Mode = 1

    Phone = #777

    Modem = /dev/ttyUSB0

    Username = 1234567890@neotel.co.za

    Dial Command = ATDT

    Password = 1234

    Baud = 460800

    PPPD Options = crtcts multilink usepeerdns lock defaultroute

    [Dialer neotel]

    Init1 = ATZ

    Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

    Baud = 460800

    Stupid Mode = 1

    Modem = /dev/ttyUSB0

    Modem Type = USB Modem

    Dial Command = ATDT

    PPPD Options = crtcts multilink usepeerdns lock defaultroute**

    Save and close gedit
    Step 4)

    In the terminal, as any user, type:

    $ wvdial

    Which, if successful, should result in:

    –> WvDial: Internet dialer version 1.60

    --> Cannot get information for serial port.

    --> Initializing modem.

    --> Sending: ATZ ATZ OK

    --> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 OK

    --> Modem initialized. --> Sending: ATDT#777

    --> Waiting for carrier. ATDT#777 CONNECT

    --> Carrier detected. Starting PPP immediately.

    --> Starting pppd at Thu May 14 22:59:46 2009

    --> Warning: Could not modify /etc/ppp/pap-secrets: Permission denied

    --> --> PAP (Password Authentication Protocol) may be flaky.

    --> Warning: Could not modify /etc/ppp/chap-secrets: Permission denied

    --> --> CHAP (Challenge Handshake) may be flaky.

    --> Pid of pppd: 4541

    --> Using interface ppp0

    --> pppd: 0 [1c][08]P [1c][08]

    –> pppd: 0 [1c][08]P [1c][08]

    –> pppd: 0 [1c][08]P [1c][08]

    –> pppd: 0 [1c][08]P [1c][08]

    –> pppd: 0 [1c][08]P [1c][08]

    –> local IP address 41.174.2.250

    --> pppd: 0 [1c][08]P [1c][08]

    –> remote IP address 2.2.2.2

    --> pppd: 0 [1c][08]P [1c][08]

    –> primary DNS address 41.160.0.36

    --> pppd: 0 [1c][08]P [1c][08]

    –> secondary DNS address 41.160.0.37

    --> pppd: 0 [1c][08]P [1c][08]

    and a fully working internet connection!!!!! :D

    to disconnect, in the terminal that is running wvdial, hold ctrl-c

    For a graphical way of dialing…

    Install Gnome-PPP, it uses wvdial as it's backend and works perfectly.</info>](he wrote:<br /><br />His answer :<br />[color]I think the driver is called uhso.c, see /sys/dev/usb/net/uhso.c . Maybe there<br />is a missing VID+PID in the table there if it does not get detected under<br />FreeBSD 8+.<br /> <br />--HPS[/color]<br /><br />[b]Fredrik Lindberg[/b]'s answer on HPS:<br /><br />[color]I don't recognize the device name nor the IDs. If it's a standard plain<br />serial modem for use with ppp then u3g is most likely the correct<br />driver.<br /> <br />Fredrik[/color]<br /><br />[b]So now I repeat the Ubuntu process from the forum for the sake of comprehensiveness:[/b]<br /><br />How I [somebody else] got Neotel running on Ubuntu 9.04...<br /><br />Decided to install Jaunty as my Hardy was very messy. I've been running Linux since Breezy but still regard myself as a noobie.<br /><br />After much trial and tribulation, and many failed attempts on Hardy, I finally got my Neotel Prime running, first time round on Jaunty.<br /><br />Following is a step-by-step process which I take NO CREDIT for!<br /><br />I am merely posting this in an attempt to make the process a bit easier to understand and follow for all Linux(Ubuntu) users out there wishing to use Neotel.<br /><br />This was done on a fresh installation of Ubuntu 9.04 Jaunty Jackalope.<br /><br />It helps having an Internet connection for the first step of the process... Otherwise packages can be downloaded seperately and Google will provide details on unpacking and installing.<br /><br />[b]Step 1)[/b]<br /><br />First download the necessary packages we need.<br /><br />Open System>Administration>Synaptic Package Manager<br /><br />Find and install:<br /><br />Code:<br /><br />[b]1) wvdial<br /><br />2) Linux-source<br />[/b]<br /><br />If the above are not listed, open terminal, use the code(s):<br /><br />Code:<br /><br />[b]1) $ sudo apt-get install wvdial<br /><br />2) $ sudo apt-get install Linux-source[/b]<br /><br /><br />[b]Step 2) [/b]<br /><br />Open a terminal and type: <br /><br />Code:<br /><br />[b]$ sudo -s<br /><br />$ cd /usr/src<br /><br />$ tar xjvf Linux-source-2.6.28.tar.bz2<br /><br />$ gedit /usr/src/Linux-source-2.6.28/drivers/USB/serial/option.c[/b]<br /><br /><br />)



  • INSTRUCTIONS BY NEOTEL SELF:

    Instructions for Use:

    Steps are as follows (with sample explanation to follow):

    • modprobe the usbserial driver directly for the device

    • ppp dialer config

    How to do it:

    Plug in your modem, and then use the 'lsusb' command.

    Code

    user@linux:~$> lsusb

    Bus 002 Device 002: ID 1d09:4000

    Bus 002 Device 001: ID 0000:0000

    Bus 001 Device 001: ID 0000:0000

    Here we get the USB vendor and product ID's (the first one, in this case).

    Now we load the 'usbserial' driver specifically for this device:

    Code

    user@linux:~$> sudo modprobe usbserial vendor=0x1d09 product=0x4000

    As you can see, we use the first segment of the ID number as the vendor,

    and the second segment as the product ID, both with 0x prepended.

    Now, we check /dev to see that the devices are there:

    Code:

    user@linux:~$>ls /dev/ttyU*

    /dev/ttyUSB0 /dev/ttyUSB1

    Next step is to configure the ppp connection.

    Since this example is done on an Ubuntu installation, we can use the Debian pppconfig utility

    Code:

    user@linux:~$> sudo pppconfig

    In this utility, you enter the your username, password and the telephone number as needed, and then save the connection.

    Be sure to pick a descriptive name, as it is what you will be using to dial it up. Exit, and then we're ready to dial.

    Dialing on Ubuntu:

    Code:

    user@linux:~$> sudo pon neotel

    Where "neotel" is the connection name you picked in setup.

    And that's it. At this point if nothing went wrong, you'll have a fully working ppp0 connection up.

    Code:

    ifconfig | grep ppp0



  • The recent snapshot of pfSense that I downloaded is missing a few components (kgdb and kernel symbols) I hoped to use in the procedure to see if Zani's modem would work with the u3g driver. So here's a way of testing the theory with a standard FreeBSD 8.1:

    1. (if necessary) install FreeBSD 8.1

    2. Boot FreeBSD 8.1 without the modem plugged in.

    3. Login as root and type the bold parts of the following:

    kgdb -w /boot/kernel/kernel /dev/mem

    GNU gdb 6.1.1 [FreeBSD]
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-marcel-freebsd"…
    #0  sched_switch (td=0xc09cdf10, newtd=0xc2d35780, flags=260) at ../../../kern/sched_ule.c:1850
    1850        cpuid = PCPU_GET(cpuid);
    (kgdb) p/x u3g_devs[0]
    $1 = {driver_info = 0x0, idVendor = 0x4a5, idProduct = 0x4068, bcdDevice_lo = 0x0, bcdDevice_hi = 0x0, bDeviceClass = 0x0,
      bDeviceSubClass = 0x0, bDeviceProtocol = 0x0, bInterfaceClass = 0x0, bInterfaceSubClass = 0x0, bInterfaceProtocol = 0x0,
      match_flag_vendor = 0x1, match_flag_product = 0x1, match_flag_dev_lo = 0x0, match_flag_dev_hi = 0x0,
      match_flag_dev_class = 0x0, match_flag_dev_subclass = 0x0, match_flag_dev_protocol = 0x0, match_flag_int_class = 0x0,
      match_flag_int_subclass = 0x0, match_flag_int_protocol = 0x0, match_flags = 0x0}
    (kgdb) set u3g_devs[0].idVendor = 0x1d09
    (kgdb) set u3g_devs[0].idProduct = 0x4000
    (kgdb) p/x u3g_devs[0]
    $2 = {driver_info = 0x0, idVendor = 0x1d09, idProduct = 0x4000, bcdDevice_lo = 0x0, bcdDevice_hi = 0x0, bDeviceClass = 0x0,
      bDeviceSubClass = 0x0, bDeviceProtocol = 0x0, bInterfaceClass = 0x0, bInterfaceSubClass = 0x0, bInterfaceProtocol = 0x0,
      match_flag_vendor = 0x1, match_flag_product = 0x1, match_flag_dev_lo = 0x0, match_flag_dev_hi = 0x0,
      match_flag_dev_class = 0x0, match_flag_dev_subclass = 0x0, match_flag_dev_protocol = 0x0, match_flag_int_class = 0x0,
      match_flag_int_subclass = 0x0, match_flag_int_protocol = 0x0, match_flags = 0x0}
    (kgdb) quit

    This changes an entry in the u3g driver's table of devices it recognises so it will recognise the Neotel modem.

    1. Plug in the modem. On the console the system should report a u3g device.

    2. Configure and attempt to use the u3g interface. I'm hoping to get a 3G modem later this week. I may be able to provide more configuration details later ths week or early next week.

    If the modem works with the (slightly modified) u3g driver you can submit a problem report to the FreeBSD developers to get the corresponding change into the source code and work on the pfSense developers to get it into pfSense.



  • Download the file from here.
    http://www.mediafire.com/?bcsv0efbdq3boyx

    Put it in /boot/kernel on the pfSense install and reboot.
    Is your modem detected after rebooting?

    This is patched kernel with your ids.


Log in to reply