Active Topics

 


Reply
Thread Tools
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#1
I want to connect the N900 to another phone in the same way as I do with the N810. Is it possible? How?

(Note to moderators: please don't merge this thread with irrelevant threads).

Last edited by Matan; 2009-12-19 at 15:49.
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#2
The answer is yes, but it is not easy to setup. Nokia introduced a bug to the kernel that causes the kernel to OOPS when ppp over rfcomm is started. Maybe this is why they did not include this very basic feature?
  • To connect to a phone you need the ppp modules which are not included in the kernel. They can be downloaded here:
    http://my.arava.co.il/~matan/770/n90...mantle1.tar.gz
    Open this file under /lib/modules/current and run (as root) depmod -a . After that the modules will be loaded automatically when needed. Only ppp_async is different from the modules by fanoush: http://talk.maemo.org/showpost.php?p=414731&postcount=5
  • Install pppd package from the above link.
  • After pairing the phone from the GUI, you need to setup rfcomm. Create a file /etc/bluetooth/rfcomm with contents similar to
    Code:
    rfcomm2 {
            bind no;
            device 00:1E:A4:4F:0E:34;
            channel 2;
    }
    replace the address with the BT address of your phone.
  • Setup PPP for GPRS: You need the following files:
    /etc/ppp/peers/gprs:
    Code:
    /dev/rfcomm2
    connect "/usr/sbin/chat -s -v -f /etc/ppp/chat/gprs"
    nocrtscts
    defaultroute
    usepeerdns
    /etc/ppp/chat/gprs:
    Code:
    ABORT   'BUSY'
    ABORT   'NO CARRIER'
    ABORT   'ERROR'
    ''      AT
    OK      AT+CGDCONT=1,"IP","uinternet"
    OK      ATDT*99***1#
    CONNECT
    replace uinternet with the correct APN for your connection.
    /etc/ppp/ip-up.d:
    Code:
    echo nameserver $DNS1 > /tmp/resolv.conf.ppp0
    echo nameserver $DNS2 >> /tmp/resolv.conf.ppp0
    Make this file executable by running chmod a+x /etc/ppp/ip-up.d
  • For maemo applications to know of the connection, you need dummy connections. Install the package (see here: http://talk.maemo.org/showpost.php?p=433821&postcount=2 ). and run the commands:
    Code:
    gconftool-2 -s -t string /system/osso/connectivity/IAP/orange/type DUMMY
    gconftool-2 -s -t string /system/osso/connectivity/IAP/orange/name 'orange'
    You can replace the name orange with any name.
  • To connect run the commands:
    Code:
    rfcomm bind 2
    dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:orange uint32:0
    pppd call gprs
    (The first command is only needed once per boot.)
  • To disconnect, run the commands
    Code:
    dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
    killall pppd
 

The Following 12 Users Say Thank You to Matan For This Useful Post:
Posts: 2,152 | Thanked: 1,490 times | Joined on Jan 2006 @ Czech Republic
#3
Originally Posted by Matan View Post
Only ppp_async is different from the modules by fanoush: http://talk.maemo.org/showpost.php?p=414731&postcount=5
People who tried those modules said they were not working. Updated ones are here http://talk.maemo.org/showthread.php...735#post423735

But still ppp_async is probably still broken there, what did you fix in ppp_async code?
__________________
Newbies click here before posting. Thanks.

If you really need to PM me with troubleshooting question please consider posting it to the forum instead. It is OK to PM me a link to such post then. Thank you.
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#4
In short, tty_ldisc_ops.receive_buf was changed from void to int (and the return value is used somewhere), but in ppp_async.c, the function was not changed from void.

Code:
--- ppp_async.c.org	2009-12-19 17:45:28.000000000 +0200
+++ ppp_async.c	2009-12-19 14:32:23.000000000 +0200
@@ -346,22 +346,30 @@
  * This can now be called from hard interrupt level as well
  * as soft interrupt level or mainline.
  */
-static void
+static int
 ppp_asynctty_receive(struct tty_struct *tty, const unsigned char *buf,
 		  char *cflags, int count)
 {
 	struct asyncppp *ap = ap_get(tty);
 	unsigned long flags;
 
-	if (!ap)
-		return;
+	if (!ap) {
+		return 0;
+	}
 	spin_lock_irqsave(&ap->recv_lock, flags);
 	ppp_async_input(ap, buf, cflags, count);
 	spin_unlock_irqrestore(&ap->recv_lock, flags);
 	if (!skb_queue_empty(&ap->rqueue))
 		tasklet_schedule(&ap->tsk);
 	ap_put(ap);
 	tty_unthrottle(tty);
+	return count;
 }
 
 static void
 

The Following 3 Users Say Thank You to Matan For This Useful Post:
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#5
Update for PR1.1: DNS resolver change. you need to change in the file /etc/ppp/ip-up.d/dns the two occurrences of tmp to var/log for DNS to work.
 
Posts: 10 | Thanked: 3 times | Joined on Apr 2008
#6
Hi Matan,
Thanks for your tutorial. I followed the instructions but still can't connect. I added the section for /etc/bluetooth/rfcomm but the command "rfcomm bind 2" wouldn't work until I renamed the file /etc/bluetooth/rfcomm.conf.

Also, on my N900, /etc/ppp/ip-up.d is an existing directory. I renamed the directory and created a text file with the commands and chmod. Is that the correct thing to do?

Finally, when I try to connect I get the following error:

Nokia-N900-42-11:/etc/bluetooth# pppd call gprs
pppd: The remote system is required to authenticate itself
pppd: but I couldn't find any suitable secret (password) for it to use to do so.

Searching on the web I found hints to add "noauth" to the script, so I added it to /etc/ppp/peers/gprs. Doing this got rid of the error message but I'm still unable to connect. Can you help me? Thanks.

-Pete
 
Posts: 38 | Thanked: 5 times | Joined on Feb 2008
#7
OK i am a little closer to getiing this working but i have no idea what i need to name the files in the /etc/ppp/xxxx/gprs.
 
Posts: 38 | Thanked: 5 times | Joined on Feb 2008
#8
Originally Posted by PTzero View Post
Hi Matan,
Thanks for your tutorial. I followed the instructions but still can't connect. I added the section for /etc/bluetooth/rfcomm but the command "rfcomm bind 2" wouldn't work until I renamed the file /etc/bluetooth/rfcomm.conf.

Also, on my N900, /etc/ppp/ip-up.d is an existing directory. I renamed the directory and created a text file with the commands and chmod. Is that the correct thing to do?

Finally, when I try to connect I get the following error:

Nokia-N900-42-11:/etc/bluetooth# pppd call gprs
pppd: The remote system is required to authenticate itself
pppd: but I couldn't find any suitable secret (password) for it to use to do so.

Searching on the web I found hints to add "noauth" to the script, so I added it to /etc/ppp/peers/gprs. Doing this got rid of the error message but I'm still unable to connect. Can you help me? Thanks.

-Pete
OK i am having the same problem and when i run the script after rfcomm bind 2 i get this:

must use org.mydomain.intertface.method notation, no dot in "stringrange"

Thanks in advance.
 
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#9
There are some mistakes in my instructions:

/etc/bluetooth/rfcomm indeed needs to be /etc/bluetooth/rfcomm.conf

The ...nameserver... script should be called /etc/ppp/ip-up.d/dns, so /etc/ppp/ip-up.d/ should still be a directory. Note that there is an update later in the thread for PR1.1.

About the rfcomm bind problem - can you post the content of your rfcomm.conf file?
 

The Following User Says Thank You to Matan For This Useful Post:
Posts: 38 | Thanked: 5 times | Joined on Feb 2008
#10
#
# RFCOMM configuration file.
#

#rfcomm0 {
# # Automatically bind the device at startup
# bind no;
#
# # Bluetooth address of the device
# device 11:22:33:44:55:66;
#
# # RFCOMM channel for the connection
# channel 1;
#
# # Description of the connection
# comment "Example Bluetooth device";
#}

rfcomm2 {
bind no;
device 00:21:06:28:91:33;
channel 2;
}
is my rfcomm.conf file. I guess i should say that i updated before i started this hack if that has any thing to do with this. I have redone the up-ip.d file and folder so that is taken care of.

Thanks again for your help
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:17.