Linux Wireless Network Technology Overview: GPRS, GSM
Source: Internet
Author: User
Article title: Linux Wireless Network Technology Overview: GPRS and GSM. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Linux GPRS and data on GSM
GPRS is a data grouping service used to transmit data through GSM. it is an excellent digital cellular standard. Although the data on GSM is line-switched and occupies a channel in any case, the data on GPRS is always connected (always-on) and packet-switched). The transmission speed of GSM is generally 9.6 kbps, while that of GPRS is 56 kbps to 170 kbps.
The GPRS and GSM chips usually have a UART interface to the system. Traditional serial drivers can drive the connection to the motherboard with built-in GSM/GPRS support (for example, a motherboard with a Siemen MC-45 module connected to the UART channel. Consider factors that may lead to PCMCIA/CF (for example, an optional GPRS card) and serial_cs (a common card service driver used to access PCMCIA serial devices) allows other operating systems to treat this card as a serial device. The first unused serial device (/dev/ttySx) is assigned to this card, which can then be accessed as a serial device. Serial_cs can also simulate serial ports through the gps pcmcia and CF cards. For a usb gprs modem, the USB-to-serial converter generally converts a USB port to a virtual serial port, so the other part of the system regards it as a serial device.
The GPRS network uses GGSN (the GPRS gateway supports nodes) to connect to an external network (such as the Internet ). A gprs device is similar to a modem that has an extended AT command set. before entering the data mode, you must use the AT command to define a context. The context string looks similar to the example in listing 3.
In this example, 1 indicates the context number, the IP address is the data group type, and internet.voicestream.com indicates the Access Point Name (APN) string. 0.0.0.0 indicates that the service provider selects the IP address, other parameters are related to data and header compression. The APN string depends on the service provider. Generally, no user name or password is required.
PPP allows network protocols (such as TCP/IP) to run on a serial link. In the context of a wireless network, PPP can run TCP/IP on GPRS, and data is transmitted through GSM, Bluetooth RFCOMM, and IrDa COMM. Listing 4 provides a common syntax for calling the PPP background process pppd.
Listing 4. calling the public syntax of the PPP background process pppd
Pppd ttySx call connection-script
In this example, ttySx is a physical or virtual serial device (on which PPP runs), and connection-script is a file in the/etc/ppp/peers/directory, this directory contains the AT command sequence used to establish links exchanged between pppd and service providers. After a connection is established and authentication is completed, PPP starts the Network Control Protocol (NCP ). IPCP (Internet Protocol Control Protocol) is the NCP used to run IP addresses. Once IPCP passes through the IP address, PPP starts to interact with the TCP/IP stack.
Listing 5 provides a sample PPP link script used to connect to the GPRS service provider, while listing 6 shows a sample connection script used to connect to the GSM service provider.
Listing 5. pppd link script example for GPRS (/etc/ppp/peer/gprs-script)
115200
Connect "/usr/sbin/chat-s-v" "AT + CGDCONT = 1," IP ",
"Internet2.voicestream.com", "0.0.0.0", 0, 0 OK AT + CGDATA = "PPP", 1"
Crtscts
Noipdefault
Modem
Usepeerdns
Defaultroute
Connect-delay 5000
From the operating system perspective, the data on GSM is similar to the data sent and received through a dial-up debug modem connection. The internet service provider (ISP) uses GSM to dial in the phone number and establishes a dial-up connection. Use the user name and password for authentication.
Once PPP establishes an IP connection with the service provider, TCP applications such as Web browsers can run on GSM/GPRS devices without modification.
The gsmlib project provides a utility for sending voice and SMS (Short Messaging Service, Short Message Service) over GSM (see references for more information ).
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service