Summary of the invention
A kind of majority is the object of the present invention is to provide to carry out the method for ftp business test wireless network PS performance, so that ftp client can specify arbitrary data card to carry out ftp business according to card.
Another object of the present invention is to provide a kind of majority carries out ftp business test wireless network PS performance device according to card, so that ftp client can specify arbitrary data card to carry out ftp business.
According to an aspect of the present invention, provide a kind of majority carries out ftp business test wireless network PS performance method according to card, comprising:
On computers by the integrated multiple data card of serial ports, each data card is by eating dishes without rice or wine and wireless network communication;
The ftp client of described computer is connected with described multiple data card respectively by dialing, and makes each data card obtain the IP address distributed by wireless network;
Ftp client, by the I P address of the described each data card of binding, sets up the connection of the ftp server of each data card and wireless network respectively, makes each data card carry out file download/upload business;
Periodically add up file download that each data card carries out/upload corresponding to business descending/upstream rate.
Wherein, ftp client and the connection of each data card are that ftp client is connected realization by carrying out PPP with each data card Modem mouth.
Wherein, the driver that ftp client utilizes the RAS of windows to call each data card modem successively carries out dial-up operation.
Wherein, ftp client, behind the IP address of binding one data card, by filling in ftp server address, port numbers, sets up the connection with ftp server.
Wherein, the connection of data card and ftp server is described ftp client by bind this data card IP address and set up and the connection of ftp server realizing.
Wherein, after ftp client utilizes the data card I P address of binding to set up to be connected with ftp server, the listed files on acquisition ftp server, then therefrom selects a certain file, and carries out the download/upload of selected file via the data card of binding IP address.
Wherein, for the data card carrying out ftp business, the RasGetConnectionStatistics function of the RAS that client uses windows to provide obtains each transmission of data card Modem port and the data volume of reception.
Wherein, by the transmission data volume in the unit of account time, upstream rate value is obtained; By the reception data volume in the unit of account time, obtain downstream data rate.
According to a further aspect of the invention, provide a kind of majority carries out ftp business test wireless network PS performance device according to card, comprising:
Be integrated in the multiple data cards on serial ports of computers, its each data card is by eating dishes without rice or wine and wireless network communication;
Be loaded in ftp client in described computer, connected with described multiple data card respectively by dialing, the IP address making each data card obtain wireless network to distribute to, and by the IP address of the described each data card of binding, set up the connection of the ftp server of each data card and wireless network respectively, make each data card carry out file download/upload business;
Be loaded in the statistic unit in described computer, for periodically add up file download that each data card carries out/upload corresponding to business descending/upstream rate.
Wherein, after ftp client utilizes the data card IP address of binding to set up to be connected with ftp server, the listed files on acquisition ftp server, therefrom selects a certain file, and carries out the download/upload of selected file via the data card of binding IP address.
Compared with prior art, beneficial effect of the present invention is: on an industrial computer, integrated multiple data card carries out ftp business when carrying out test network PS performance, FTP can be made to connect be based upon respectively on different data cards, realize the test to network PS field service feature.
Embodiment
Below in conjunction with accompanying drawing to a preferred embodiment of the present invention will be described in detail, should be appreciated that following illustrated preferred embodiment is only for instruction and explanation of the present invention, is not intended to limit the present invention.
Fig. 1 shows environment configurations of the present invention, as shown in Figure 1, at a computer or industrial computer (below for industrial computer, the present invention will be described) on by the integrated multiple data card of serial ports, each data card carries out communication by eat dishes without rice or wine i.e. UU mouth and wireless network (as Node B).
Fig. 2 shows majority of the present invention carries out ftp business test wireless network performance device according to card, comprising:
Be integrated in the multiple data cards on industrial computer serial ports, its each data card is by eating dishes without rice or wine and wireless network communication;
Be loaded in the ftp client in industrial computer, connected with described each of multiple data card respectively by dialing, the IP address making (obtaining) each data card obtain wireless network to distribute to, and by binding the IP address of described each data card successively, set up the connection of the ftp server of each data card and wireless network respectively, make each data card carry out file download/upload business, specifically, ftp client is connecting with the first data card, and after making this data card obtain the IP address of wireless network distribution by dialing, bind the IP address of this data card, then the ftp server via this data card and wireless network sets up data cube computation, and then start to carry out the download of file via the first data card or upload business, then ftp client is successively to the second data card, 3rd data card ... N data card performs the operation identical with the first data card, make the second data card, 3rd data card ... N data card all carries out the download of file or uploads business,
Be loaded in the statistic unit in industrial computer, for periodically add up file download that each data card carries out/upload corresponding to business descending/upstream rate.
The driver that ftp client utilizes the RAS of windows to call each data card modem successively carries out dial-up operation; Windows system automatically completes and is connected with the PPP of each data card Modem mouth, realizes ftp client and is connected with each data card.Data card realizes PDP activation automatically, thus obtains IP address.
In order to set up the connection of ftp client and ftp server, need after FTP binds the IP address of a data card, fill in ftp server address, port numbers, then by initiating connection request, realize the connection of ftp client and ftp server, and realize the connection of this data card and ftp server thus.
After ftp client utilizes the data card IP address of binding to set up to be connected with ftp server, the listed files on ftp server can be obtained, then therefrom select a certain file by user, and carry out the download/upload of selected file via the data card of binding IP address.
For the data card carrying out ftp business, the RasGetConnectionStatistics function of the RAS that client can use windows to provide obtains each transmission of data card Modem port and the data volume of reception.
Statistic unit, by the transmission data volume in the unit of account time, obtains upstream rate value, or by the reception data volume in the unit of account time, obtains downstream data rate.
Fig. 3 shows majority of the present invention carries out ftp business test wireless network PS performance method according to card, comprises the following steps:
By the integrated multiple data card of serial ports on an industrial computer, each data card is by eating dishes without rice or wine and wireless network communication;
The ftp client of described industrial computer is connected with described each of multiple data card respectively by dialing, makes (obtaining) each data card obtain the IP address distributed by wireless network;
Ftp client, by binding the IP address of described each data card successively, sets up the connection of the ftp server of each data card and wireless network respectively, makes each data card carry out file download/upload business;
Periodically add up file download that each data card carries out/upload corresponding to business descending/upstream rate.
Below in conjunction with Fig. 4, Fig. 5 and Fig. 6, apparatus and method of the present invention are specifically described.
Fig. 4 shows the service structure of the RAS dialing of Windows of the present invention, as can be seen from the figure RAS is in the upper strata of ISO/OSI model, TAPI (the Telephony Application Programming Interface of lower floor, Telephony Application Program Interface) call Unimodem, Unimodem is general modem driver, and it calls serial ports API and realizes the communication with modulation /demodulation equipment.The present invention uses RAS (the remote access service of windows, Remote Access Service) dial, the application program calling RAS performs usually on a client, the remote access protocol of this connection use two kinds of standards: PPP point-to-point protocol and SLIP (serial transmission line Internet agreement, Serial Line InternetProtocol).
Before testing, the AT instruction of standard can be used easily to needing the PS territory service rate of test to arrange, e.g. ,+CREGREQ=1,2,64,128.......Wherein " 2 " are network type: interactive class, and " 64 " are upstream rate, and " 128 " are downstream rate; Can arrange the speed of test easily like this.
In general, the present invention drives the USB port mapping out by data card, arranges the Qos (network quality, Quality of Service) of PS link, mainly arranges the network type in PS territory, up-downgoing speed.
Fig. 5 shows ftp client of the present invention and links via data the ftp server connecing wireless network and to go forward side by side the flow process of row data communication.
Step S31, the API using the RAS of Windows to provide, utilizes function RasSetEntryProperties to arrange the attribute information of dial-up connection, dials with RasDial function, use call back function RasDialFuncl to obtain dialing procedure, create ftp client and be connected with the PPP of data card;
Step S32, the dialing in step S31 can carry out PDP activation by trigger data card simultaneously, sets up the connection with network side;
Step S33, obtains by AT instruction AT+CGPADDR=1 the IP address that this data card is assigned to; The IP address format such as got is: h1.h2.h3.h4;
Step S34, starts ftp client;
Step S35, sets up the control connection between ftp client and ftp server:
Step S36, ftp server returns FTP successful connection message;
Step S37, ftp client binds the IP address of a certain data card, is connected with port foundation according to the ftp server address that user fills in the Socket of ftp server;
Step S38, ftp client uses File Transfer Protocol word PORT, and (form of PORT agreement word is: PORT h1, h2, h3, h4, p1, p2, wherein h1 is the most most-significant byte of IP address, p1 is the most-significant byte of local port) set up the data cube computation with ftp server, such as, local IP is specified to data cube computation, prevent data cube computation to be based upon on other data card;
Step S39, ftp client obtains the list of ftp server files, carries out download/upload according to a certain file that user selects;
After this, set up the connection of other data cards and ftp server respectively according to above flow process and upload/download file;
Fig. 6 shows the flow process that statistic unit of the present invention realizes counting rate, and the present invention periodically obtains the data volume D of data card port, and obtains system time T by the API of Windows.
For each data card carrying out ftp business, the RasGetConnectionStatistics function of the RAS that statistic unit of the present invention can use windows to provide obtains each transmission of data card Modem port and the data volume of reception.Idiographic flow as shown in Figure 6, if setting timer → acquisitions current time T → acquisition Modem mouth data volume → by data volume D and time T calculating real time rate → calculating Mean Speed → determine whether is maximum or minimum-rate →, then preserve rate value, and report UI carry out showing → if not, then report UI to show.
The speed of statistics comprises real time rate and Mean Speed, and both account forms are identical, and difference is only that real time rate obtains data volume by standard time unit, and Mean Speed then obtains data volume according to from the statistics time started to current time.For example, if this data volume got is D1, the data volume got last time is D2, and this time is t1, and the time of last time is t2, then rate value R is: R=(D1-D2)/(t1-t2); If statistics real time rate, then the time interval of t1-t2 is standard time unit; If statistical average speed, then the t2 corresponding to data volume D2 is statistics start time, and the t1 corresponding to data volume D1 is current time.
The present invention can show the rate behavior of each data card respectively, and utilizes a kind of line of color to represent downstream rate, represents upstream rate by another kind of color.
In sum, on an industrial computer, integrated multiple data card carries out ftp business when carrying out test network PS performance, the present invention can make FTP connection be based upon on different data cards respectively, realize test to network PS field service feature, solving common ftp client can not the situation of designated terminal; Conveniently carry out effect display, can the rate behavior of each data card of real time inspection, also can check the situation of whole network; Further, check that the rate behavior of each data card no longer needs other instrument.
Although above to invention has been detailed description, the present invention is not limited thereto, those skilled in the art of the present technique can carry out various amendment according to principle of the present invention.Therefore, all amendments done according to the principle of the invention, all should be understood to fall into protection scope of the present invention.