Discussion:
Trying to use a Nokia N95 as a modem over USB
Andrew Malcolmson
2010-10-30 20:35:55 UTC
Permalink
I'm trying to use the GSM data connection of my Nokia N95-3 as a modem
for my Squeeze laptop over USB.

The Ubuntu wiki indicates that my Nokia is compatible with USB
tethering but a patch to hal rules is required (As per a bug report
filed in 2008 but still open.):

The wiki page:
https://wiki.ubuntu.com/NetworkManager/Hardware/3G#Mobile%20Phones

The bug report:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262566

The patch file:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262566/+attachment/338284/+files/10e_modem_fdi_nokia_N95.patch

I'm trying to understand how to apply the patch. I downloaded the
patch file to /etc/udev/rules.d and run 'sudo patch -p0
<filename.patch>' but patch hangs. I'm not familiar with applying
patches. Is my command wrong is this something to do with a patch
created in 2008 for Ubuntu will not work on a 2010 Debian?
David Sastre
2010-10-30 21:14:47 UTC
Permalink
Post by Andrew Malcolmson
I'm trying to use the GSM data connection of my Nokia N95-3 as a modem
for my Squeeze laptop over USB.
The Ubuntu wiki indicates that my Nokia is compatible with USB
tethering but a patch to hal rules is required (As per a bug report
https://wiki.ubuntu.com/NetworkManager/Hardware/3G#Mobile%20Phones
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262566
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262566/+attachment/338284/+files/10e_modem_fdi_nokia_N95.patch
I'm trying to understand how to apply the patch. I downloaded the
patch file to /etc/udev/rules.d and run 'sudo patch -p0
<filename.patch>' but patch hangs. I'm not familiar with applying
patches. Is my command wrong is this something to do with a patch
created in 2008 for Ubuntu will not work on a 2010 Debian?
I think you should do:

$ sudo patch -p0 < filename.patch

Note the redirection.
--
Huella de clave primaria: 0FDA C36F F110 54F4 D42B D0EB 617D 396C 448B 31EB
Florian Kulzer
2010-10-30 21:47:35 UTC
Permalink
Post by Andrew Malcolmson
I'm trying to use the GSM data connection of my Nokia N95-3 as a modem
for my Squeeze laptop over USB.
The Ubuntu wiki indicates that my Nokia is compatible with USB
tethering but a patch to hal rules is required (As per a bug report
https://wiki.ubuntu.com/NetworkManager/Hardware/3G#Mobile%20Phones
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262566
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/262566/+attachment/338284/+files/10e_modem_fdi_nokia_N95.patch
I'm trying to understand how to apply the patch. I downloaded the
patch file to /etc/udev/rules.d and run 'sudo patch -p0
<filename.patch>' but patch hangs. I'm not familiar with applying
patches. Is my command wrong is this something to do with a patch
created in 2008 for Ubuntu will not work on a 2010 Debian?
It is supposed to work like this:

$ sudo patch -d /usr/share/hal/fdi/information/10freedesktop/ < 10e_modem_fdi_nokia_N95.patch
patching file 10-modem.fdi
Hunk #1 succeeded at 519 with fuzz 2 (offset 218 lines).

This means that 10-modem.fdi on Sid/Squeeze is different from how it was
when the patch was created, but patch seems to think that it
nevertheless found the right place to insert the modification. The
patched 10-modem.fdi looks reasonable to me, but I do not have a Nokia
N95-3 and therefore I cannot be sure if it works. You can revert the
patch if necessary:

sudo patch -Rd /usr/share/hal/fdi/information/10freedesktop/ < 10e_modem_fdi_nokia_N95.patch
--
Regards, |
Florian | http://www.florian-kulzer.eu
Andrew Malcolmson
2010-10-31 00:05:56 UTC
Permalink
Thanks guys: adding the redirection and using '-d' to point to the
location of the file to be patched did it.

However, through much Googling I'm learning that since HAL is now
deprecated in favor of udev, the rules format in fdi files must be
converted to the new udev format as explained at the bottom of this
page:

https://wiki.kubuntu.org/X/InputConfiguration

So, my next task is to convert the data in the patch to udev-speak and
save it to a new rules file in /etc/udev/rules.d which I understand is
where custom rules should be saved.
Andrew McGlashan
2010-10-31 05:15:50 UTC
Permalink
Hi,

I prefer to use a travel router solution myself -- such as the Netcomm
T1 ... it allows standard connectivity via WLAN whilst offering firewall
features.

http://www.netcomm.com.au/netcomm-products/3g-mobile-broadband/3gt1wn

Cheers
--
Kind Regards
AndrewM

Andrew McGlashan
Broadband Solutions now including VoIP
Andrew Malcolmson
2010-11-01 13:33:17 UTC
Permalink
On Sun, Oct 31, 2010 at 1:15 AM, Andrew McGlashan
Hi,
I prefer to use a travel router solution myself -- such as the Netcomm T1
... it allows standard connectivity via WLAN whilst offering firewall
features.
http://www.netcomm.com.au/netcomm-products/3g-mobile-broadband/3gt1wn
Thanks Andrew, good to know about. I like the Ethernet port feature.

I got it working. I had been using a KDE with Debian Sid called
Aptosid. I did a fresh install of Squeeze and the USB tethering
worked straightaway. I noticed that it works more smoothly if the USB
cable is connected before boot.
Klistvud
2010-11-01 13:58:58 UTC
Permalink
Post by Andrew Malcolmson
I got it working. I had been using a KDE with Debian Sid called
Aptosid. I did a fresh install of Squeeze and the USB tethering
worked straightaway. I noticed that it works more smoothly if the USB
cable is connected before boot.
A N95 in "GSM modem mode" (i.e. tethered) will also work via Bluetooth,
so you can do away with USB cables. And, with some third-party software
installed, it should also work as a portable WLAN acces point, although
I haven't personally tried that.
--
Cheerio,

Klistvud
http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801 Please reply to the list, not to
me.
Andrew Malcolmson
2010-11-01 14:44:33 UTC
Permalink
I got it working.  I had been using a KDE with Debian Sid called
Aptosid.  I did a fresh install of Squeeze and the USB tethering
worked straightaway.  I noticed that it works more smoothly if the USB
cable is connected before boot.
A N95 in "GSM modem mode" (i.e. tethered) will also work via Bluetooth, so
you can do away with USB cables. And, with some third-party software
installed, it should also work as a portable WLAN acces point, although I
haven't personally tried that.
Hi Klistvud,

I've never got Bluetooth tethering working. Bluetooth pairing is fine
but when I use the Debian built-in Bluetooth and attempt the DUN
setup, I get a timeout error during 'detecting phone details'. Using
the Blueman DUN wizard I get "Device Added Successfully but Failed to
Connect".

It sound like the phone is not responding to the request but only only
relevant setting I found is 'modem' under Settings/Connectivity where
the only option is infrared. My model is the N95-3. Maybe the N95 8M
is the only one with Bluetooth tethering.
Klistvud
2010-11-01 15:28:16 UTC
Permalink
Post by Andrew Malcolmson
Hi Klistvud,
I've never got Bluetooth tethering working. Bluetooth pairing is fine
but when I use the Debian built-in Bluetooth and attempt the DUN
setup, I get a timeout error during 'detecting phone details'. Using
the Blueman DUN wizard I get "Device Added Successfully but Failed to
Connect".
It sound like the phone is not responding to the request but only only
relevant setting I found is 'modem' under Settings/Connectivity where
the only option is infrared. My model is the N95-3. Maybe the N95 8M
is the only one with Bluetooth tethering.
No, I have an older N95 (that would probably be N95-1 or something like
that) and it works flawlessly. The thing is, I spent several days
hunting down relevant info all over Google in order to make it work.
Some configuration had to be entered manually, IIRC. For some things, I
went "by nose", installing Gnome PPP and what not. I've never heard of
this Blueman DUN wizard. The modem is located at /dev/rfcomm0, while
Gnome PPP will only detect /dev/modem and /dev/ttySx, so its
autodetection is of no use. The hardest part, however, was finding the
relevant codes and numbers and initiation strings for my GSM provider;
providers like to obfuscate these data in proprietary files,
pre-packaged for Windows (and for Macs at best).

this is my /etc/bluetooth/rfcomm.conf:

<code>

#
# RFCOMM configuration file.
#

rfcomm0 {
# # Automatically bind the device at startup
bind yes;
#
# # Bluetooth address of the device
device 00:11:22:33:44:55;
#
# # RFCOMM channel for the connection
channel 4;
#
# # Description of the connection
comment "Nokia N95 Dial-Up Networking";
}

<edoc>

Of course, you must supply your true Nokia's MAC inthere. For finding
the right channel, I think you can use hcitool or something like that.
I repeat, it's quite a bit of work. If you want me to post any
additional config files, just say so.
--
Cheerio,

Klistvud
http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801 Please reply to the list, not to
me.
Andrew Malcolmson
2010-11-02 14:37:00 UTC
Permalink
Post by Klistvud
No, I have an older N95 (that would probably be N95-1 or something like
that) and it works flawlessly. The thing is, I spent several days hunting
down relevant info all over Google in order to make it work. Some
configuration had to be entered manually, IIRC. For some things, I went "by
nose", installing Gnome PPP and what not. I've never heard of this Blueman
DUN wizard. The modem is located at /dev/rfcomm0, while Gnome PPP will only
detect /dev/modem and /dev/ttySx, so its autodetection is of no use. The
hardest part, however, was finding the relevant codes and numbers and
initiation strings for my GSM provider; providers like to obfuscate these
data in proprietary files, pre-packaged for Windows (and for Macs at best).
I did take a crack at this approach following various online tutorials
without success. Good to know that the hard part was the
provider-specific codes as I did not change these from defaults.
Thanks for the offer but unless your provider is Rogers in Canada,
I'll take another look at this method and try and find the Rogers
codes somewhere myself.
Post by Klistvud
<code>
#
# RFCOMM configuration file.
#
rfcomm0 {
#       # Automatically bind the device at startup
       bind yes;
#
#       # Bluetooth address of the device
       device 00:11:22:33:44:55;
#
#       # RFCOMM channel for the connection
       channel 4;
#
#       # Description of the connection
       comment "Nokia N95 Dial-Up Networking";
}
<edoc>
Of course, you must supply your true Nokia's MAC inthere. For finding the
right channel, I think you can use hcitool or something like that. I repeat,
it's quite a bit of work. If you want me to post any additional config
files, just say so.
--
Cheerio,
Klistvud                             http://bufferoverflow.tiddlyspot.com
Certifiable Loonix User #481801      Please reply to the list, not to me.
--
Andrew Malcolmson
2010-11-03 15:53:17 UTC
Permalink
For anyone still following this thread, Bluetooth tethering from the
N95 works using the Bluetooth DUN wizard in Ubuntu 10.10 which uses a
development version of Network Manager 8.1. No doubt these changes
will hit Debian soon in NM 8.2.

Continue reading on narkive:
Loading...