freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于gprs模塊的應(yīng)用設(shè)計(jì)-資料下載頁(yè)

2024-09-03 06:07本頁(yè)面

【導(dǎo)讀】GPRS是利用包交換的概念發(fā)展的一套無(wú)線(xiàn)傳輸方式。GPRS網(wǎng)絡(luò)是基于現(xiàn)有的GSM網(wǎng)絡(luò)實(shí)現(xiàn)的。增加一些節(jié)點(diǎn),如GGSN和SGSN。GGSN主要起網(wǎng)關(guān)作用,可以與多種不同的數(shù)據(jù)網(wǎng)絡(luò)連接,如ISDN(綜合。業(yè)務(wù)數(shù)字網(wǎng))、PSPDN和LAN(局域網(wǎng))等。GGSN可以把GSM網(wǎng)中的GPRS. 分組數(shù)據(jù)包進(jìn)行協(xié)議轉(zhuǎn)換,從而把這些分組數(shù)據(jù)包傳送到遠(yuǎn)端的TCP/IP或。因此,CPRS在無(wú)線(xiàn)上網(wǎng)、環(huán)境監(jiān)測(cè)便攜型、交通監(jiān)控、移動(dòng)辦公等行業(yè)中具有無(wú)??杀葦M的性?xún)r(jià)比優(yōu)勢(shì)。系統(tǒng)軟件采用C語(yǔ)言編寫(xiě),在VB環(huán)境下編譯。由于本系統(tǒng)是遠(yuǎn)程管理終端的一個(gè)。模塊,因此在程序的編寫(xiě)中要遵守一定的協(xié)議,這樣才能保證正確通信。如何控制GR47的AT命令對(duì)GR47進(jìn)行初始設(shè)置和對(duì)信息數(shù)據(jù)的處理。數(shù)據(jù)判斷轉(zhuǎn)發(fā)等。主程序是把這些程序塊有機(jī)結(jié)合到一起,相互控制,無(wú)限循環(huán)。

  

