基于GPRS模块的TCPIP协议研究与实现

 2022-02-08 08:02

论文总字数:32714字

摘 要

本科生签名: 指导导师签名: 日期:

基于GPRS模块的TCP/IP协议研究与实现

摘要

GPRS是基于移动GSM网络的一种数据处理技术,是一种高效的跨地域、高实时性而且经济可靠的数据传输技术,广泛用于传输数据量小的应用场合。GPRS模块有两种连接网络的方式,除了支持内置TCP/IP协议栈,也支持通过外置协议栈连入GPRS网络。

本文采用外置协议栈实现GPRS上网,首先介绍了GPRS的技术特点,深入分析使用GPRS外置协议栈的优点,采用LWIP作为外置协议栈。作为轻量级的TCP/IP协议栈,LWIP协议栈适合应用于小的、资源有限的处理器如嵌入式系统。然后重点介绍移植LWIP协议栈的完整过程,深入分析PPP链路的建立过程中代码实现以及在建立过程中的数据流,并在底层PPP链路的基础上进行应用层的编程,完成一个TCP客户端的编写,实现GPRS使用外置协议栈与互联网通讯的功能。

最后,本文简单介绍了作者自行开发的的TCP服务器,用于测试上述的基于LWIP协议栈的GPRS通信系统。实验结果表明,本论文设计的通信系统稳定、可靠,数据传输正确率gt;99%,符合设计要求。

关键词:GPRS TCP/IP协议栈 LWIP

Research and implementation of communication system based on GPRS module

Abstract

General Packet Radio Service (GPRS) is a packet oriented mobile data service based on global system for mobile communications (GSM). It is a cross-regional, real-time and reliable and economical technology of wireless data acquisition system, it was widely used. GPRS modem has two ways to connect internet, one is built-in TCP/IP stacks with AT commands, another uses the external TCP/IP stacks, such as LWIP stacks.

We use external TCP/IP stacks in this paper, we first introduce the specific content of the GPRS technology, then deeply analysis the advantages and disadvantages of built-in AT commands, on this basis, design a communication system using LWIP. LWIP is a small independent implementation of the TCP/IP protocol suite, it is suitable for use in embedded systems with small RAM and small ROM. The main tasks include transplant LWIP protocol suite to main control chip and based on the LWIP protocol suite and write application layer program of GPRS module to achieve simple text transmission communication between GPRS module and internet.

At the end of this paper, we will shortly introduce an independently developed simple TCP server running in virtual host which has a public IP used for test. It turned out that the communication system based on GPRS module with LWIP protocol suite is stable and reliable, success rate gt;99%, in line with the design requirements.

Keywords: GPRS TCP/IP stack LWIP

目 录

摘要……………………………………………………………………………………………………………………………3

Abstract………………………………………………………………………………………………………………………33

第一章 绪论…………………………………………………………………………………………………………….1

1.1 课题背景…………………………………………………………………………………………….……..1

1.2 研究目的与意义………………………………………………………………………………………..1

1.3 论文内容及结构安排……………………………………………………………………………..….1

第二章 GPRS与TCP/IP协议栈概述…………………………………………………….………………....2

2.1 GPRS通信服务的特点…………………………………………………………….…………..………2

2.2 GPRS组网方式…………………………………………………………………………………..…..…..2

2.3 GPRS内置协议栈优缺点…………………………………………………………….…..………….2

2.4 TCP/IP协议栈概述…………………………………………………………………………….………..3

2.5 本章小结………………………………………….………………………………….…..………..….…..3

第三章 系统软硬件介绍………………….……………………………………………………………….…....4

3.1 完整系统框架概述…………………………………………………………….…………..………....4

3.2 主控芯片STM32F103RC简介………………………………………………………….…….....5

3.3 GPRS模块简介…………………………………………………………………………....................6

3.4 本章小结………………………………………………………………………………………………..…..7

第四章 系统软件设计………………………………………………………………………………………………9

4.1 软件整体流程………………………………………………………………………….….……...........9

4.2 LWIP简介…………………………………………………………………………….........................11

4.3 LWIP移植过程…………………………………………………………………............................11

4.4 PPP连接………………………………………………………………………………………………………20

4.5 应用层设计…………………………………………………………………………………………………22

4.6 本章小结……………………………………………………………………………………………………..22

第五章 系统实验………………………………………………………………………………………………….…….25

5.1 Linux端的TCP服务器设计………………..……………………………….….......................25

5.2 GPRS通信测试………………..……………………………….…..........................................26

5.3 本章小结…………………………………………………………………………………………….…..….26

第六章 总结与展望……………………………………………………………………………………………..….…27

致谢………………………………………………………………………………………………………………………..…...28

参考文献……………………………………………………………………………………………………………….…….29

  1. 绪论
    1. 课题背景

随着信息时代的发展的到来,通信技术正发生着日新月异的变化,移动通信技术已经由早先的GSM短信时代发展到现在的4G时代,并正朝着5G时代大步前进。GPRS通信技术(2.5G)是移动通信网络发展的重要一部分,至今仍然发挥着重要作用。尤其是在传输数据量小的应用场合,2G网仍然是一种可靠而且经济的选择。

GPRS是基于移动GSM网络的一种数据理技术,是无线数据采集系统的一种高效的跨地域、高速、大容量、高实时性的数据传输技术。移动芯片厂商针对GPRS网络研发了大量的GPRS模块,常见的有希姆通公司的SIM808,SIM900,广和通公司的G510等。这些模块都含有内置AT命令实现TCP/IP协议栈功能。

剩余内容已隐藏,请支付后下载全文,论文总字数:32714字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;