PCMCIA kernel driver support is now included in the 2.4 Linux kernel
tree. The kernel (Redhat 7.2- 2.4.18) does support the PCMCIA. so you
have a choice of using either
the in-kernel PCMCIA drivers, or the drivers included in pcmcia-cs.
The three options are:
1. To build the PCMCIA driver in kernel.
2. To compile the in-kernel PCMCIA driver as a loaded module. This
means that the source code of the driver is
in the /usr/src/linux tree. you compile it as a loaded module, with
"make modules" command. However, you cannot
compile the module separately. The command will compile all module
according to your kernel configuration.
3. Use stand-alone drives, which means that the source code of the
driver is written by yourself, or extracted from
pcmcia-cs package (CARD SERVICE package). And you compile it as a
loaded module. You can compile a stand-alone driver
without compiling any other drives in the pcmcia-cs package.
The other important thing is that Kernel configuration, no matter what
option you chooses
To use the kernel PCMCIA drivers, configure the kernel with CONFIG_PCMCIA
("CardBus support") enabled.
another essential option is "PCMCIA_CONFIG" (enable or disable)
PCMCIA GPRS card driver
the PCMCIA GPRS Card is recognized by the system as a modem, so it should
be supported by the driver SERIAL_CS
This is corresponding to the kernel configuration as "CONFIG_PCMCIA_SERIAL_CS".
My install option is to build a stand-alone driver to "serial_cs.o"
and let system automatically find it and load it with "insmod".
This could be done because the "cardmgr" utility is already installed.
it can be manually inistialized as " /etc/init.d/pcmcia start"
To compile this module, first download and extract the pcmcia_cs package,
and the serial_cs driver will be in the "client" directory,
using "make serial_cs.o" commad to compile it. Then copy it to the
lib/modules/2.4.18/pcmcia/ directory.
As this module is loaded, the system will assign "/dev/ttyS16" for
the new installed GPRS card. It regards it as a serial port.
So, we can communicate with this port with a serial terminal program,
such as "minicom".
Basic AT commands are applied to this device:
AT
OK
ATI
....all information about the card....
Configure Kernel for PPP Support
GPRS is a standard which enables packet-data connection (not circuit-based
data connection protocol such as WAP) over GSM network.
Thus, we can use it to setup a PPP connection in the forwarding node
to network infrastructures.
To setup PPP with LINUX, some prerequisites:
1. install ppp package , which includes the "pppd" and"chat" tools.
2. The kernel should be configured as to support PPP.
This means two options:
1. Kernel is compiled to supprt PPP. Thus, no modules need to be load
additionally.
2. We build PPP support as loadable modules (ppp.o, shlc.o....), using
"make modules" command.
However, the kernel should be configured to support that.
Summarize:
You can compile PPP support directly into your kernel or as a loadable
module.
If you only use PPP some of the time that your Linux machine is operating,
then compiling PPP support as a loadable module is recommended.
Using'kerneld', your kernel will automatically load the module(s) required
to provide PPP support when you start your PPP link process. This saves
valuable memory space: no part of the kernel can be swapped out of memory,
but loadable modules are automatically removed if they are not in use.
To do this, you need to enable loadable module support:-
Enable loadable module
support (CONFIG_MODULES) [Y/n/?] y
To add PPP kernel support, answer the following question:-
PPP (point-to-point)
support (CONFIG_PPP) [M/n/y/?]
For a PPP loadable module, answer M, otherwise for PPP compiled in
as part of the kernel, answer Y.
The configure file is actaully /usr/src/linux/.config
After re-configure the kernel, you have to re-compile it.
After compile, copy the "bzImage" to /boot directory and modify
the LILO to add it in start-up script.
Setup a PPP Connection
Any GPRS subscription must include two important pieces of information:
the first one is the Access Point Name (APN) string,
and the second is the IP address of the Domain Name Server (DNS)
to be used. These information is provided by service provider.
However, iStream PC card is using integrated carrier and interface
for 3V Subscriber Identity Modules (SIM). So it has not a separate
SIM card . Also, the APN and DNS configuration is a little different:
APN: internet3.voicestream.com
DNS: obtain DNS address automatically
To use the NovatelWireless GPRS wireless data card, you must first
configure the card according to the manufacturer and provider
settings. Please contact your provider.
Tested GPRS cards include NovatelWireless Merlin G100 and
NovatelWireless Merlin G201.
Open Minicom:
Type those AT commands:
AT+cgatt this
command attach the card to gprs network
AT+cgact? this
command activate a "CID
AT+cgdcont? this command will
display some default "cid" configuration , include "APN" string
AT+cgdata=?
Based on those commands, you can see the default settings for the card.
Then you can write a ppp script file for the gprs data connection.
Once you have done this, a few files need to be edited. These are:
/etc/ppp/options.gprs:
/dev/ttyS16
115200
defaultroute
ipcp-accept-local
ipcp-accept-remote
noauth
novj
connect '/etc/ppp/chat -v -f chatscript.gprs'
user dummy
usepeerdns
mru 1500
mtu 1500
/etc/ppp/chatscript.gprs:
ABORT BUSY ABORT 'NO CARRIER' ABORT ERROR '' AT OK 'ATDT*99#' CONNECT
/etc/ppp/chap-secrets:
* * "dummy"
After that, start with the following command line:
pppd file /etc/ppp/options.gprs
This will cause the card to attach to the default provider as configured
into your card. To connect to a different provider configured
into a
different config slot in the card, you will have to modify the "ATDT"
string in /etc/ppp/chatscript.gprs according to the documentation
provided by NovatelWireless.
Also, make sure to modify /etc/ppp/chap-secrets with your username and
password as supplied to you by service provider.
After running pppd daemon, then check with "ifconfig"
ppp0 Link encap:Point-to-Point
Protocol
inet addr:216.155.173.8 P-t-P:10.6.6.6 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0
TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:64 (64.0 b) TX bytes:82 (82.0 b)
You can see that the new network PPP0 is established for communication.
And see /var/log/messages file to learn more detail about new interface
such as IP address ,DNS address.
The final step is to:
cp the DNS address allocated by the GPRS network to the /etc/resolv.conf
file.
The DNS resolution will works.
You can use "ping" command to test it such as "ping www.rutgers
edu"