Saturday, February 7, 2009

Using Dial-up Networking to Make a GPRS Connection

With most GSM/GPRS modems (except for some PC card modems that allow GPRS access through a network connection without using dial-up networking), you will need to define a dial-up networking connection in Windows that tells the gateway how to use the modem to make a GPRS connection.

Before continuing, you will need to determine the GPRS APN (Access Point Name), the IP address of the WAP gateway, and the MMSC Message Server URL that are used for sending/receiving MMS via your operator network. These settings are operator dependent, and it may be advisable to check the MMS configuration settings on a working mobile phone to determine the correct settings. Note that your mobile operator possibly has multiple GPRS APNs and multiple WAP gateways, and you need the settings that are appropriate for MMS, not for WAP browsing or general internet connectivity.

To define a dial-up networking connection, you will first need to ensure that a modem driver has been configured for your modem in Windows (this is done in the Windows Control Panel under Phone and Modem Options). If you do not have a modem driver for your modem, it is possible to use any of the "Standard" or "Generic" modem drivers that can be manually installed in the Control Panel.

Dial-up Networking connections are then defined under "Network and Dial-up Connections" dialog in the Windows Control Panel. Note that if you are using multiple GSM/GPRS modems, you can define multiple Dial-up networking profiles.

The process will vary slightly between different versions of Windows. The following steps describe the process under Windows 2000:

Select "Make New Connection".

The "Network Connection Wizard" is displayed. Select "Next".

The "Network Connection Type" dialog will be displayed. Select "Dial-up to private network", and select "Next".

On the "Select a Device" dialog, select the GSM/GPRS modem that you will be using for this GPRS connection, and select "Next".

Enter "*99#" as the phone number to dial, and do not use Windows dialing rules.

The system might prompt you whether to create this connection for all users, or only for the current user. Select "All Users".

The final step of the wizard is to assign a name for the Dial-up networking connection. You will need to configure the Now SMS/MMS Gateway to use this named connection, so assign a name that is easy to remember.

Usually after the "Network Connection Wizard" is complete, Windows will automatically display a "Connect" dialog for the connection that was just created. If you do not see this dialog, return to the Windows Control Panel, Select "Network and Dial-up Connections", and select your connection. The "Connect" dialog should then be displayed:

Before testing the configuration, we need to define some additional properties for the GPRS connection, so select the "Properties" button.

The "Properties" dialog, should display a screen similar to the following:

Go to the "Networking" tab. In the "Components checked are used by this connection" list, ensure that only the "Internet Protocol (TCP/IP)" component is selected. Then highlight that component, and select "Properties".

The "Properties" dialog should have an "Advanced" button. Select the "Advanced" button.

Under the "Advanced" settings, a checkbox should appear for "Use default gateway on remote network". Under most configurations, this box should NOT be checked.

When "Use default gateway on remote network" is checked, this means that whenever this connection is active, all internet connectivity will be routed through this connection by default. If you are using a laptop to connect to the internet via GPRS, that may be desirable. However, for a typical configuration of the Now SMS/MMS Gateway, that is not desirable, therefore this setting should not be enabled.

Select "OK" several times to save your changes before returning to the "Connect" dialog.

There is one more configuration setting that must be applied, so select "Cancel" to exit the "Connect" dialog.

Return to the Windows Control Panel, and select "Phone and Modem Options". Select the "Modems" page. Highlight the modem that you will be using, and select "Properties".

Select the "Advanced" page of the properties dialog.

In the "Extra Initialization commands" field, you need to define the name of the GPRS APN that is used for sending/receiving MMS messages. This command takes the format: AT+CGDCONT=1,"IP","GPRS.APN". This will initialize the modem to connect to the proper GPRS APN. Select "OK" to save this setting.

Note that if you are using a phone as a modem, instead of a dedicated modem, perhaps only to send MMS messages, the above setting could confuse existing settings on your phone. This settings command assigns a GPRS CID (connection id) of "1" to the defined GPRS APN. Your phone will already have connection ids defined for existing profile settings on your phone. In this case, you may want to consult the documentation for you phone to determine how to read existing CID values from profile settings on your phone. Rather than defining this "extra initialization command", you can leave this blank, and instead configure the appropriate CID # in the Dial-up Networking Connection instead.

