On Sun, 26 Apr 2009 15:08:05 +0200 Thomas Pfaff <[email protected]> wrote:
> On Sun, 26 Apr 2009 13:41:56 +0200 > Thomas Pfaff <[email protected]> wrote: > > Hi. Is it possible to use ubt(4) to connect to my cellphone and > > then create a ppp interface so I can gain Internet access? My MSI > > Wind has a built-in USB bluetooth adapter that connects to ubt(4): > > > > $ dmesg | grep ubt0 > > ubt0 at uhub4 port 1 "Micro Star International Bluetooth" rev > > 2.00/31.64 addr 2 > [...] > > As pointed out to me, I completely forgot to tell you what kind > of Internet connection my cellphone has. It's a GPRS/UMTS phone > that's been properly configured for Internet access. And, as > shown in the bt inquiry, it's a Nokia 6233 (no WiFi or anything > too fancy). > According to the manual for your phone, the ability to just *use* the handset to function as an Internet connected device (i.e. "properly configured") is actually different beast than using the handset as a bridge to connect a PC to the Internet. There's a separate configuration that must be done to enable the (bridge) "Packet Data Connection Access Point" feature. See pg. 67 and 68 http://nds1.nokia.com/phones/files/guides/Nokia_6233_UG_en.pdf Also, you might want to note the handset actually supports GPRS, EGPRS, HSCSD, CSD, and WCDMA, along with the well buried fact that there is no way to configure between GPRS and EGPRS; the latter is always used if available. In short, we still don't know what you're actually using ;-) As you'll see on page 67, you have three choices to hook your phone to a computer; (1) Bluetooth, (2) Infrared, and (3) USB data cable. Though it might be possible to get Bluetooth working, the USB data cable might be the easiest. The hope of getting the supposedly required MS-Windows only "Nokia PC Suite" software running on OpenBSD is dismal and pointless. A quick search for `"Nokia PC Suite" linux` turns up: http://ubuntuforums.org/showthread.php?t=378968 Yep, it's doable in linux, so it's probably easier for us. First of all, attach the handset via USB cable go looking for the USB VendorID and ProductID. I plugged in some currently unsupported Phillips webcam that was given to me for christmas: ------------------------------------------------------------------------ $ usbdevs -dv Controller /dev/usb0: addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), Intel (0x8086), rev 1.00 uhub0 port 1 powered port 2 powered port 3 powered port 4 powered port 5 powered port 6 powered Controller /dev/usb1: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel (0x8086), rev 1.00 uhub1 port 1 powered port 2 powered Controller /dev/usb2: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel (0x8086), rev 1.00 uhub2 port 1 powered port 2 powered Controller /dev/usb3: addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel (0x8086), rev 1.00 uhub3 port 1 powered port 2 addr 2: full speed, power 500 mA, config 1, Philips Webcam (0x204a), Sunplus mMobile Inc(0x0471), rev 1.00 uvideo0 $ ------------------------------------------------------------------------ Then from the device line, grab the ProductID (first hex number) and VendorID (second hex number) and go looking if it's supported. ------------------------------------------------------------------------ $ grep -i 0x204a /usr/src/sys/dev/usb/usbdevs $ grep -i 0x0471 /usr/src/sys/dev/usb/usbdevs vendor PHILIPS 0x0471 Philips product PHILIPS DSS150 0x0471 DSS 150 Digital Speaker System $ ------------------------------------------------------------------------ Since I have no clue what handset belonged to the ProductID and VendorID mentioned in the linux upuntu forum, you'll obviously need to figure them out on your own. A quick look for Nokia in our supported USB devices shows: ------------------------------------------------------------------------ $ grep -i nokia /usr/src/sys/dev/usb/usbdevs vendor NOKIA 0x078b Nokia /* Nokia products */ product NOKIA CA42 0x1234 CA-42 Serial ------------------------------------------------------------------------ You might just find the USB-to-serial device on you phone, then again, you might need to add the ProductID and VendorID to usbdevs. If you got lucky, then you'll have a ucom? device listed in your dmesg and have access to the /dev/cuaU? USB call out device (serial) needed to connect with ppp(8). If you've got a serial device, all you need to do is configure ppp(8) to use it. NOTE: AT THIS POINT, I'M *JUST* GUESSING BASED ON MY EVDO SETUP AND WHAT WAS POSTED ON THE UPUNTU FORUM. I'm *GUESSING* your /etc/ppp/ppp.conf file would look something like: ------------------------------------------------------------------------ default: set log connect Phase Chat LQM LCP IPCP CCP tun command handset: set device /dev/cuaU0 set speed 230400 set phone "*99#" set authname <YOUR_USER_NAME> set authkey <YOUR_PASS_WORD> set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \"\" \ AT OK \ ATZ0 OK \ ATQ0 OK \ ATV1 OK \ ATE1 OK \ ATS0=0 OK \ AT&C1 OK \ AT&D2 OK \ AT+FCLASS=0 OK \ \\dATDT\\T TIMEOUT 30 CONNECT" set login set timeout 0 set redial 3 0 set ifaddr 10.0.0.1/0 10.0.0.2 255.255.255.0 0.0.0.0 enable dns set cd off ------------------------------------------------------------------------ The USER_NAME and PASS_WORD might not matter, depending on the type of service and service provider. Also, some providers use a dial "phone" number of "#777" for Internet access, so you'll have to figure out what the number is for your provider. There are some additional ppp.conf examples for wireless/cellular services in umsm(4). If the above /etc/ppp/ppp.conf actually works without modification, I'll be frightened, *very* frightened, but none the less, to bring up the network just run: # ppp -auto handset If it works, you'll see the created tun0 interface in `ifconfig -a` but if not, then you'll promptly enjoy the level of hell otherwise known as debugging ppp(8) connections. CAVEATS: 1.) Supported VendorID for Nokia (they probably have a few) 2.) Supported ProductID for the USB-To-Serial Converter 3.) Debugging ppp(8) with your service provider If you can get past the CAVEATS, you'll be good to go with the USB cable connection. -- J.C. Roberts

