Summary of the invention
An object of the present invention is to solve at least the problems referred to above and/or defect, and the advantage will illustrated at least is below provided.
A further object of the invention is to provide the amending method of the bluetooth of a kind of PDA and the MAC Address of WiFi, the present invention by presetting n MAC Address in PDA, make PDA and server set up communication to be connected, no longer need use instrument to carry out the connection of computer and PDA, also solve the problem that PDA and server need wired connection simultaneously; Meanwhile, bluetooth and the MAC Address of WiFi and the identifying information of PDA all prestore in the server by the present invention, when solving the MAC Address of amendment bluetooth and WiFi, need the problem that manual operation inputs.
For this reason, technical scheme provided by the invention is:
An amending method for the bluetooth of PDA and the MAC Address of WiFi, comprises the steps:
Step one, startup PDA, described PDA has identifying information, if this PDA is initiating switchup, and is preset with n MAC Address in this PDA; Enter step 2 afterwards,
Step 2, when revising the MAC Address of PDA bluetooth and WiFi, described PDA sets up communication by any one MAC Address in a described default n MAC Address with server and is connected, and sends the order and identifying information that obtain bluetooth and WiFi MAC Address to described server; Enter step 3 afterwards,
The identifying information of described PDA and the mac address information of described bluetooth and WiFi is previously stored with in step 3, described server, and the identifying information of described PDA, to arrange with the mac address information one_to_one corresponding of described bluetooth and WiFi, when described server receives the order and identifying information that obtain bluetooth and WiFi MAC Address, by described identifying information identification PDA, corresponding bluetooth and WiFi mac address information is sent to it, and by the status indication of this PDA for distribute; And, enter step 4 afterwards,
Step 4, described PDA receive server end and send to obtain described bluetooth and WiFi mac address information, and are saved in described PDA, and delete n the MAC Address wherein preset, and complete amendment.
Preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, n > 2.
Preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, in described step 2, if described PDA and server set up communication when being connected, when MAC Address in n the described default MAC Address used is identical with the MAC Address that other PDA use, then this PDA and/or this other PDA is replaced by other MAC Address in a described default n MAC Address.
Preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, in described step 3, be that described PDA numbers as the identifying information of described PDA using different numerical value, when described server sends corresponding described bluetooth and WiFi mac address information to described PDA, be that the size order of the described identifying information of unappropriated PDA sends from small to large successively according to state.
Preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, described PDA is connected with the communication of described server for the TCP based on CS connects.
Even more preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, in described step one, if this PDA is non-initiating switchup, and when preserving the mac address information of bluetooth and WiFi in this PDA, then terminate this amendment.
Even more preferably, the amending method of the bluetooth of described PDA and the MAC Address of WiFi, also comprises after described step 4:
Step 5, close this PDA, and restart this PDA;
After described step 5, then enter described step one.
Preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, described server stores the mac address information of bluetooth and WiFi with the form of text, and sends to described PDA with the form of text.
Preferably, in the amending method of the bluetooth of described PDA and the MAC Address of WiFi, described PDA is mobile phone.
The present invention at least has following beneficial effect:
The present invention by presetting n MAC Address in PDA, setting up communication with server is connected, do not need the software re-using ADB instrument and so on to connect computer and PDA like this, do not need to utilize USB data line to connect simultaneously yet, manual operation is not needed to input the information of 48bit yet, remove the operation of operator from, improve efficiency and the accuracy rate of the MAC Address of producing line amendment BT and Wifi.
Invention simplicity of design is practical, and cost drops into low, is applicable to large-scale promotion and uses.
Part is embodied by explanation below by other advantage of the present invention, target and feature, part also will by research and practice of the present invention by those skilled in the art is understood.
Embodiment
The present invention is described in further detail below, can implement according to this with reference to specification word to make those skilled in the art.
As shown in Figure 1, Figure 2 and Figure 3, the invention discloses the amending method of the bluetooth of a kind of PDA and the MAC Address of WiFi, comprise the steps:
Step one, startup PDA, described PDA has identifying information, if this PDA is initiating switchup, is preset with n MAC Address in this PDA; Here " initiating switchup " mentioned, refers to be after factory completes processing, and first time when whether factory will help the basic function of final customer authentication can normally work starts.Enter step 2 afterwards,
Step 2, when revising the MAC Address of PDA bluetooth and WiFi, described PDA sets up communication by any one MAC Address in a described default n MAC Address with server and is connected, and sends the order and identifying information that obtain bluetooth and WiFi MAC Address to described server; Enter step 3 afterwards,
The identifying information of described PDA and the mac address information of described bluetooth and WiFi is previously stored with in step 3, described server, and the identifying information of described PDA, to arrange with the mac address information one_to_one corresponding of described bluetooth and WiFi, when described server receives the order and identifying information that obtain bluetooth and WiFi MAC Address, by described identifying information identification PDA, corresponding bluetooth and WiFi mac address information is sent to it, and by the status indication of this PDA for distribute; And, enter step 4 afterwards,
Step 4, described PDA receive server end and send to obtain described bluetooth and WiFi mac address information, and are saved in described PDA, and delete n the MAC Address wherein preset, and complete amendment.
The present invention by presetting n MAC Address in PDA, setting up communication with server is connected, do not need the software re-using ADB instrument and so on to connect computer and PDA like this, do not need to utilize USB data line to connect simultaneously yet, manual operation is not needed to input the information of 48bit yet, remove the operation of operator from, improve efficiency and the accuracy rate of the MAC Address of producing line amendment BT and Wifi.
As preferably, in n the MAC Address preset in PDA, n > 2.Like this, be connected even if there is multiple stage PDA to set up communication with server simultaneously, the probability that all PDA choose identical MAC Address is also less.
As preferably, in described step 2, if described PDA and server set up communication when being connected, when MAC Address in n the described default MAC Address used is identical with the MAC Address that other PDA use, then this PDA and/or this other PDA is replaced by other MAC Address in a described default n MAC Address.Like this, set up communication once multiple stage PDA with server be simultaneously connected, though first time time have chosen same MAC Address, so wherein a PDA or all PDA all again Stochastic choice once preset MAC Address time, identical probability is very little.Even if second time is identical again when setting up, third time can also be carried out again and select.Suitable n value can be determined according to the number of units setting up the PDA that communication is connected with server simultaneously.。In one of them embodiment of the present invention, n=6,
As preferably, be that described PDA numbers as the identifying information of described PDA using different numerical value, in described step 3, when described server sends corresponding described bluetooth and WiFi mac address information to described PDA, be that the size order of the described identifying information of unappropriated PDA sends from small to large successively according to state.In one of them embodiment of the present invention, this identifying information ID is numeral, and like this, server distributes the MAC Address of bluetooth and WiFi successively according to the size order of ID of PDA of the MAC Address of not distributing bluetooth and WiFi, to avoid the phenomenon omitting and repeat to send, simple to operation.
As preferably, described PDA is connected with the communication of described server for the TCP based on CS (Client-Server) connects.Such connected mode reliably facilitates, and is also easy to realize.
As preferably, in described step one, if this PDA is non-initiating switchup, and when preserving the mac address information of bluetooth and WiFi in this PDA, in one of them embodiment of the present invention, be when having bt_wifi_MAC.fs file to exist, then terminate this amendment.Because now this PDA is successfully assigned with the MAC Address of bluetooth and WiFi.
As preferably, also comprise after described step 4:
Step 5, close this PDA, and restart this PDA;
After described step 5, then enter described step one.Now, the situation of to be this PDA the be non-initiating switchup entered.As described in such scheme.In general, now also can hand inspection once, whether the bluetooth of this PDA and the MAC Address of WiFi be consistent with information of the bluetooth of server end and the MAC Address of WiFi and PDA etc., with the MAC Address of the bluetooth and WiFi of determining this PDA really without any problem.
As preferably, described server stores the mac address information of bluetooth and WiFi with the form of text, and sends to described PDA with the form of text.Like this, avoid the manual typing of operating personnel, decrease error generation rate, save time conveniently.
As preferably, described PDA is mobile phone.
In one of them embodiment of the present invention, as shown in Figure 1, Figure 2 and Figure 3, first the present invention connects on basis based on the TCP of CS (Client-Server) to complete the present invention; Secondly, it is read the mode of text that the present invention can improve the mode that in PDA or perhaps mobile terminal, BT and Wifi MAC Address obtains therein, is conducive to exploitation and amendment like this, does not affect the use of user simultaneously.Concrete detailed design is as described below.
First mobile phone terminal (MP) of the present invention is illustrated in fig. 1 shown below with server (Assign Server) framework distributing BT & & Wifi MAC Address.Mobile terminal of mobile telephone as client Client, BT & & Wifi MAC server as Server.
The mobile terminal MP of mobile phone is connected to by TCP mode the MAC Address that the Assign Server specified removes an active obtaining BT & & Wifi.Then this address is stored in mobile terminal inside with set form.After storage completes, the present invention is restarting BT & & Wifi to verify whether the address of acquisition is the address that can obtain in zone of reasonableness.Relevant configuration catenation principle figure as shown in Figure 1.
Secondly, main part of the present invention exactly-use TCP mode to communicate with Assign Serve, obtains the MAC Address of BT & & Wifi.Following Fig. 2 is the flow chart that mobile terminal inside realizes.Wherein " reasonable stochastic generation Wifi & BT MAC " step is that in mobile phone of the present invention, more reserved n fixing BT & Wifi MAC Address are public, when method of the present invention starts time, when not getting MAC from Assign Server in this n of temporary MAC one of cell phone system, to be connected on Assign Server, complete the step obtaining correct MAC.
Finally, be exactly the Assign Server part in the present invention, this part is responsible for the MAC Address distributing to mobile terminal BT & Wifi.This server is the server of a PC server or specialty.This server needs to prestore the MAC content preparing to distribute to BT and Wifi of mobile terminal.The form stored in a database is as shown in table 1 below.The flow chart of this part as shown in Figure 3.
Table 1 Assign Server BT & Wifi MAC storage mode
According to method of the present invention, producing line engineer does not need use instrument to connect mobile phone amendment BT & & Wifi MAC Address wherein, eliminate manually-operated step, improve efficiency and the accuracy rate of the MAC Address of producing line amendment BT and Wifi.
Here the mobile phone illustrated, the module number of server and treatment scale are used to simplify explanation of the present invention.The application of method of the present invention, modifications and variations be will be readily apparent to persons skilled in the art.
Although embodiment of the present invention are open as above, but it is not restricted to listed in specification and execution mode utilization, it can be applied to various applicable the field of the invention completely, for those skilled in the art, can easily realize other amendment, therefore do not deviating under the universal that claim and equivalency range limit, the present invention is not limited to specific details and illustrates here and the embodiment described.