网站导航免费论文 原创论文 论文搜索 原创论文 网学软件 学术大家 资料中心 会员中心 问题解答 原创论文 大学论文导航 设计下载 最新论文 下载排行 原创论文
返回网学首页
网学联系
最新论文 推荐专题 热门论文 素材专题
当前位置: 网学 > 编程文档 > 其他类别 > 正文

一个Linux下基于电话线路的数据通信程序的设计与实现

来源:http://myeducs.cn 联系QQ:点击这里给我发消息 作者: 用户投稿 来源: 网络 发布时间: 16/01/31

文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学的各位小编整理了其他类别-一个Linux下基于电话线路的数据通信程序的设计与实现的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!

包括论文,设计,论文字数:13807,页数:29

摘    要
本设计基于Linux操作系统,控制本地MODEM通过电话线网向异地终端机所带MODEM拨号,并实现两台MODEM之间数据传输,达到两台计算机之间数据通信的目的。 MODEM与计算机RS-232串行端口相连,Linux通过POSIX termios接口控制计算机串行端口,方便实现了对计算机串行端口的设置和数据读写。计算机(DTE)与MODEM(DCE)之间数据交换,以及计算机对MODEM的控制,就是计算机对串行端口的读写。
本文作者完成了对RS-232串行端的设置和读写操作,利用AT命令控制MODEM拨号,和一个文件传输协议,实现了两台PC机利用MODEM通过公用电话网,传送和接收文件。本设计旨在使没有安装网络的用户,利用56K MODEM,通过电话线网方便和对方传输数据。相比较Internet网络,电话线网更安全,分布更广泛。本设计就是利用了电话线网的广泛性和安全性。

关键词:Linux;串行端口;MODEM

The Design and Implementation of Data Transportation through Telephone Line in Linux
Abstract
The purpose of the design is to control the local MODEM to dial remote terminal by telephone line base on Linux operating system. At the same time,it can make the data transmit between two MODEMs to achieve the purpose of data transportation. the MODEM is connected to the computer through the serial port RS-232. Linux can control the serial port of the computer by POSIX termios interface. That can carry out the setting and data reading/writing of the serial port, the data transmit between computers (DTE) and MODEM (DCE), and the control from the computer to the MODEM, namely, the reading/writing of the serial port from the computer.
The author of this paper accomplishes the setting and reading/writing operation, using the AT commands to control the MODEM dialing, and a transport protocols for files. All of these make two PCs send and receive files from the public telephone line by using the MODEM. The design is intended to make the user who has not installed the network to transmit data with others by telephone lines using the 56k MODEM. Compared with the Internet, the telephone line is safer and widely distributed. The design makes use of the universality and the safety of the telephone line.

Key words: Linux; serial port; MODEM


目  录

1 引  言 2
1.1 设计背景 2
1.2 本设计的意义 2
1.3 设计方法 2
1.4 理论依据 2
2 设计理论依据 2
2.1 Linux 2
2.2 串行端口简介 2
2.2.1 串行通迅 2
2.2.2 RS-232-C 2
2.2.3 异步通迅 3
2.3 MODEM简介 4
2.3.1 MODEM 4
2.3.2 AT命令 4
3 系统开发环境 5
3.1 系统开发环境 5
3.2 gcc简介 5
4 程序的设计 6
4.1 设计概要 6
4.2 RS-232-C建立与打开 7
4.3 串口设置与读写 8
4.3.1 c_cflag控制项设置 8
4.3.2 c_iflag、c_lflag和c_oflag设置 9
4.3.3 c_cc控制字符设置 10
4.3.4 读写串口 11
4.4 MODEM的控制 12
4.4.1 MODEM的两种工作状态 12
4.4.2 DTE与DCE的握手 12
4.4.3 MODEM拨号连接 13
4.5 文件传输协议的设计 14
5 编码实现 16
5.1 串口初始化实现 16
5.2 串口读写的实现 17
5.3 MODEM初始化的实现 18
5.4 MODEM状态读取的实现 20
6 程序测试 20
6.1 串口传输文件测试 20
6.2 MODEM拨号连接并传输数据测试 21
结    论 21
参考文献 22
致    谢 23
声    明 24

一个Linux下基于电话线路的数据通信程序的设计与实现......
  • 上一篇资讯: [其他类别]
  • 版权所有 QQ:3710167 邮箱:3710167@qq.com 网学网 [Myeducs.cn] 您电脑的分辨率是 像素
    Copyright 2008-2015 myeducs.Cn www.myeducs.Cn All Rights Reserved 湘ICP备09003080号