【正文】 _flag 6 define GPRS_ACTIVE_flag 7 define uchar unsigned char uchar i_TC35_RECE。 uchar i_receive。 uchar TC35_MAX。 uchar TC35_CON。 uchar TC35_RE[500]。 uchar TC_ATF[]={ATamp。F}。 //格式化命令。 uchar GPRS_QD1[]={AT+CGDCONT=1}。 //設(shè)置 APN 無(wú)線(xiàn)接入點(diǎn) uchar GPRS_QD2[]={IP}。 //設(shè)置 APN 無(wú)線(xiàn)接入點(diǎn) uchar GPRS_QD3[]={CMNET}。 //設(shè)置 APN 無(wú)線(xiàn)接入點(diǎn) uchar GPRS_PPP_CMD[]={AT%ETCPIP=}。 //進(jìn)行 PPP 撥號(hào) // uchar GPRS_IP_DNS_CMD[]={AT%ETCPIP?}。 //查詢(xún)本地IP啟用DNS服務(wù)器 //========DTU 連接 ============================= uchar GPRS_TCP1[]={AT%IPOPEN=}。 //連接服務(wù)器 uchar GPRS_TCP2[]={TCP}。 //連接服務(wù)器 uchar GPRS_TCP3[]={}。 //該 IP 為動(dòng)態(tài)分配 IP 經(jīng)網(wǎng)絡(luò)查詢(xún) uchar GPRS_TCP4[]={1234}。 //服務(wù)器端口號(hào) uchar GPRS_TCP5[]={AT%IPOPEN?}。 uchar GPRS_SEND1[]={AT%IPSEND=}。 //向服務(wù)器發(fā)送數(shù)據(jù) 命令 uchar GPRS_SEND3[]={12345}。 理工大學(xué)學(xué)士學(xué)位論文 31 void delayX(uchar m) { uchar k,h。 for(k=m。k0。k) for(h=0。h255。h++)。 } void init_serial( void ) { P3SEL |= 0x30。 // 選擇 和 做 UART 通信端口 ME1 |= UTXE0 + URXE0。 // 使能 USART0 的發(fā)送和接受 UCTL0 |= CHAR。 // 選擇 8 位字符 UTCTL0 |= SSEL0。 // UCLK = ACLK UBR00 = 0x03。 // 波特率 9600 UBR10 = 0x00。 // UMCTL0 = 0x4A。 // Modulation UCTL0 amp。= ~SWRST。 // 初始化 UART 狀態(tài)機(jī) IE1 |= URXIE0。 // 使能 USART0 的接收中斷 } void send_uart( uchar a_s) { while (!(IFG1 amp。 UTXIFG0))。 //等待發(fā)送寄存器為空 TXBUF0 = a_s。 } void AT_RST() { uchar i。 for(i=0。isizeof(TC_ATF)1。i++) { send_uart(TC_ATF[i])。 } send_uart(0X0D)。 send_uart(0X0A)。 TC35_CON=RST。 } /************************************************************ void GPRS_APN():AT+CGDCONT=1,”IP”,”CMNET” 設(shè)置 APN 無(wú)線(xiàn)接入點(diǎn) ************************************************************/ void GPRS_APN() { uchar i。 for(i=0。isizeof(GPRS_QD1)1。i++) {send_uart(GPRS_QD1[i])。} send_uart(39。,39。)。 send_uart(0X22)。//分號(hào) for(i=0。isizeof(GPRS_QD2)1。i++) 理工大學(xué)學(xué)士學(xué)位論文 32 {send_uart(GPRS_QD2[i])。} send_uart(0X22)。//分號(hào) send_uart(39。,39。)。 send_uart(0X22)。//分號(hào) for(i=0。isizeof(GPRS_QD3)1。i++) {send_uart(GPRS_QD3[i])。} send_uart(0X22)。//分號(hào) send_uart(0X0D)。//回車(chē) send_uart(0X0A)。 TC35_CON=GPRS_APN_flag。 } /************************************************************ GPRS_PPP():AT%ETCPIP=””,”” 進(jìn)行 PPP 撥號(hào) ************************************************************/ void GPRS_PPP() { uchar i。 for(i=0。isizeof(GPRS_PPP_CMD)1。i++) {send_uart(GPRS_PPP_CMD[i])。} send_uart(0X22)。//分號(hào) send_uart(0X22)。//分號(hào) send_uart(39。,39。)。 send_uart(0X22)。//分號(hào) send_uart(0X22)。//分號(hào) send_uart(0X0D)。//回車(chē) send_uart(0X0A)。 TC35_CON=GPRS_PPP_flag。 } /************************************************************ void GPRS_IP_DNS():AT%ETCPIP? 查詢(xún)獲得本地 IP 地址,以用 DNS 服務(wù)器地址 ************************************************************/ void GPRS_IP_DNS() { uchar i。 for(i=0。isizeof(GPRS_IP_DNS_CMD)1。i++) {send_uart(GPRS_IP_DNS_CMD[i])。} send_uart(0X0D)。//回 車(chē) send_uart(0X0A)。 TC35_CON=GPRS_IP_DNS_flag。 } /************************************************************ void GPRS_TCPIP():AT%IPOPEN=”TCP”,””,1234 進(jìn)行 TCPIP 連接 ************************************************************/ void GPRS_TCPIP() { uchar i。 for(i=0。isizeof(GPRS_TCP1)1。i++) 理工大學(xué)學(xué)士學(xué)位論文 33 {send_uart(GPRS_TCP1[i])。} send_uart(0X22)。//分號(hào) for(i=0。isizeof(GPRS_TCP2)1。i++) {send_uart(GPRS_TCP2[i])。} send_uart(0X22)。//分號(hào) send_uart(39。,39。)。 send_uart(0X22)。//分號(hào) for(i=0。isizeof(GPRS_TCP3)1。i++) {send_uart(GPRS_TCP3[i])。} send_uart(0X22)。//分號(hào) send_uart(39。,39。)。 for(i=0。isizeof(GPRS_TCP4)1。i++) {send_uart(GPRS_TCP4[i])。} send_uart(0X0D)。//回車(chē) send_uart(0X0A)。 TC35_CON=GPRS_TCPIP_flag。 } void GPRS_Init(void) { long int i,m。 m=1。 AT_RST()。 delay_ms(20)。 while(m) { if(TC35_CON==RST) { if((TC35_RE[7]==39。O39。)amp。amp。(TC35_RE[8]==39。K39。)) GPRS_APN()。 delay_ms(20)。 } if(TC35_CON==GPRS_APN_flag) { if((TC35_RE[39]==39。O39。)amp。amp。(TC35_RE[40]==39。K39。)) GPRS_PPP()。 delay_ms(20)。 } if(TC35_CON==GPRS_PPP_flag) { if((TC35_RE[61]==39。O39。)amp。amp。(TC35_RE[62]==39。K39。)) GPRS_IP_DNS()。 delay_ms(20)。 } if(TC35_CON==GPRS_IP_DNS_flag) { if((TC35_RE[138]==39。K39。)||(TC35_RE[139]==39。K39。)) GPRS_TCPIP()。 理工大學(xué)學(xué)士學(xué)位論文 34 delay_ms(20)。 } if(TC35_CON==GPRS_TCPIP_flag) { if((TC35_RE[182]==39。C39。)||(TC35_RE[183]==39。C39。)) { delay_ms(100)。 m=0。//初始化完成 for(i=0。i500。i++) { TC35_RE[i]=0。 } i_TC35_RECE=0。 } } } } /************************************************************ GPRS 數(shù)據(jù)發(fā)送 ************************************************************/ void GPRS_SENDDATA() { long int i。 for(i=0。isizeof(GPRS_SEND1)1。i++) {send_uart(GPRS_SEND1[i])。} send_uart(0X22)。//分號(hào) for(i=0。isizeof(GPRS_SEND3)1。i++) { send_uart(39。339。)。 send_uart(GPRS_SEND3[i])。 } send_uart(0X22)。//分號(hào) send_uart(0X0D)。//回車(chē) send_uart(0X0A)。 delay_ms(100)。 if((TC35_RE[41]==39。K39。)||(TC35_RE[42]==39。K39。)) { for(i=0。i500。i++) { TC35_RE[i]=0。 } i_TC35_RECE=0。 } 理工大學(xué)學(xué)士學(xué)位論文 35 } void GPRS_A
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1