Linux wireless network technology: GPRS, GSM

xiaoxiao2021-03-06  107

Author: Sreekrishnan Venkateswaran

Linux GPRS and data on GSM

GPRS is a data packet service for transferring data through GSM, is a superior digital honeycomb standard. Although the data on the GSM is the line exchange and regardless of the use of a channel, the data on the GPRS is a traffic (packet-switched) data stream, and the user pays according to the use. The transmission speed of GSM is generally 9.6 kbps, while GPRS can run with 56 kbps to 170 kbps.

GPRS and GSM chips typically have a UART interface to the system. For the motherboards supported by the built-in GSM / GPRS (eg, a motherboard with a SIEMEN MC-45 module connected to the UART channel), the traditional serial driver can drive this link. Consider the formation factor of PCMCIA / CF (eg, an optional GPRS card), serial_cs (is a common card service driver for accessing the PCMCIA serial device) can allow other operating systems to treat this card as a serial device. The first unused serial device (/ dev / TTYSX) is assigned to this card, then this card can be accessed as a serial device. Serial_Cs can also be serially portable through the Global Positioning System (GPS) PCMCIA and CF cards. For a USB GPRS modem, the USB-To-Serial Converter typically converts to a virtual serial port, so other parts of the system will view it as a serial device.

The GPRS network is connected to an external network (such as an Internet) using the GGSN (GPRS gateway support node). The GPRS device is similar to a modem with an extended AT command set, which must be used to define a context using the AT command before entering the data mode. The context string looks similar to the example given in Listing 3.

Listing 3. Concentration string

'At cgdcont = 1, "ip", "Internet.voiceestream.com", "0.0.0.0", 0, 0'

In this example, 1 represents the context number, IP is a data packet type, Internet.voiceStream.com is an Access Name (APN) string, 0.0.0.0 means that the service provider selects IP addresses, other parameters and data and headers Compression is related. The APN string depends on the service provider. User names and passwords are generally not required.

PPP allows a network protocol (such as TCP / IP) to run on the serial link. In the context of the wireless network, PPP can make TCP / IP on GPRS, and data is transmitted via GSM, Bluetooth RFCMM, and IRDA CommM. Listing 4 gives a public syntinct of the PPP background process PPPD.

Listing 4. Calling the public syntinct of the PPP background process PPPD

PPPD TTYSX CALL Connection-Script

In this example, TTYSX is a physical or virtual serial device (PPP runs on it), and Connection-Script is a file in the / etc / ppp / peers / directory, which is included in the PPPD and service providers. The AT command sequence used to establish a link. After establishing links and completes authentication, PPP will start the Network Control Protocol (NCP). IPCP (Internet Protocol Control Protocol, Internet Protocol Control Protocol) is an NCP for running IP. Once IPCP successfully passes the IP address, PPP begins to interact with TCP / IP stacks. Listing 5 gives an example of a PPP link script for connecting to a GPRS service provider, and Listing 6 shows an example of a connection script for data connections to a GSM service provider.

Listing 5. PPPD link script example (/ etc / ppp / peer / gprs-script) for GPRS

115200 Connect "/ usr / sbin / chat -s -v" "ip", "Internet2.voiceestream.com", "0.0.0.0", 0,0 ok at cgdata = "PPP" 1 "CRTSCTS NOIPDEFAULT MODEM USEPEERDNS DEFAULTROUTE CONNECT-DELAY 5000

From the perspective of the operating system, the data on the GSM is similar to the data that is sent by the dial-up debug demodulator. The phone number of the Internet Service Provider (ISP) is dial-in using GSM, and a dial-up connection is created. Use the username and password to authenticate.

Once PPP establishes an IP connection with the service provider, the TCP application, such as a web browser, can be running on the GSM / GPRS device without changing.

The GSMLIB project provides utilities for sending voice and SMS (Short Messaging Service, SMS) via GSM (see Resources for more information on GSMLIB). It includes a utility that uses the phone book in the Subscriber Identity Module (SIM) card to send and receive SMS messages.

Listing 6. PPPD connection script example (/ etc / ppp / peer / gsm-script) for transferring data over GSM

