logo Welcome, Guest. Please Login or Register.
July 15, 2006, 12:25:54 am
Home Help Search Login Register
News: Symbian Open Source Community Center

  Symbian Open Source Community Center Forum
  Projects Catogory
  GnuBox
(Moderator: xan)
  How-To: gnubox, Nokia 6630 and Gentoo Linux
previous next
Pages: [1] Reply Notify of replies Send the topic Print
   Author  Topic: How-To: gnubox, Nokia 6630 and Gentoo Linux  (Read 735 times)
WereCatf
Newbie
*

Posts: 6



I'm a llama!

View Profile E-Mail
How-To: gnubox, Nokia 6630 and Gentoo Linux
on: June 12, 2006, 01:34:07 pm
Reply with quote

This how-to is still just a sketch, and I assume you have already have a working bluetooth connection between your Linux box and your mobile. Its not that hard to get it working. http://gentoo-wiki.com/HOWTO_mobile_phone,_Bluetooth_and_GNOME has good instructions for getting it up if you dont have. Also, I write this based on Gentoo Linux. If you use any other distro, you need to adapt the instructions to your specific installation. I have not used any other distro in years, so I cant really assist much.

Also, if it breaks your box or phone, I will not assume any responsibility.

Gnubox working on Nokia 6630:
Download gnubox_6630_80_81.sis and install it. Also download IpView20.sis and install. Then, create a directory called C:\Logs\Gnubox. This will hold all Gnubox logs, which it will generate automatically if the dir exists. (If you dont want logs, just dont create it, or delete it) Then, create a new internet connection on your phone. I used the default web browser to create it. Just name it "Bt". I dont know if it is case-sensitive, but Id suggest to keep it Bt, not bt or BT. You dont need to specify anything else there, no ip-addresses, no gateways, nothing else. Just set the security level to normal. Then save, exit and launch Gnubox. Dont mind the fact that it says it cant find DialOutISP or such. Itll work anyway. Under Gnubox commands, take Install->Create Records. If it gives a warning like "Already in use" or such, just dont mind it. Exit Gnubox, and restart it. Now you should see access point Bt there. All that is left to do is to issue the command 2box Bluetooth->LAN Access Server, choose your Linux box, and answer Yes when it asks about encryption. It will not work if you choose No. Then just choose Install->set default AP to Bt. You can exit Gnubox now.

Linux setup:
Under Linux, install bluez-utils,ppp and iptables if you dont have them already. Also, if you have compiled your kernel yourself, make sure you have all PPP modules either compiled in, or as modules. See Device-drives-->Network device support-->PPP. Also, youll need NAT support in your kernel, so check Networking-->Networking Options-->Network packet filtering. You can safely compile everything there as modules, so only those ones which are needed are actually loaded. If you havent compiled the kernel yourself, you probably have everything set already.

Next step is to setup /etc/bluetooth/hcid.conf. There should be lines like:
        # Authentication and Encryption (Security Mode 3)
        #auth enable;
        #encrypt enable;

Change these to:
        # Authentication and Encryption (Security Mode 3)
        auth enable;
        encrypt enable;

Also, create a file called /etc/ppp/peers/dun and write the following text in it:
  GNU nano 1.3.11          File: /etc/ppp/peers/dun

460800
debug
ipcp-accept-remote
192.168.1.1:192.168.1.2
ms-dns REPLACE_WITH_THE_IP_ADDRESS_OF_YOUR_DNS_SERVER
lock
crtscts
noauth
defaultroute

Notice the line where it says ms-dns? You can check whats your dns server address from the file /etc/resolv.conf. Now issue the commands:
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
dund --listen --encrypt call dun

Also, if you are using Gentoo, you can just edit the file /etc/conf.d/bluetooth, and set DUND_ENABLE to true, and edit the DUND_OPTIONS to DUND_OPTIONS="--listen --persist --encrypt call dun". Oh, and in /etc/conf.d/local.start you could add the lines:
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward

and issue the command "rc-update add local.start default" to have it run automatically on boot.


Now you can check if it works by starting Gnubox on your phone, and choosing Debug->Bring Up IF. If you get any errors, try searching around the forum or asking here.

If you have anything to add to this how-to, or corrections or such, leave a message here.

Cheers

EDIT: I noticed theres a bug on (atleast mine) Nokia 6630. Usually after I reboot my phone, I have to run Gnubox and select Install->Set default AP to Bt to have it work correctly for anything else than Opera. Putty, Profimail etc just try to connect to GPRS otherwise. If you experience the same, try to set the default AP to Bt and check if it works.

Also, I forgot to mention you can use Gnubox to bring the IF up, and then start IPView to check if youve got the correct IP address and DNS settings, and you can also try to ping either the Linux gateway (192.168.1.1) or any server on the net. It was very useful when I was trying to set Gnubox up.
Last Edit: June 12, 2006, 07:04:01 pm by WereCatf Report to moderator   Logged
Pages: [1] Reply Notify of replies Send the topic Print 
previous next
Jump to: 


Login with username, password and session length

Powered by MySQL Powered by PHP Symbian Open Source Community Center Forum | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
Valid XHTML 1.0! Valid CSS!