Samsung SGH-820D with Linux/Ubuntu

This phone works quite well under Ubuntu Dapper (6.06). Ubuntu installs all the needed bluetooth packges by default (I think), but if any of the commands don't exist, install the bluez-utils package and the gnome-bluetooth package. These instructions should really apply to any distro with up to date kernel drivers and bluez packages.

I could use the phone both over bluetooth and USB. GPRS works equally fine over both. I was able to receive files from the phone using the gnome bluetooth file shareing applet, and could access the phone's memory card over USB when the phone was set to be a mass storage device. I tried setting the phone USB mode to camera. It was detected as a camera when plugged in, but gave errors before it could download any pictures.

I mainly followed this howto. The only phone specific info is that rfcomm needs to use channel 3. The first bit of info you need is your phone's bluetooth ID. Get this using hcitool scan. the bluetooth ID is a number that looks like this: E4:12:76:A7:DE:01.

Next you have to set up a pin for bluetooth pairing. This is stored in the file /etc/bluetooth/pin. It should only contain a number, like 1234, of preferably a more secure bluetooth pin. Now we can pair the phone and the PC. On the phone go to the bluetooth menu, enable bluetooth, and search for devices. You should see your computer listed under its hostname. Select it to create the pairing, and enter the same pin as in /etc/bluetooth/pin. Also grant your PC access on the phone so you don't have to confirm everytime.

I used the following configuration files to set up PPP for bluetooth:

/etc/ppp/peers/gprsmodem-bt:

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprsmodem"
debug
/dev/rfcomm0
230400
defaultroute
noipdefault
user ""
usepeerdns

and for a USB connection:

/etc/ppp/peers/gprsmodem-usb:

hide-password
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/gprsmodem"
debug
/dev/ttyACM0
230400
defaultroute
noipdefault
usepeerdns

and the chatscript that is used by both:

/etc/chatscripts/gprsmodem:

TIMEOUT                 15
ECHO                    ON
HANGUP                  ON
''                              AT
OK                              ATZ
OK                              ATD*99*#

The dial string (ATD*99*#) may need to be modified. Could also be 99**1#, 99**2#, etc. depending on which phone setting is being used. It's a bit of a mystery to me. You may also need to add an AT+CGDCONT=1... string. I actually use a slightly different script, which I know to work with MTN in South Africa:

TIMEOUT                 15
ECHO                    ON
HANGUP                  ON
'' ATZ
OK                AT+CGDCONT=1,"IP","myMTN","",0,0
OK                "ATDT*99#"
CONNECT           ''

"MyMTN" is known as the Access Point, and sometimes it must be different. If you are using Vodacom or Cell C in South Africa, you should probably change "MyMTN" to "internet"

To actually connect using bluetooth (after ensuring your phone's bluetooth is on), issue as root at a terminal prompt:

rfcomm bind /dev/rfcomm0 X:X:X:X:X:X 3
pppd call gprsmodem-bt
Of course replace X:X:X:X:X:X with your phone's bluetooth ID

or for USB:

pppd call gprsmodem-usb

To see whats going on:

tail -f /var/log/syslog

or (Ubuntu specific I think)

plog
will show the last couple of pppd output lines. If you see IP numbers, congratulations, you have probably succeeded :)

Posted to TuxMobil