115200 connect '/ usr / sbin / chat -s -v ABORT "NO CARRIER" ABORT "NO DIALTONE" ABORT "BUSY" "" AT OK ATDT CONNECT' crtscts noipdefault modem user "linux" usepeerdns defaultroute connect-delay 5000

Linux Infrared Data

Infrared Data (IRDA) is a specification with infrared wireless transmission data. Mainly used to connect a laptop or devices such as a video recorder or camera to a computer system.

IRDA speeds from Serial Infrared (SIR) 115 kbps to Very Fast Infrared (VFIR) 16 Mbps. Most IRDA chips in SIR mode are UART 16650 compatible (16650 is a public PC UART), so traditional Linux serial drivers can act as a link level driver. IRDA line specification implementation - IRTTY (DRIVERS / NET / IRDA / IRTTY.C), drives the serial driver drive SIR. The IRPORT driver (Drivers / Net / IRDA / IRPORT.C) replaces the IRTTY and Serial drivers and provides better device control. IRDA chip is not compatible with serial drives has its own device driver. For example, the NSC PC87108 chipset uses its own driver (NSC-IRCC.c). Similar to the HCI-USB driver discussed above, the IRDA-USB.C device driver supports USB IRDA FIR software dogs with the USB Bluetooth device. IRLAP is a link access protocol layer responsible for IRDA devices discovery, retransmission, and stream control. The IRLMP link management and TinyTP remain above IRLAP. And they are IRCOMM and IRLAN layers. IRCOMM (implemented in Net / IRDA / IRCOMM / IRCOMM / IRCMM / IRCMM / IRCOMM / IRCOMM / IRCOMM / IRCOMM / IRCMM / IRCOMM / IRCMM / IRCMM / IRCOMM / IRCMM / IRC) provide the application running on a serial port (such as a terminal emulator). Irlan (implemented in NET / IRDA / IRLAN / IRLAN / IRLAN / IRLAN) provides virtual network interfaces that make TCP / IP running on the Irda stack. The IRLAN code uses register_netde to register the GTE device to the Linux network layer, send data to the Linux IP stack using Netif_RX (similar to the explanation of WLAN drivers and Bluetooth Bnep). IRCOMM is similar to Bluetooth RFcomm, while IRLAN is similar to Bluetooth Bnep.

Irobex is a simple protocol built on Tinytp that allows transmission of binary data. IROBEX extension defines the transmission of different data objects.

In order to apply an IRDA protocol on Linux, an IRDA utility (such as Irattach) must be installed, which is developed as part of the Linux Irda project.

Performance problem

Network performance depends on the characteristics of a particular carrier network. For example, the bandwidth of GPRS depends on the code mode used, and Bluetooth performance is affected by the network segment of the L2CAP layer. For communication between WLAN workstations and access points, frame confirmation will reduce bandwidth, and the number of other workstations using the same access point also brings the same impact.

The characteristics of the wireless network (such as low and fluctuated bandwidth and high delay) will distort TCP metrics and transmission policies. Although most of the loss in the wireless network comes from a signal recession, interference, and connection interrupts, TCP assumes that these losses are related to congestion, so it eliminate algorithms that reduce network traffic. There are a variety of items to adjust the behavior of TCP and web browsers to accommodate wireless networks.

Conclude

In this article, you browsed Linux device drivers and network protocol layers for popular wireless technology including WLAN, Bluetooth, GPRS, GSM, and IRDA. It also learns how different wireless devices work in Linux by tracking the corresponding code paths and discussion related user space tools.

Now, there is an understanding of the core support of various wireless technology, network technology, and bus technology on Linux. You can fix a variety of wireless devices with different formations, developing Linux required to enable non-supported devices. Nuclear code. About author

Sreekrishnan Venkateswaran has a master's degree in computer science in Campl, Campl, India. He started working for IBM India since February 1996. His interest includes designing equipment drivers and network protocols. able to pass

S_krishna@in.ibm.com Contact Sreekrishnan.

Full article:

IBM DeveloperWorks China website

转载请注明原文地址:https://www.9cbs.com/read-126508.html

New Post(0)