Invention content
It is excellent it is an object of the invention to solve at least the above and/or defect, and provide at least to will be described later
Point.
It is a still further object of the present invention to provide the amending method of the bluetooth of PDA a kind of and the MAC Address of WiFi, the present invention
By presetting n MAC Address in PDA, to make PDA establish communication connection with server, it is no longer necessary to carry out electricity using tool
The connection of brain and PDA, while also solving the problems, such as that PDA needs wired connection with server;Meanwhile the present invention by bluetooth and
The MAC Address of WiFi and the identification information of PDA prestore in the server, solve the MAC Address of modification bluetooth and WiFi
When, the problem of needing manual operation to input.
For this purpose, technical solution provided by the invention is:
The amending method of the bluetooth of PDA a kind of and the MAC Address of WiFi, includes the following steps:
Step 1: starting PDA, the PDA has identification information, if the PDA is to start for the first time, and is preset with n in the PDA
A MAC Address;Two are entered step later,
Step 2: when changing the MAC Address of PDA bluetooths and WiFi, the PDA passes through the preset n MAC Address
In any one MAC Address and server establish communication connection, sent to the server with obtaining bluetooth and WiFi MAC
The order of location and identification information;Three are entered step later,
Step 3: being previously stored with the identification information of the PDA and the MAC of the bluetooth and WiFi in the server
Address information, and the identification information of the PDA, be arranged in a one-to-one correspondence with the mac address information of the bluetooth and WiFi, the clothes
When business device receives the order and the identification information that obtain bluetooth and WiFi MAC Address, PDA is identified by the identification information, to
It sends corresponding bluetooth and WiFi mac address informations, and is to have distributed by the status indication of the PDA;And enter later
Step 4,
Step 4: the PDA, which receives server end, sends to obtain the bluetooth and WiFi mac address informations, and it is saved in
In the PDA, and wherein preset n MAC Address is deleted, completes modification.
Preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, n > 2.
Preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, in the step 2, if one
When a PDA and server establish communication connection, MAC Address in the preset n MAC Address used and other
When the MAC Address that PDA is used is identical, then a PDA and/or other PDA is changed in the preset n MAC Address
Other MAC Address.
Preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, in the step 3, with not
Same numerical value is identification information of the PDA numbers as the PDA, and the server sends corresponding described to the PDA
When bluetooth and WiFi mac address informations, according to state be unappropriated PDA the identification information size order from it is small to
It sends successively greatly.
Preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, the PDA and the service
The communication of device is connected as the TCP connection based on CS.
Even more preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, in the step 1, if
The PDA is non-initial start, and when preserving the mac address information of bluetooth and WiFi in the PDA, then terminates the secondary modification.
Even more preferably, the amending method of the MAC Address of the bluetooth and WiFi of the PDA, after the step 4
Further include:
Step 5: closing the PDA, and restart the PDA;
In the step 5 and then enter the step 1.
Preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, the server is with text
The mac address information of form the storage bluetooth and WiFi of file, and the PDA is sent in the form of text file.
Preferably, in the amending method of the MAC Address of the bluetooth and WiFi of the PDA, the PDA is mobile phone.
The present invention at least has the advantages that:
The present invention establishes communication connection by presetting n MAC Address in PDA, with server, need not make again in this way
Computer and PDA are connected with the software of ADB tools etc, while need not be also attached using USB data line, is not also needed
Manual operation inputs the information of 48bit, removes the operation of operator from, improves the MAC Address of producing line modification BT and Wifi
Efficiency and accuracy rate.
Invention design is simple and practical, and cost input is low, and large-scale promotion is suitble to use.
Part is illustrated to embody by further advantage, target and the feature of the present invention by following, and part will also be by this
The research and practice of invention and be understood by the person skilled in the art.
Specific implementation mode
The present invention is described in further detail below, to enable those skilled in the art being capable of evidence with reference to specification word
To implement.
As shown in Figure 1, Figure 2 and Figure 3, the invention discloses the modification sides of the bluetooth of PDA a kind of and the MAC Address of WiFi
Method includes the following steps:
Step 1: starting PDA, the PDA has identification information, if the PDA is to start for the first time, n are preset in the PDA
MAC Address;" starting for the first time " mentioned herein, refers to be after factory completes processing, factory will help final customer authentication
First time when whether basic function can work normally starts.Two are entered step later,
Step 2: when changing the MAC Address of PDA bluetooths and WiFi, the PDA passes through the preset n MAC Address
In any one MAC Address and server establish communication connection, sent to the server with obtaining bluetooth and WiFi MAC
The order of location and identification information;Three are entered step later,
Step 3: being previously stored with the identification information of the PDA and the MAC of the bluetooth and WiFi in the server
Address information, and the identification information of the PDA, be arranged in a one-to-one correspondence with the mac address information of the bluetooth and WiFi, the clothes
When business device receives the order and the identification information that obtain bluetooth and WiFi MAC Address, PDA is identified by the identification information, to
It sends corresponding bluetooth and WiFi mac address informations, and is to have distributed by the status indication of the PDA;And enter later
Step 4,
Step 4: the PDA, which receives server end, sends to obtain the bluetooth and WiFi mac address informations, and it is saved in
In the PDA, and wherein preset n MAC Address is deleted, completes modification.
The present invention establishes communication connection by presetting n MAC Address in PDA, with server, need not make again in this way
Computer and PDA are connected with the software of ADB tools etc, while need not be also attached using USB data line, is not also needed
Manual operation inputs the information of 48bit, removes the operation of operator from, improves the MAC Address of producing line modification BT and Wifi
Efficiency and accuracy rate.
Preferably, in PDA in preset n MAC Address, n > 2.In this way, even if having more PDA simultaneously and server
Communication connection is established, the probability that all PDA choose identical MAC Address is also smaller.
Preferably, in the step 2, if a PDA establishes communication connection with server, what is used is described
When MAC Address in preset n MAC Address is identical as the MAC Address that other PDA are used, then the PDA and/or this its
His PDA is changed to other MAC Address in the preset n MAC Address.In this way, once more PDA and server are built simultaneously
When vertical communication connection, even if having chosen same MAC Address when first time, then a wherein PDA or all PDA all again with
When machine selects primary preset MAC Address, identical probability is very little.It, can be with even if again identical when establishing for the second time
Third time selection is carried out again.It can be according to establishing the number of units of the PDA that communication connects with server simultaneously and determine suitable n values.
In one of present invention embodiment, n=6,
Preferably, be that the PDA numbers identification information as the PDA using different numerical value, in the step 3,
It is unappropriated according to state when the server sends the corresponding bluetooth and WiFi mac address informations to the PDA
The size order of the identification information of PDA is sent successively from small to large.In one of present invention embodiment, the identification
Information ID be number, in this way, server according to it is no distribution bluetooth and WiFi MAC Address PDA ID size order according to
The MAC Address of sub-distribution bluetooth and WiFi, it is simple to operate the phenomenon that avoid omission and repeat to send.
Connect preferably, the communication of the PDA and the server is connected as the TCP based on CS (Client-Server)
It connects.Such connection type reliably facilitates, and is also easy to realize.
Preferably, in the step 1, if the PDA is non-initial start, and bluetooth and WiFi are preserved in the PDA
It is in the presence of having bt_wifi_MAC.fs files, then to terminate in one of present invention embodiment when mac address information
The secondary modification.Because the PDA is successfully assigned with bluetooth and the MAC Address of WiFi at this time.
Preferably, further including after the step 4:
Step 5: closing the PDA, and restart the PDA;
In the step 5 and then enter the step 1.At this point, what is entered is the feelings that the PDA is non-initial start
Condition.As described in said program.In general, at this time also can hand inspection once, the bluetooth of the PDA and the MAC Address of WiFi are
It is no consistent with the information of MAC Address and PDA of the bluetooth of server end and WiFi etc., to determine the bluetooth and WiFi of the PDA
MAC Address be strictly not have any problems.
Preferably, the server stores bluetooth and the mac address information of WiFi in the form of text file, and with text
The form of this document is sent to the PDA.In this way, avoiding being manually entered for operating personnel, reduce error generation rate, it is time saving
It is convenient.
Preferably, the PDA is mobile phone.
In one of present invention embodiment, as shown in Figure 1, Figure 2 and Figure 3, the present invention is to be based on CS first
(Client-Server) present invention is completed on the basis of TCP connection;Secondly, the present invention can improve PDA mobile terminals in other words
The mode that middle BT and Wifi MAC Address obtains inside it is to read the mode of text file, is conducive to develop and repair in this way
Change, while not influencing the use of user.Specific detailed design is as described below.
The server (Assign Server) of mobile phone terminal (MP) of the invention and distribution BT&&Wifi MAC Address first
Framework is illustrated in fig. 1 shown below.Mobile terminal of mobile telephone is as client Client, and BT&&Wifi MAC service devices are as Server.
The mobile terminal MP of mobile phone is connected to specified Assign Server by TCP modes and removes active obtaining one
The MAC Address of BT&&Wifi.Then the address is stored in fixed format inside mobile terminal.After the completion of storage, this hair
Whether bright in restarting BT&&Wifi come the address for verifying acquisition be the address that can be obtained in zone of reasonableness.Relevant configuration
Catenation principle figure is as shown in Figure 1.
Secondly, main part-exactly of the invention is communicated with Assign Serve using TCP modes, obtains BT&&Wifi
MAC Address.Following Fig. 2 is the flow chart realized inside mobile terminal.Wherein " rationally random to generate Wifi&BT MAC " step
It is that some reserved fixed n BT&Wifi MAC Address are public in mobile phone of the present invention, when the method for the present invention starts,
Cell phone system is not from one in temporary when getting MAC in Assign Server this n MAC, to be connected to
On Assign Server, in the step of completing to obtain correct MAC.
Finally, be exactly the present invention in the parts Assign Server, which is responsible for distributing to mobile terminal BT&Wifi
MAC Address.The server is the server of a PC server either profession.Server needs prestore preparation point
The MAC contents of the BT and Wifi of dispensing mobile terminal.The form of storage in the database is as shown in table 1 below.The part
Flow chart it is as shown in Figure 3.
1 Assign Server BT&Wifi MAC storage modes of table
According to the method for the present invention, producing line engineer need not use tool connection mobile phone to change BT&&Wifi therein
MAC Address, the step of eliminating manual operation, improve the efficiency and accuracy rate of the MAC Address of producing line modification BT and Wifi.
Mobile phone described herein, the module number of server and treatment scale are the explanations for simplifying the present invention.It is right
The application of the method for the present invention, modifications and variations will be readily apparent to persons skilled in the art.
Although the embodiments of the present invention have been disclosed as above, but its is not only in the description and the implementation listed
With it can be fully applied to various fields suitable for the present invention, for those skilled in the art, can be easily
Realize other modification, therefore without departing from the general concept defined in the claims and the equivalent scope, the present invention is simultaneously unlimited
In specific details and embodiment shown and described herein.