Modem: Difference between revisions

From OLPC
Jump to navigation Jump to search
No edit summary
 
(52 intermediate revisions by 10 users not shown)
Line 1: Line 1:
{{Olpcboxtop|toptext=[[{{PAGENAME}}|XO+Modem]]}}
{{Olpcboxtop|toptext=[[{{PAGENAME}}|XO+Modem]]}}
{{ OBX team |Adviser: [[Michail Bletsas]], Development: [[User:Ankur.verma|Ankur Verma]]}}
{{ OBX team |Adviser: [http://www.laptop.org/en/vision/people/MichailBletsas/ Michail Bletsas], Development: [[User:Ankur.verma|Ankur Verma]]}}
<small>see more [[:Category:OBX templates|templates]] or [[OBX proposals|propose new]]</small>
<small>see more [[:Category:OBX templates|templates]] or [[OBX proposals|propose new]]</small>
{{Olpcboxbottom}}
{{Olpcboxbottom}}
Line 18: Line 18:
* Finland: GPRS will be suitable option in the rural areas for offering the Internet connectivity in the near future. Excerpted from [http://e.finland.fi/netcomm/news/showarticle.asp?intNWSAID=15848]
* Finland: GPRS will be suitable option in the rural areas for offering the Internet connectivity in the near future. Excerpted from [http://e.finland.fi/netcomm/news/showarticle.asp?intNWSAID=15848]


===How to connect XO to Internet using Franklin CDU-680DOrA Mobile Broadband USB Modem===
===XO Internet Connectivity using Franklin CDU-680DOrA Mobile Broadband USB Modem===


The following steps are needed to have this modem working with XO:
The following steps are needed to have this modem working with XO:
Line 24: Line 24:
1. Insert the modem into any USB slot on XO. The device will be shown as a removable storage.
1. Insert the modem into any USB slot on XO. The device will be shown as a removable storage.


2. Copy [http://wiki.laptop.org/go/Image:Cdmamodem.zip] to /home/olpc/ folder on XO using
2. Copy [http://wiki.laptop.org/images/1/10/Cdmamodem.zip] to /home/olpc/ folder on XO using
cp -r cdmamodem.zip /home/olpc
cp -r cdmamodem.zip /home/olpc

Please See: If you are copying these files in different path (other than /home/olpc ), you need to change DPATH variable in modemXO script.


3. Unzip it using
3. Unzip it using
Line 44: Line 46:
[[Image:XO_with_CDMA_Modem.jpg|thumb|center|450px|Working setup]]
[[Image:XO_with_CDMA_Modem.jpg|thumb|center|450px|Working setup]]


===XO Internet Connectivity using AT&T USBConnect 881 Sierra Wireless USB Modem===
===Work in progress here===

Working on finding a generic way of interfacing most modems with XO
This modem does not work with 2.6.22 (and earlier) Kernel release versions. You can check your kernel version by typing <code> uname --r </code> at the console.

If you are running 2.6.22 or earlier versions, you have to go through following steps to update your kernel:

1. Download the kernel rpm from [http://dev.laptop.org/~ankur/kernel-2.6.25-20080619.1.olpc.0.i586.rpm]

2. Install the rpm using following command

rpm -ivh kernel-2.6.25-20080619.1.olpc.0.i586.rpm
cp -a /boot/* /versions/boot/current/boot/

3. Reboot your XO which will automatically install the new kernel.

4. Load <code>usbserial</code> and <code>sierra</code> module using

modprobe usbserial
modprobe sierra

5. Now copy this [http://dev.laptop.org/~ankur/sierraconfig.txt] configuration file for the modem on your XO and run following command:
wvdial --config sierraconfig.txt

===XO Internet Connectivity using Sprint Novatel Wireless Ovation U727 USB Modem===

1. Plug in the device into the USB port. It automatically mounts as a CDROM0.

2. Use following commands
modprobe –r usbserial
modprobe usbserial vendor=0x1410 product=0x4100
eject /dev/sr0

3. You can run <code> sudo dmesg|grep –i ttyUSB </code> to confirm the driver is loaded

4. Now copy this [http://dev.laptop.org/~ankur/sprintconf.txt] configuration file for this modem on your XO and run following command:
wvdial --config sprintconfig.txt

For more information about USB modems from Sprint, refer [http://www4.sprint.com/pcsbusiness/downloads/Sprint%20Mobile%20broadband%20Setup%20Guide%20for%20Linux%201.2.pdf]


===XO Internet Connectivity using Motorola T-mobile Razor V3===

1. You will need a standard USB Cable whose one end is plugged into USB port of XO, and the other end will fit in the data port on your phone.

2. Your phone will be detected as a Modem. It can be verified by looking into /dev/ where a node named ttyACM0 will be created.

3. Now copy this [http://dev.laptop.org/~ankur/motorolaconfig.txt] configuration file for this modem on your XO and run following command:
wvdial --config motorolaconfig.txt


[[Image:XO_with_cell_phone.JPG|thumb|center|450px|Internet Connectivity with a Cell Phone]]

=== XO Internet Connectivity using Dialup modem ===

(These instructions are from K.Karthick Annamalai and Paul Fontelo, National Library of Medicine.)

* Power up your dial-up modem and connect it to the OLPC. (You need a serial to USB adapter as the OLPC doesn’t have a serial port)
* Now check whether the USB port is detected by the OLPC. You can do this by typing the following commands in the terminal as ‘su’:
<pre>
#dmesg
#dmesg | grep USB or #dmesg |grep tty
cd /dev
ls-l
</pre>

* Once your modem is detected type the following commands in the terminal

<pre>wvdialconf /etc/wvdial.conf</pre>

This will scan for the attached modem and display a message as

<pre>
“Found a modem on /dev/ttyUSB0
Modem configuration written to /etc/wvdial.conf”
</pre>

* In the wvdial.conf file change the following:
<pre>
Phone = 123456789 [dialup number]
Username = youraccount
Password = yourpassword
</pre>

* Now run the wvdial
<pre>
#wvdial
</pre>

Once this is done it will connect to the internet. (You can hear sounds from the modem and the CD line will be lit up)

* Sometimes you may not be able to access webpages. This is because of the DNS problem. To fix this, in the resolv.conf file add a nameserver

<pre>
Nameserver 123.45.67.890 [your DNS server] or some DNS server]
</pre>

=== XO Internet Connectivity using GSM phone ===

(These instructions are from K.Karthick Annamalai and Paul Fontelo in the National Library of Medicine.)

Follow the procedures for the dial-up connection. Everything is the same except that you should connect a 3G enabled GSM phone to the OLPC instead of a dial-up modem and edit the wvdial.conf file as follows:
<pre>
Phone = *99#
Username = username [actually use “username”]
Password = password [actually use “password”]
</pre>

=== XO Internet Connectivity using Vodafone service in India ===

wvdial works well (sudo wvdial) with Vodaphone service in India. I used Nokia 6133 via USB but it should work with any phone over USB. I had to get GPRS activated for an extra fee. The settings for /etc/wvdial.conf that worked for me:

<pre>
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = *99#
ISDN = 0
Username = username
Init1 = ATZ
Password = password
Modem = /dev/ttyACM0
Baud = 460800
Init3 = AT+CGDCONT=1, "IP", "www"

</pre>

One hitch, that can be a showstopper, is that after pppd connects it will spit out the DNS server addresses, but these do not show up in /etc/resolv.conf I had to add "nameserver 10.11.230.2" (or whatever your DNS may be) in /etc/resolv.conf This is the DNS server address that wvdial will spit out on the console once ppp connects succewssfully.

===Troubleshooting===
*In case you receive output <code> Cannot open /dev/ttyUSB0: Device or resource busy </code>, you should run <code> kill -9 -1 </code> on XO to kill all services utilizing modem.

*In case you were initially connected to other network, you might need to add the DNS address manually to <code> /etc/resolv.conf </code> file as <code> nameserver <DNS address> </code> to connect to internet. Here are the steps you will need to follow in this case:

From the output of <code> wvdial --config <Configuration file> </code> command , Note down the Primary DNS Address and add it manually to /etc/resolv.conf file:

The contents of /etc/resolv.conf file should look like:

# generated by NetworkManager, do not edit!
search media.mit.edu
nameserver <DNS Address as noted from wvdial output>

*You need to have wvdial installed on XO. As its not provided by default, you have to download and install it using <code> yum -y install wvdial </code>

===How to share internet among other XOs===

If one XO is setup as Mesh Portal Point (MPP), other XOs can access internet with its help.

Following steps are needed to make XO with a modem work as MPP. (Run these commands on the XO connected to modem to be setup as MPP)

1. Follow either of the above mentioned steps so that XO with modem is able to connect to Internet.

2. Type these commands at the terminal.
ifconfig msh0 up

3. Copy [http://wiki.laptop.org/go/Image:Mpp.py] this file to your XO and run this command:
sudo python mpp.py msh0 meshready ppp0

4. Check the channel to which this XO is connected using either the command
olpc-netstatus
or looking in the Sugar UI for Mesh Network #Channel_Number

The following commands need to be run on the XO that should access the internet through MPP setup above:

1. Connect to the above channel using Neighborhood view on XO.

2. Start using internet!


Please See: You can check by running command olpc-netstatus and checking the DNS server which will be the same as IP address of the XO with modem.
===Ideas===


==Ideas==


===Acknowledgments===
==Acknowledgments==
* Michail Bletsas - (my adviser)
* Michail Bletsas - (My advisor) providing invaluable guidance, support and encouragement.
* Thanks to Yanni for his valuable inputs during the development.
* Thanks to Yanni for his valuable inputs during the development.



Latest revision as of 01:13, 3 October 2009

OlpcProject.png Adviser: Michail Bletsas, Development: Ankur Verma

see more templates or propose new

Internet Connectivity using Mobile Technologies (3G, GPRS, CDMA)

Motivation

These different technologies use the infrastructure of mobile telephone networks. Recently there has been a boom in the development of these technologies as exemplified by the following facts:

  • Tanzania: The deployment of the 3G network by Vodacom, deployment of CDMA 800 networks by TTCL and Zantel, deployment of CDMA 450 network by BOL. Excerpted from [1]
  • India: This is the only option for users in rural areas where no other means of broadband Internet are available. GPRS Enabled Cell Phone costs around $10 p.m., Some vendors charge about $0.025 per megabyte. Excerpted from [2]
  • Beijing: 6-month plan costs RMB650 and an annual plan that includes a high-end GPRS modem costs RMB2400, which can work anywhere in China. Excerpted from [3]
  • Finland: GPRS will be suitable option in the rural areas for offering the Internet connectivity in the near future. Excerpted from [4]

XO Internet Connectivity using Franklin CDU-680DOrA Mobile Broadband USB Modem

The following steps are needed to have this modem working with XO:

1. Insert the modem into any USB slot on XO. The device will be shown as a removable storage.

2. Copy [5] to /home/olpc/ folder on XO using

cp -r cdmamodem.zip /home/olpc

Please See: If you are copying these files in different path (other than /home/olpc ), you need to change DPATH variable in modemXO script.

3. Unzip it using

unzip cdmamodem.zip

4. Run modemXO script using

bash modemXO or ./modemXO or bash /home/olpc/cdmamodem/modemXO

Please Note: Necessary Packages will be installed by the script modemXO automatically

  • Wvdial : wvdial-1.54.0-5.2.2.1.i386.rpm
  • PPP: ppp-2.4.4-2.i386.rpm
  • Libwvstreams: libwvstreams-4.2.2-3.fc7.i386.rpm

5. Using command

route -n

You can test that ppp0 is added as an interface. If it is there, you can start using Internet on XO!

Working setup

XO Internet Connectivity using AT&T USBConnect 881 Sierra Wireless USB Modem

This modem does not work with 2.6.22 (and earlier) Kernel release versions. You can check your kernel version by typing uname --r at the console.

If you are running 2.6.22 or earlier versions, you have to go through following steps to update your kernel:

1. Download the kernel rpm from [6]

2. Install the rpm using following command

rpm -ivh kernel-2.6.25-20080619.1.olpc.0.i586.rpm
cp -a /boot/* /versions/boot/current/boot/

3. Reboot your XO which will automatically install the new kernel.

4. Load usbserial and sierra module using

modprobe usbserial
modprobe sierra

5. Now copy this [7] configuration file for the modem on your XO and run following command:

wvdial --config sierraconfig.txt

XO Internet Connectivity using Sprint Novatel Wireless Ovation U727 USB Modem

1. Plug in the device into the USB port. It automatically mounts as a CDROM0.

2. Use following commands

modprobe –r usbserial
modprobe usbserial vendor=0x1410 product=0x4100
eject /dev/sr0

3. You can run sudo dmesg|grep –i ttyUSB to confirm the driver is loaded

4. Now copy this [8] configuration file for this modem on your XO and run following command:

wvdial --config sprintconfig.txt

For more information about USB modems from Sprint, refer [9]


XO Internet Connectivity using Motorola T-mobile Razor V3

1. You will need a standard USB Cable whose one end is plugged into USB port of XO, and the other end will fit in the data port on your phone.

2. Your phone will be detected as a Modem. It can be verified by looking into /dev/ where a node named ttyACM0 will be created.

3. Now copy this [10] configuration file for this modem on your XO and run following command:

wvdial --config motorolaconfig.txt


Internet Connectivity with a Cell Phone

XO Internet Connectivity using Dialup modem

(These instructions are from K.Karthick Annamalai and Paul Fontelo, National Library of Medicine.)

  • Power up your dial-up modem and connect it to the OLPC. (You need a serial to USB adapter as the OLPC doesn’t have a serial port)
  • Now check whether the USB port is detected by the OLPC. You can do this by typing the following commands in the terminal as ‘su’:
#dmesg
#dmesg | grep USB or #dmesg |grep tty
cd /dev
ls-l
  • Once your modem is detected type the following commands in the terminal
wvdialconf  /etc/wvdial.conf

This will scan for the attached modem and display a message as

“Found a modem on /dev/ttyUSB0
Modem configuration written to /etc/wvdial.conf”
  • In the wvdial.conf file change the following:
Phone = 123456789 [dialup number]
Username = youraccount
Password = yourpassword
  • Now run the wvdial
#wvdial

Once this is done it will connect to the internet. (You can hear sounds from the modem and the CD line will be lit up)

  • Sometimes you may not be able to access webpages. This is because of the DNS problem. To fix this, in the resolv.conf file add a nameserver
Nameserver 123.45.67.890 [your DNS server] or some DNS server]

XO Internet Connectivity using GSM phone

(These instructions are from K.Karthick Annamalai and Paul Fontelo in the National Library of Medicine.)

Follow the procedures for the dial-up connection. Everything is the same except that you should connect a 3G enabled GSM phone to the OLPC instead of a dial-up modem and edit the wvdial.conf file as follows:

Phone = *99#
Username = username [actually use “username”]
Password = password [actually use “password”]

XO Internet Connectivity using Vodafone service in India

wvdial works well (sudo wvdial) with Vodaphone service in India. I used Nokia 6133 via USB but it should work with any phone over USB. I had to get GPRS activated for an extra fee. The settings for /etc/wvdial.conf that worked for me:

[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Phone = *99#
ISDN = 0
Username = username
Init1 = ATZ
Password = password
Modem = /dev/ttyACM0
Baud = 460800
Init3 = AT+CGDCONT=1, "IP", "www"

One hitch, that can be a showstopper, is that after pppd connects it will spit out the DNS server addresses, but these do not show up in /etc/resolv.conf I had to add "nameserver 10.11.230.2" (or whatever your DNS may be) in /etc/resolv.conf This is the DNS server address that wvdial will spit out on the console once ppp connects succewssfully.

Troubleshooting

  • In case you receive output Cannot open /dev/ttyUSB0: Device or resource busy , you should run kill -9 -1 on XO to kill all services utilizing modem.
  • In case you were initially connected to other network, you might need to add the DNS address manually to /etc/resolv.conf file as nameserver <DNS address> to connect to internet. Here are the steps you will need to follow in this case:

From the output of wvdial --config <Configuration file> command , Note down the Primary DNS Address and add it manually to /etc/resolv.conf file:

The contents of /etc/resolv.conf file should look like:

# generated by NetworkManager, do not edit!
search media.mit.edu
nameserver <DNS Address as noted from wvdial output>
  • You need to have wvdial installed on XO. As its not provided by default, you have to download and install it using yum -y install wvdial

How to share internet among other XOs

If one XO is setup as Mesh Portal Point (MPP), other XOs can access internet with its help.

Following steps are needed to make XO with a modem work as MPP. (Run these commands on the XO connected to modem to be setup as MPP)

1. Follow either of the above mentioned steps so that XO with modem is able to connect to Internet.

2. Type these commands at the terminal.

ifconfig msh0 up

3. Copy [11] this file to your XO and run this command:

sudo python mpp.py msh0 meshready ppp0

4. Check the channel to which this XO is connected using either the command

olpc-netstatus

or looking in the Sugar UI for Mesh Network #Channel_Number

The following commands need to be run on the XO that should access the internet through MPP setup above:

1. Connect to the above channel using Neighborhood view on XO.

2. Start using internet!

Please See: You can check by running command olpc-netstatus and checking the DNS server which will be the same as IP address of the XO with modem.

Ideas

Acknowledgments

  • Michail Bletsas - (My advisor) providing invaluable guidance, support and encouragement.
  • Thanks to Yanni for his valuable inputs during the development.

Contact

Contact Ankur Verma through -

Email : ankur at laptop org

IRC : ankur on #olpc #sugar