Return to the Windows Control Panel, select "Network and Dial-up Connections", and select the dial-up networking connection that was defined earlier.

If your mobile operator requires a username and password for GPRS connections, then supply those parameters here. Even if your mobile operator does not require a username or password, be sure to check the "Save password" box, so that Windows will remember these settings.

If you are using a GPRS connection id (CID) other than "1", change the "Dial" phone number from "*99#" to "*99***x#", where "x" is the appropriate CID number.

Now select "Dial" to verify that your Dial-up Networking profile is able to connect without errors. Disconnect the connection after verifying that it can connect without errors.

Debian Linux Modem Configuration

The material on this page was prepared using Sarge or Etch
configured using our Installation and Packages pages.
If you did not use our pages to set up your system, what you
encounter on your system may be different than what is given here.


This page covers how to configure dial-up modems. See the Web HOWTO documents for cable or DSL modems. A comparison of cable and DSL broadband services is presented on the Networking page.

First and foremost, make sure your modem is not a "winmodem" (a stripped-down modem that's controlled through a Windows software driver). Second, if at all possible get yourself an external modem. An external non-winmodem modem presents a lot less headaches trying to set up and having the indicator lights to look at during proxy/firewall testing and console FTP (when there is no file transfer progress indicator) is a real benefit. Internal modems basically have three problems. They either; are winmodems, are likely going to be PCI bus modems (and 99% of PCI bus modems are Winmodems), or they have to be set up via software - software which is usually only available for Windows.

Also, if you're going to use an external modem, go into your system BIOS' peripheral settings and take the serial port you've connected the modem (connect the modem before doing this) to out of AUTO mode so that it explicitly uses 3F8h/IRQ4 or and 2F8h/IRQ3.

Note: If your system won't be connected to a network that has Internet access you'll want to spend a little extra to get a good modem. Once you get your system set up using the CDs you'll rely on the modem to update your system. With so many people going to broadband services at home, you can usually pick up an external USR Sportster 56K non-winmodem on eBay for around $35.
Because internal modems also represent an additional serial port, you have to be careful in setting the modem up. If you have an internal modem that you want to try and use, see if it has jumpers on it that will allow you to set the I/O port and IRQ settings. If it doesn't, and it only comes with Windows configuration software, you'll have to temporarily install the modem into a Windows sytsem and use the software to set the I/O port and IRQ values. In addition, ISA-bus internal modems are better for use with Linux than PCI modems. If money is tight, try finding an internal 56K ISA modem that has jumpers (so you can manually set the port and IRQ) on eBay. Again, make certain it's not a winmodem.


The Physical Connection Top of page

Newer ystems will come with either one or two serial ports which are built into the motherboard. These are typically 9-pin male connectors on the back of the PC. You can simply connect an external modem to one of these. If you add an internal modem to the system it has to be set up as the next serial port (for example number 3 in a system that has two of them built in). Or, if you system BIOS allows it, you could disable the second serial port and set the modem up to take its place. The following table will help you set the jumpers or software configuration on an internal modem card.

Serial Port DOS Linux I/O Port IRQ
First COM1 /dev/ttyS0 03F8 4
Second COM2 /dev/ttyS1 02F8 3
Third COM3 /dev/ttyS2 03E8 4
Fourth COM4 /dev/ttyS3 02E8 3

Be careful when specifying the serial ports in Linux/UNIX commands. As you can see from the above table, the Linux ttyS number is one less than the DOS COM number because Linux starts at 0 while DOS starts at 1. If you've had some experience with DOS, typing in ttys0 when you mean the COM1 can take some getting used to.

If you're stuck with an internal modem with no jumpers, or you have problems with an internal modem, try reading through the Modem HOWTO.

Once you've got your modem connected and powered up a simple command will let you know if the system can communicate with it. For a modem connected to the second serial port, simply type in:

echo atdt3333333 > /dev/ttyS1

You should hear some clicking noises from the modem. If it's an external modem you can also look for lights flashing.

If the modem actually dials the '3333333' number you'll quickly want to follow that command with this one:

echo ath > /dev/ttyS1

to hang the modem up.

If the above test didn't work on a desktop system, don't proceed. You've got some troubleshooting to do. Don't overlook the obvious things, like the modem's speaker volume being turned down (you could try listening for the dialing attempt on an extension phone) or you simply used the wrong number for the ttyS part of the command.

For serial ports that are integrated into the motherboard one thing you can try is going into your system's BIOS and hard-setting the values (as given in the above chart) rather than using any "Auto" or "OS configurable" settings. You can also see what the OS thinks the ports are set to using the setserial for the appropriate port. For example, for the second serial port you would use:

setserial /dev/ttyS1

This command does not indicate what the actual port settings are. It merely shows what the OS is going to use to access that port so your hardware port settings, whether set with jumpers or in the BIOS, have to match what this command displays.

The above echo command didn't work when I tried it on my notebook with a 3Com PCMCIA modem. However, it still dialed out and connected fine once I got everything configured as detailed in the next section. The PCMCIA HowTo document covers several useful utilities you can use when working with PCMCIA devices under Linux.


The Logical Connection Top of page

Now that your modem is physcially connected properly it's time to set up a connection to your ISP. Be sure you are logged in as root before proceeding.

There are actually two parts to setting up a connection to your ISP. You have to configure the dialer (the chat program), and the PPP (Point-to-Point Protocol) settings (the pppd daemon). PPP is the protocol that modems use to communicate over a serial link. (PPP is a powerful protocol that is also often used when connecting distant routers over dedicated leased lines.)

Knowing the version of the pppd daemon you're using can sometimes be useful. While pppd doesn't have a command-line parameter to show the version, using the -v parameter does work because it's seen as an invalid parameter and, as such, causes the help screen to appear. The version number is at the top of this information. So to see your pppd version, simply use the command:

pppd -v

To configure chat we have to edit the /etc/chatscripts/provider file. Initially, the file looks like this:

ABORT  BUSY
ABORT "NO CARRIER"
ABORT VOICE
ABORT "NO DIALTONE"
"" ATDT
ogin
word \q
You can edit this file by entering the following two commands:

cd /etc/chatscripts
nano provider
Once you edit the file it should look something like this:

ABORT  BUSY
ABORT "NO CARRIER"
ABORT VOICE
ABORT "NO DIALTONE"
"" ATDT5551212
ogin bgates
word \qluvlinux
Press Ctrl-X and then 'y' when prompted to save the changes (and Enter when the file name is displayed).

Once you've edited and saved the file it's time to configure ppp. Oddly enough, this configuration file has the same name as the dialer configuration file. It's just located in a different place.

/etc/ppp/peers/provider is the ppp configuration file. You edit it by typing in:

cd /etc/ppp/peers
nano provider
There are only two things you need to change in this file:

  • Look for the default modem line which has /dev/modem and change it to the correct ttyS entry for your modem's serial port (ex: /dev/ttyS1 for the second serial port)

  • Look for the speed line which has 38400 and change it to 115200

The speed setting of 115200 may be too high only if you have a 486 computer that doesn't have a 16550 UART chip. If you're using a 486 and not sure of the UART, play it safe and set the speed to 56700 instead. Exit the nano editor saving the file.

There's only one more file that we need to edit and it's not really related to ppp or the dialer. It's a TCP/IP configuration file. The /etc/resolv.conf file is where you enter your DNS server information. If you're going to be connecting to the Interent you need to be able to resolve domain names (we talk more about this on the DNS Services page).

You'll need to use your ISP's DNS server settings, the same way you enter them if you set up a Dialup Networking connection in Windows. If you don't remember these settings your ISP likely lists them on one of their technical support Web pages. Edit the resolv.conf file by entering:

cd /etc
nano resolv.conf
and edit the file entering the two IP addresses of your ISP's DNS servers so it looks like this:

search yourisp.com
nameserver 172.18.180.99
nameserver 192.168.203.5
It's likely that the domain name on the search line is the one you entered during the installation. Be sure to change it to your ISP's domain name. Once you save this file and exit the editor you're ready to roll.

Above we said that the pppd daemon is responsible for setting up the connection. We don't run the daemon directly. Instead we use a couple shell scripts that have been created to set up the connection and to take it down when we're done. These two shell scripts are called pon and poff

Because you changed several configuration files it would be easier to simply reboot the system rather than restart the associated services. Once it comes back up and you're logged in, simply enter:

pon

at the shell prompt to dial and connect to your ISP. If you have an external modem you can watch the lights to see if you get a connect. Once you're connected, see if you can ping one of the DNS servers that you entered in the above resolv.conf file. For example, if the address of one of the DNS servers is 172.18.180.99 you would enter:

ping 172.18.180.99

You should get responses back. Press Ctrl-C to stop the responses.

You can also check to make sure your DNS resolution is working correctly by trying to ping using a domain name.

ping www.debian.org

You should get responses back here also. If you can ping an IP address but not a domain name there's something is wrong in your resolv.conf file.

Note: You may not receive ping responses if you have already configured a network card on your system. This is because the system is using the default gateway setting for your ethernet NIC (if you entered an IP address for one during the install) and not the ppp0 interface that the modem sets up. You can check this out with the command:

route

Look for the default line. Look at the far right column and see if eth0 is listed as the "Iface" for this line. If it is, your system is sending all your Internet-destined traffic out of the NIC (a dead end). Try typing in the following command at the shell prompt:

route add default ppp0

Now try pinging your ISP's DNS server address. You should be able to now because your system is routing traffic out of the modem. You can verify this by looking at the system's routing table again by again entering route by itself at the shell prompt. You should see a second default line with ppp0 listed in the right-most column.

The above behavior is normal. Think about it. If you have a network-connected system but you need to access the Internet via a modem, your network obviously doesn't have a gateway to the Internet. In this case, you shouldn't have a default gateway setting in your NIC configuration. We get more into default gateways and the ping command on the Networking page.

Have you ever surfed the Web using a text-based Web browser? Try it out! At the shell prompt type in:

apt-get install lynx

and press Enter. Once it's installed type in lynx at the shell prompt to start it. Then use the following keys to try it out:

  • use the up and down arrow keys to move from one link to another and look at the text on the current page
  • use the right arrow key to "follow" a link
  • use the left arrow key to return to the previous page
  • hit the g key to enter a URL to go to a different site
  • hit the q key to quit lynx

Have you ever wondered why those HOWTO pages all have the same bland format? It's so they display in a readable format when viewed with text-based browsers. Try looking at one of the HOWTOs in Lynx by press g and then typing in the following URL (note that it, like Linux/UNIX, is case-sensitive):

http://www.tldp.org/HOWTO/Net-HOWTO/

As you can see, you don't need a GUI to get Web-based help with your Linux questions.

You can now also try starting up the GUI with the startx command and firing up the Mozilla browser we installed on the Packages page.

When you're done using the Internet connection be sure to disconnect from your ISP by typing in:

poff

at the shell prompt.


Testing Your Server Top of page

If you've got two phone lines you can use your new dial-up connection to use one phone line to connect your Debian system to your ISP and the other to call a friend or family member in a different part of the country (who also has two phone lines) and walk them through trying out the server capabilities of your Debian system. If you or they don't have two phone lines you could just make sure you're both on line at the same time and e-mail the IP address of your Debian system to them.

The Web Server

If you installed the Apache Web server package as illustrated on our Packages page, you can ask your friend or family member in a different part of the country (or a different part of the world for that matter) to try and access your Web server.

If you're not already connected to the Internet, use the pon command to connect your Debian system to your ISP. Once connected, at the shell prompt type in:

ifconfig

If you've got a network card installed and configured you'll see three "interfaces" listed, the loopback, eth0, and one for ppp0 which is your dial-up connection. If you don't have a NIC you'll just see the loopback and ppp0 entries. Look at the IP address next to "inet addr:" in the ppp0 entry. That's the IP address your ISP assigned to your Debian system for this call. This is what you want your friend or family member to type into their browser. For example, if the IP address assigned for the ppp0 interface is 172.17.59.132, then tell or e-mail your friend or family member to type the following into the location/address bar in their Web browser:

http://172.17.59.132

They should see the same Apache/Debian Web page you may have seen if you tried this back on the Packages page. The difference is they are accessing your system and pulling the page over the Internet where as you were accessing the system and pulling the page over your local network.

How About Telnet ?

The Debian 2.2 install routine enables telnet access by default. (For Woody and Sarge we added the telnet package back on the Installation page.) If your friend or family member is fairly computer-literate you can also have them try and telnet into your system over the Internet. You'll need to create an account for them but that's easy enough. The command:

useradd dad -p october

creates an account with a login name of dad and dad's password is october.

Note: For security reasons, you cannot telnet or ftp into a server using the root superuser ID. You'll want to use the non-root account you created during the Debian installation. In the case of telent, once you log in using your non-root account you can use the su command to log in as root. You'll then have to type in exit twice when you are finished. Once to exit out of the root login, and then one more time to close the telnet session.
We're assuming your friend or family member uses a Windows PC to connect to the Internet. Tell or e-mail them to click on the "Start" button and select "Run" and then in the command input field they just type in:

telnet 172.17.59.132

(or whatever the IP address of your Linux system's ppp0 interface is) and press Enter.

Once connected they should get a login prompt. This is where they enter the ID and password you set up with the above useradd command. Once they log in they should get a shell prompt with a $ at the end. They can then type in different Linux commands as if they were sitting at the console.

You could tell them to disconnect gracefully by typing in exit at the shell prompt but that's no fun. You can see which process they came in as by entering the following command:

ps -A

You'll see an entry for in.telnetd and all the way over on the left side of this line you'll see a PID (Process ID number). It'll be something like 716 or some other number. (If you don't have two phone lines and you're waiting for the person to try and telnet in at your pre-arranged time, you can just press the Up Arrow key and Enter repeatedly to run the ps command to watch for their connection.)

Once you know their PID, you can disconnect them by killing their process. Just type in:

kill 716

(or whatever their PID is) to kill their telnet process which will disconnect them.

Again, be sure to use the poff command when you're finished testing.

There's no reason you can't have a modem connection to the Internet and a network connection to a LAN both going at the same time. As a matter of fact, with such a dual-connected configuration you could set your Debian system up to be a proxy server where it would act as the default gateway for your LAN. We'll cover the basics of that on the Networking page and show you how to set one up on the Proxy/NAT page.

Saturday, January 31, 2009

GPRS SETTING

Free GPRS Configurations

I have been getting lots of mails and questions about how to configure, get free gprs settings for different subscribers every day.
I have already posted so many ways on how to get gprs settings when you have any Nokia or a Sony Ericson’s phone irrespective of any service provider you have,check it here.

But still you have other company mobile like of Samsung ,Htc Touch,Lg and others then check out this post on how get the free gprs settings here.
Note: Still your purpose is not solved and you are not able to configure gprs on your mobile phone for free so you can still manually configure free gprs on your mobile device by manual gprs settings given below for almost every subscriber and their service and if i have missed any one of them do let me know.

Manual Hutch Gprs Settings

Account Name - Hutch_GPRS
User Name - Blank
Password - Blank
Proxy - Enabled/yes
Access Point Name - portalnmms
Full Internet Access Point Name - www
Proxy and Server address - 10.10.1.100
Proxy and Server Port - 8080
Homepage - http://hutchworld.co.in
Authentication Type - Normal

Manual Airtel Gprs Settings
Homepage - any page you want to set.
User Name - Blank
Password - Blank
Proxy - Enabled/yes.
Proxy and Server Adress - 202.56.231.117
Proxy and Server Port - 8080
Data bearer - GPRS or Packet Data.
Access Point Name - airtelgprs.com
Authentication Type - Normal
Use preferred access point - No

Manual Airtel live settings
Account Name - Airtel_live
Homepage - http://live.airtelworld.com
Username - Blank
Password - Blank
Proxy - Enabled/yes
Proxy and Server Adress - 100.1.200.99
Accespoint Name - airtelfun.com
Proxy and Server Port - 8080
Data bearer - GPRS/ Packet Data
Authentication Type - Normal

Manual Idea Gprs Settings
Account Name - idea_GPRS
Username - Blank
Password - Blank
Homepage - http://wap.ideafresh.com
Proxy and Server Port - 8080
Proxy and Server adress - 10.4.42.45
Databearer - GPRS / Packetdata
Acces Point Name - imis
Proxy - Enabled/yes
Authentication Type - Normal

Manual Bsnl Gprs Settings
Account Name - BPL WAP
Username -
Password -
Proxy - Enabled/yes
Homepage - http://wap.mizone.bplmobile.com
Proxy and Server address - 10.0.0.10
Proxy and Server Port - 8080
Publish Post

Acces Point Name - mizone
Data bearer - GPRS/ Packetdata
Authentication Type - Normal