tc-bmobile_setup-bsd-20050104-KuntzR.txt Configure a b-mobile card on NetBSD v1.1 - Last updated 2005-02-17 ------------------------------ Romain KUNTZ kuntz(at)sfc.wide.ad.jp In this memo, we will explain how to use a B-Mobile card on the NetBSD operating system. NOTE: same procedure can be applied with AirH cards. 1. Plug the card ---------------- Plug the B-Mobile card, and check the system logs: # tail -f /var/log/messages Dec 24 14:36:28 bender /netbsd: com3 at pcmcia2 function 0: serial device Dec 24 14:36:28 bender /netbsd: com3: ns16550a, working fifo A new device has been detected on com3. For your information: com0 is /dev/tty00 com1 is /dev/tty01 com2 is /dev/tty02 com3 is /dev/tty03 Note the tty0X related to you card, we will use it later. 2. PPP Configuration -------------------- Create the following mandatory directories: # mkdir /etc/ppp # mkdir /etc/ppp/peers Then go to the ppp directory, we will create some configuration files. # cd /etc/ppp The "options" file contains common options for all ppp connections. You can add common options in this file, if any: # vi options The "pap-secrets" file contains the username and password used for you ppp connections. Replace "username" and "password" with the username and password provided with your B-Mobile card. # vi pap-secrets username * password * Go to the peers directory, we will create the files specific to the B-Mobile connections. # cd peers Create the "bmobile" file and add the options you need. Typically you will need the following options (see "man pppd"): # vi bmobile tty03 57600 <- replace tty03 with yours. 57600 is the connection speed lock crtscts debug modem lock usepeerdns hide-password defaultroute connect '/usr/sbin/chat -V -f /etc/ppp/peers/bmobile-chat' name username <- replace username with the username you use to connect The "bmobile-chat" contains some options to handle the connection with the provider. Typically you will need the following options (replace 0000000000##00 with the phone number given by your provider): # vi bmobile-chat ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "ERROR" ABORT "NO ANSWER" ABORT "BUSY" ABORT "Username/Password Incorrect" "" "at" OK "atz" OK "atdp0000000000##00" CONNECT "" 3. Connection/Deconnection -------------------------- You can now try to connect with the following command: # pppd call bmobile Jan 4 18:23:02 bender pppd[243]: pppd 2.4.0 started by toor, uid 0 Jan 4 18:23:08 bender pppd[243]: Connect: ppp0 <--> /dev/tty03 Jan 4 18:23:09 bender pppd[243]: local IP address 202.XXX.XXX.XXX Jan 4 18:23:09 bender pppd[243]: remote IP address 202.XXX.XXX.XXX Jan 4 18:23:09 bender pppd[243]: primary DNS address 202.XXX.XXX.XXX Jan 4 18:23:09 bender pppd[243]: secondary DNS address 202.XXX.XXX.XXX You should be able to connect to the Internet! # ping www.free.fr PING www.free.fr (213.228.0.42): 56 data bytes 64 bytes from 213.228.0.42: icmp_seq=0 ttl=35 time=458.535 ms 64 bytes from 213.228.0.42: icmp_seq=1 ttl=35 time=453.362 ms To connect automatically on boot, you can add in /etc/rc.conf: ppp_peers="bmobile" where bmobile is the name of your configuration file (/etc/ppp/peers/bmobile). To disconnect, send a INT signal to pppd: # kill -2 `cat /var/run/ppp0.pid` -- Any questions ? Please mail me: kuntz(at)sfc.wide.ad.jp