3G Portable Internet Access
Created: 09/30/2009
General Information
First of all, almost all of 3G modem in the market have a "Zero-CD" mode that will automaticaly install a driver when plug in to windows based os, so by default when we plug it in to our freebsd system, it will go to "Zero-CD" mode. We need to change this mode to a "Modem" mode in order to use it in our freebsd system.Requirements
Configuration
Freebsd 7.2 has include u3g driver in it, so we are going to use that driver, load up the driver in /boot/loader.conf or compile it into the kernel, so ask your wife or your house cleaning maid for a choice :). My modem detected as umass0, some of the modem detected as ugen0 so load which that are detected.|
u3g_load="YES" umass_load="YES" |
| # | usbdevs -v |
|
port 1 addr 3: full speed, power 100 mA, config 1, USB MMC Storage(0x1000), Qualcomm, Incorporated(0x05c6), rev 0.00 |
vendor = 0x05c6 and product = 0x1000.
Next use camcontrol devlist command.|
# camcontrol devlist <Option ICON 2.31> at scbus1 target 0 lun 0 (da1,pass1) |
|
attach 100 { match "device-name" "umass[0-9]+"; match "vendor" "0x05c6"; match "product" "0x1000"; match "devclass" "0x00"; action "sleep 3; /sbin/camcontrol cmd `/sbin/camcontrol devlist | /usr/bin/grep Option | /usr/bin/awk '{match($10, /pass[0-9]+/); print substr($10, RSTART, RLENGTH) }'` -c '01 00 00 00 00 00' -i 1 i1 > /dev/null"; }; |
|
<Option ICON 2.31> at scbus1 target 0 lun 0 (da1,pass1) $1 = <Option $2 = ICON $3 = 2.31> $4 = at $5 = scbus1 $6 = target $7 = 0 $8 = lun $9 = 0 $10 = (da1,pass1) /pass[0-9]+/ <- replace with your camcontrol devlist last value, if it was cd1 then it will be /cd[0-9]+/ |
|
/etc/rc.d/devd restart Stopping devd. Starting devd. |
|
# camcontrol devlist <Option ICON 2.31> at scbus1 target 0 lun 0 (da1,pass1) # camcontrol cmd pass1 -c "01 00 00 00 00 00" -i 1 i1 |
|
# MaUi^ (Jun, 21, 2009) # 3G (HSDPA/UTMS) /etc/ppp/ppp.conf (FreeBSD) # This file should be in put in /etc/ppp/ # IMPORTANT! every line IN A LABEL (label:) should start with a space!! # word "#" infront of line tell ppp not to read the line # to start dialing. run --> ppp -ddial label (or any label you add) default: # add default gateway when connected add default HISADDR # ------------------------------ # to enable NAT for sharing internet with other pc nat enable yes # ------------------------------ # enable dcc send from client behind the gateway nat same_ports yes nat use_sockets yes # ------------------------------ # to see connection error/link/speed : tail -f /var/log/ppp.log set log phase tun connect # ------------------------------ # auto update with the isp nameserver in /etc/resolv.conf enable dns # or used other dns server # set dns 127.0.0.1 # ------------------------------ # 3G Celcom. # if using ubsa, ucom0 = cuaU0 # if using u3g, ucom0 = cuaU0.0 3g: set device /dev/cuaU0.0 set dial "ABORT BUSY ABORT NO\sCARRIER TIMEOUT 5 \"\" ATZ OK-ATZ-OK AT+CGDCONT=1,\\"IP\\",\\"celcom3g\\" OK \dATD\T TIMEOUT 40 CONNECT" # dial number are *99# or *99***1 set phone "*99***1#" set authname "" set authkey "" set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 enable lqr disable ipv6cp |
This guide is © 2009 - 2012 Azmawee.
Author: Azmawee
azmawee at yahoo dot com