The method to set up and distribution method of terminal device MAC Address
Technical field
The present invention relates to equipment production field, more particularly to a kind of method to set up of terminal device MAC Address and distribution side
Method, terminal device, MAC distributing equipments and terminal device MAC Address distribution system.
Background technology
During the volume production of some electronic equipments, there is producer to need to customize MAC Address:Carried without using communication module
MAC Address communicate, and communicated using the MAC Address of producer oneself.Common practices is exactly by the MAC Address programming of producer
Into disk, communication module is allowed to be communicated using the MAC Address.But there are two deficiencies in the above method in process of production:It is first
More one MAC Address of programming are needed when first programming system firmware, influence the efficiency of overall volume production;Secondly it is exactly that general programming is consolidated
The station of part is limited, and the manual allocation operation for still further increasing MAC Address is unfavorable for parallel pipelining process operation.
The content of the invention
Therefore, the embodiment of the present invention provides a kind of method to set up of terminal device MAC Address and distribution method, terminal are set
Standby, MAC distributing equipments and terminal device MAC Address distribution system, increased destination-mac address is needed to automatic obtain, and
Destination-mac address is write to terminal device, improves the efficiency of overall volume production, saves human cost.
The embodiment of the present invention adopts the following technical scheme that:
First aspect, there is provided a kind of method to set up of terminal device MAC Address, including:
Random MAC address is generated according to the system time of the terminal device;
Establish and communicate to connect with MAC distributing equipments based on preset password, MAC distributing equipments mark, and based on described random
MAC Address communicates with the MAC distributing equipments;
Receive the destination-mac address that the MAC distributing equipments are sent, and by the random MAC address with the Destination MAC
Replace address.
In first aspect in the first possible implementation, it is described according to the system time of the terminal device generation with
Machine MAC Address includes:
At least one set of random number is determined according to the system time of the terminal device;
Based at least one set of generating random number random MAC address.
It is described to be set according to the terminal in second of possible implementation with reference to the first possible implementation
Standby system time determines that at least one set of random number includes:
The system time for setting the terminal device is random number seed;
At least one set of random number is determined according to the random number seed.
It is described to be built based on preset password with MAC distributing equipments with reference in a first aspect, in the 4th kind of possible implementation
Vertical communication connection, communicated based on the random MAC address with the MAC distributing equipments including:
Trigger the terminal device and send communication connection request, wherein, the communication connection request is given birth to based on preset password
Into;
Receive MAC distributing equipments feedback receives link information;
Communicated to connect with the MAC distributing equipments, and using the random MAC address as source MAC or purpose MAC
Location, the MAC Address of the MAC distributing equipments enter row data communication for purpose MAC Address or source MAC.
Second aspect, there is provided a kind of distribution method of terminal device MAC Address, including:
Communication link is established with the terminal device;
Destination-mac address of the MAC Address as the terminal device is obtained from default MAC Address list;
By the communication link destination-mac address is distributed to the terminal device.
With reference to second aspect, in the first possible implementation, the distribution method of the terminal device MAC Address is also
Including:The destination-mac address is deleted from the MAC Address list.
It is described to establish communication link with the terminal device in second of possible implementation with reference to second aspect
Including:
When detecting the communication connection request that the terminal device is sent, it is verified what is passed through in the communication connection request
In the case of to the terminal device feedback receive link information;
Communication link is established with the terminal device.
The third aspect, there is provided a kind of distribution method of terminal device MAC Address, including:
Communication link is established with an at least terminal device;
Destination MAC of at least MAC Address as an at least terminal device is obtained from default MAC Address list
Address;
The destination-mac address is distributed one by one to an at least terminal device by the communication link.
With reference to the third aspect, in the first possible implementation, the distribution method of the terminal device MAC Address is also
Including:The destination-mac address is deleted from the MAC Address list.
Fourth aspect, there is provided a kind of terminal device, including:
RTC clock module, for producing the system time of the terminal device;
MAC Address generation module, for obtaining system time caused by the RTC clock module, it is according to what is got
System time generation random MAC address, and the random MAC address is write into memory module;
First communication module, for reading the random MAC address from the memory module, divided based on preset password, MAC
Establish and communicate to connect with device identification and MAC distributing equipments, and led to based on the random MAC address with the MAC distributing equipments
Letter;
The first communication module, it is additionally operable to receive the destination-mac address that the MAC distributing equipments are sent;
The MAC Address generation module, it is additionally operable to send control instruction, so that the random MAC to the memory module
Replaced by the destination-mac address address.
With reference to fourth aspect, in the first possible implementation, the MAC Address generation module includes:
Acquiring unit, for obtaining system time caused by the RTC clock module;
Random number generation unit, for generating at least one set of random number according to the system time got;
MAC Address generation unit, for based at least one set of generating random number random MAC address.
It is described random in second of possible implementation with reference to fourth aspect in the first possible implementation
Number generation unit includes:
Seed sets subelement, and the system for setting the terminal device is random number seed;
Generating random number subelement, for determining at least one set of random number according to the random number seed.
With reference to fourth aspect, in the third possible implementation, the first communication module includes:
Trigger element, communication connection request is sent for triggering the terminal device, wherein, the communication connection request base
Generated in preset password;
Receiving unit, for receive MAC distributing equipments feedback receive link information;
Communication unit, for being communicated to connect with the MAC distributing equipments, and using the random MAC address as source MAC
Or the MAC Address of target MAC (Media Access Control) address, the MAC distributing equipments is that purpose MAC Address or source MAC enter row data communication.
5th aspect, there is provided a kind of MAC distributing equipments, including:
Second communication module, for establishing communication link with the terminal device;
Address assignment module, for obtaining a MAC Address as the terminal device from default MAC Address list
Destination-mac address;
The second communication module, it is additionally operable to distribute the Destination MAC to the terminal device by the communication link
Address.
With reference to the 5th aspect, in the first possible implementation, the address assignment module is additionally operable to the mesh
Mark MAC Address is deleted from the MAC Address list.
With reference to the 5th aspect, in second of possible implementation, the second communication module is used for:
When detecting the communication connection request that the terminal device is sent, it is verified what is passed through in the communication connection request
In the case of to the terminal device feedback receive link information;
Communication link is established with the terminal device.
6th aspect, there is provided a kind of MAC distributing equipments, including:
Third communication module, for being communicated to connect with an at least terminal device suggestion;
3rd address assignment module, for obtained from default MAC Address list an at least MAC Address be used as it is described to
The destination-mac address of a few terminal device;
The third communication module, it is additionally operable to distribute institute one by one to an at least terminal device by the communication link
State destination-mac address.
With reference to the 6th aspect, in the first possible implementation, the 3rd address assignment module is additionally operable to institute
Destination-mac address is stated to delete from the MAC Address list.
7th aspect, there is provided a kind of terminal device MAC Address distribution system, including:
An at least terminal device;
An at least MAC distributing equipments;
The terminal device, is used for
Random MAC address is generated according to the system time of the terminal device;
Establish and communicate to connect with a certain MAC distributing equipments based on preset password, MAC distributing equipments mark, and based on described
Random MAC address is communicated with a certain MAC configurations setting;
Receive the destination-mac address that the MAC distributing equipments are sent, and by the random MAC address with the Destination MAC
Replace address;
The MAC distributing equipments, are used for
Communication link is established with a certain or some terminal device of an at least terminal device;
An at least MAC Address is obtained from default MAC Address list, to be used as described a certain or some terminal devices
Destination-mac address;
The destination-mac address is distributed one by one to described a certain or some terminal devices by the communication link.
Prior art is different from, above-mentioned technical proposal, which makes terminal device be obtained automatically from MAC distributing equipments, need to increase programming
Destination-mac address, and destination-mac address is write to the memory module of terminal device, so as to improve the efficiency of overall volume production,
The MAC Address manual allocation operation of terminal device need not be further added by simultaneously, saved human cost, be advantageous to parallel pipelining process operation.
Brief description of the drawings
Fig. 1 is the module diagram of terminal device provided in an embodiment of the present invention;
Fig. 2 is the method to set up flow chart of the terminal device MAC Address provided in an embodiment of the present invention based on terminal device;
Fig. 3 is the module diagram for the terminal device that the embodiment of the present invention one provides;
Fig. 4 is the method to set up flow for the terminal device MAC Address based on terminal device that the embodiment of the present invention one provides
Figure;
Fig. 5 is the module diagram for the MAC distributing equipments that the embodiment of the present invention two provides;
Fig. 6 is the distribution method stream for the terminal device MAC Address based on MAC distributing equipments that the embodiment of the present invention two provides
Cheng Tu;
Fig. 7 is the module diagram for the MAC distributing equipments that the embodiment of the present invention three provides;
Fig. 8 is the distribution method stream for the terminal device MAC Address based on MAC distributing equipments that the embodiment of the present invention three provides
Cheng Tu;
Fig. 9 is the terminal device MAC Address distribution system Organization Chart that the embodiment of the present invention four provides;
Figure 10 is the terminal device MAC Address distribution system Organization Chart that the embodiment of the present invention five provides.
Embodiment
To describe the technology contents of technical scheme, construction feature, the objects and the effects in detail, below in conjunction with specific reality
Apply example and coordinate accompanying drawing to be explained in detail.
Fig. 1 and Fig. 2 is referred to, the present embodiment provides a kind of terminal device, including:RTC clock module 101, MAC Address life
Into module 102, memory module 103 and first communication module 104.Specifically, RTC clock module 101, for producing the end
The system time of end equipment.MAC Address generation module 102, it is connected with the RTC clock module 101, memory module 103, uses
In obtaining system time caused by the RTC clock module 101, random MAC address is generated according to the system time got, and
The random MAC address is write into memory module 103.First communication module 104, be connected with the memory module 104, for from
The memory module 103 reads the random MAC address, based on preset password, MAC distributing equipments mark and MAC distributing equipments
Communication connection is established, and is communicated based on the random MAC address with the MAC distributing equipments.The first communication module 104,
Be additionally operable to receive the destination-mac address that the MAC distributing equipments are sent, and to the memory module 103 send control instruction, with
The random MAC address is set to be replaced by the destination-mac address.
Herein, terminal device can be Android electronic equipment, such as:Handheld terminal, PAD, palm PC etc.;Terminal is set
Standby can also be the electronic equipment based on other operating systems.First communication module 104 can be wifi communication modules, can also
Can also be mobile network communication module for wifi hotspot communication module, when for mobile network communication module when, its apply net
Network can be GSM/2G, GPRS/2.5G network, can also be the networks such as CDMA/3G, LTE/4G.This implementation of specific explanations below
The implementation method of example, this method may comprise steps of.
S201, MAC Address generation module 102 obtain system time caused by the RTC clock module 101, and according to institute
State the system time generation random MAC address of terminal device.
S202, first communication module 104 are based on preset password and establish communication connection with MAC distributing equipments, and based on described
Random MAC address communicates with the MAC distributing equipments.
S203, first communication module 104 receive the destination-mac address that the MAC distributing equipments are sent, and by the target
MAC Address is sent to MAC Address generation module 102.The MAC Address generation module 102 is by described in random MAC address use
Destination-mac address is replaced.
In the specific mode of the present embodiment, after MAC Address generation module 102 generates random MAC address, this is generated
Stored in MAC Address write-in memory module 103.After first communication module 104 and MAC distributing equipments, which are established, to be connected, first is logical
Believe that module 104 is sent to memory module 103 and obtain instruction, obtain the random MAC address, for being set with MAC distribution
It is standby enter row data communication.
By foregoing description, the present embodiment is realized based on the terminal for treating programming destination-mac address, according to
The present embodiment, communication link, terminal device are established based on the random MAC address that system time ultimately generates and MAC distributing equipments
The destination-mac address that need to increase programming can be obtained automatically from MAC distributing equipments by this communication link, the final mesh got
Mark MAC Address and replace random MAC address, write to the memory module of terminal device, so as to improve the efficiency of overall volume production, simultaneously
The MAC Address manual allocation operation of terminal device need not be further added by, human cost is saved, is advantageous to parallel pipelining process operation.At this
In, MAC Address list is pre-stored with MAC distributing equipments, at least one MAC to be allocated is stored with the MAC Address list
Location.
In addition, the present embodiment, which uses, is based on generating random number random MAC address, it is ensured that residing for the terminal device
The uniqueness of the random MAC address used in network, during the terminal equipment in communication, avoids the destination-mac address being randomly assigned
When caused by distribution repeat or mistake.
Embodiment one
Fig. 3-Fig. 4 is referred to, the present embodiment provides a terminal device, including:RTC clock module 301, MAC Address generation
Module 302, memory module 303 and first communication module 304.Wherein, RTC clock module 301, set for producing the terminal
Standby system time.
MAC Address generation module 302, it is connected with the RTC clock module 301, memory module 303.Specifically, MAC
Address generation module 302 include acquiring unit 3021, the random number generation unit 3022 that is connected with acquiring unit 3021 and with
The connected MAC Address generation unit 3023 of random number generation unit 3022.Wherein, random number generation unit 3022 is set including seed
Put subelement 30221 and the generating random number subelement 30222 for setting subelement 30221 to be connected with seed.
First communication module 304, it is connected with the memory module 304.Specifically, first communication module 304 includes triggering
Unit 3041, the receiving unit 3042 being connected with trigger element 3041 and the communication unit 3043 being connected with receiving unit.
In the present embodiment, terminal device can be Android electronic equipment, such as:Handheld terminal, PAD, palm PC etc.;
Terminal device can also be the electronic equipment based on other operating systems.First communication module 304 can be wifi communication modules,
Can also be wifi hotspot communication module, can also be mobile network communication module, when for mobile network communication module when, its should
Network can be GSM/2G, GPRS/2.5G network, can also be the networks such as CDMA/3G, LTE/4G.It is logical with first below
Believe module 304 for exemplified by wifi module, the implementation method of specific explanations the present embodiment, this method may comprise steps of.
S4011, acquiring unit 3021 obtain system time caused by the RTC clock module 301.
Random number generation unit 3022 sends to acquiring unit 3021 and transfers instruction, transfers what acquiring unit 3021 was got
System time, and at least one set of random number is determined according to the system time transferred.Specifically, random number generation unit 3022 passes through
In the following manner determines at least one set of random number:
It is random number seed that seed, which sets subelement 30221 to set the system time of the terminal device,;
Generating random number subelement 30222 determines at least one set of random number according to the random number seed.
S4012, at least one set that MAC Address generation unit 3023 is determined based on generating random number subelement 30222
Generating random number random MAC address.Specifically, MAC Address generation unit 3023 is with can generating random MAC in the following manner
Location:
First, first way:Assuming that seed set subelement 30221 set terminal device system time a certain second be with
The several sons of machine, generating random number subelement 30222 take after the millisecond of a certain time second two (millisecond 000-999) in six times
For random number, then can produce six random numbers such as 11,28,53,64,75,94, MAC Address generation unit 3023 this six with
Machine array can turn into random MAC address altogether:11:28:53:64:75:94.
2nd, the second way:Assuming that seed sets subelement 30221 to be arranged to the day moon Hour Minute Second millisecond of system time
Random number seed, such as:2014-05-06-12-28-55-333.According to this random number seed, moon day Hour Minute Second milli is obtained respectively
The rear two digits of second, obtain random number:14-05-06-12-28-55-33.MAC Address generation unit 3023 is by this random number
Rear six groups of numerals combine, turn into random MAC address:05:06:12:28:55:33.
3rd, the third mode:Can be specially by the way of " seed+preset algorithm=random MAC address ":Assuming that kind
Son set subelement 30221 take system time the day moon Hour Minute Second millisecond a certain field be random number seed, such as system time
For 2014-05-06-12-28-55-333, take below several such as 12-28-55-333 be random number seed.It is random to be then based on this
Several sub- carry out special algorithms are such as:Multiply in 7 or multiplying in 9, then plus 50, multiplied by 168 or 175, obtaining one group has one
The random number of big string numeral, MAC Address generation unit 3023 directly take 12 bit digital next to form random MAC address.
The present embodiment uses and is based on generating random number random MAC address, it is ensured that in the network residing for the terminal device
In, the uniqueness of the random MAC address used during the terminal equipment in communication, avoid making during the destination-mac address being randomly assigned
Into distribution repeat or mistake.
After generating random MAC address, MAC Address generation unit 3023 is by this generation MAC Address write-in memory module 303
Storage.
S4021, trigger element 3041 trigger the terminal device and send communication connection request to MAC distributing equipments, wherein,
The communication connection request is generated based on preset password.In the present embodiment, the MAC distributing equipments are identified as SSID, described
Communication connection request is based on preset SSID and the wifi connection requests for being connected password.
S4022, receiving unit 3042 receive MAC distributing equipments feedback receiving whether link information.When MAC distributing equipments
Feedback is when receiving link information, performs step S4023;When MAC distributing equipments feedback be refusal link information when, return
Step S4021 sends communication connection request to MAC distributing equipments again.
S4023, communication unit 3043 communicate to connect with the MAC distributing equipments, and using the random MAC address as source
MAC Address or target MAC (Media Access Control) address, the MAC Address of the MAC distributing equipments carry out data for purpose MAC Address or source MAC
Communication.
S403, the receiving unit 3042 of first communication module 304 is with receiving the Destination MAC that the MAC distributing equipments are sent
Location, communication unit 3043 send the destination-mac address to the MAC Address generation module 302.The MAC Address generates mould
Block 302 sends control instruction, so that the random MAC address to be replaced with the destination-mac address to the memory module 303.
The present embodiment based on the random MAC address that system time ultimately generates trigger automatically establish with MAC distributing equipments it
Between communication link, and destination-mac address is obtained by this communication link automatically from MAC distributing equipments, it is final with getting
Destination-mac address replaces random MAC address, writes to the memory module of terminal device, so as to improve the efficiency of overall volume production, together
Shi Wuxu is further added by the MAC Address manual allocation operation of terminal device, saves human cost, is advantageous to parallel pipelining process operation.
Here, MAC Address list is pre-stored with MAC distributing equipments, at least one MAC to be allocated is stored with the MAC Address list
Address.
Embodiment two
Fig. 5 and Fig. 6 is referred to, the present embodiment provides point of a kind of MAC distributing equipments and a kind of terminal device MAC Address
Method of completing the square, the distribution method are realized based on MAC distributing equipments end.Specifically, the MAC distributing equipments include:Second communication mould
Block 501 and the address assignment module 502 being connected with second communication module 501.
In the present embodiment, MAC distributing equipments can be to be stored with PC/notebook computer of MAC Address list/hand-held
Equipment etc., second communication module 502 can be the wifi communication modules with soft-ap working conditions, or be arranged on
Wifi hotspot signal procedure (the shared spirits of wifi being such as mountable in PC computers) in electronic equipment, or there is road
By the wireless router of function, can also be with wifi hotspot communication function portable memory (such as 360wifi with
Body USB flash disk), can also be the handheld terminal with wifi hotspot communication function.Its network applied can be wifi network, may be used also
To be the networks such as GSM/2G, GPRS/2.5G network or CDMA/3G, LTE/4G.
The implementation method of specific explanations the present embodiment, this method may comprise steps of below, as shown in Figure 7.
S601, second communication module 501 is with needing the terminal device of programming destination-mac address to establish communication link.In this reality
Apply in example, destination-mac address is the MAC Address of producer oneself definition, and it is stored in the MAC Address list of MAC distributing equipments.Tool
Body, second communication module 501 is established communication link and can be accomplished by the following way:
Whether detection terminal equipment sends communication connection request;
When detecting the communication connection request that the terminal device is sent, it is verified what is passed through in the communication connection request
In the case of to the terminal device feedback receive link information;
Communication link is established with the terminal device.
S602, address assignment module 502 obtain a MAC Address from default MAC Address list and set as the terminal
Standby destination-mac address.
S603, second communication module 501 by the communication link to the terminal device with distributing the Destination MAC
Location.
By foregoing description, the present embodiment can be in the communication connection request (agreeing to connection) of receiving terminal equipment
When, a destination-mac address is actively sent to this terminal device, is distributed with the MAC Address completed to terminal device so that this terminal
Equipment can obtain this destination-mac address automatically, without separately setting up the flowing water of MAC Address distribution again when producing terminal device
Operation, production efficiency is improved, saved manpower, hardware and time cost.
Address assignment module 502 obtain destination-mac address after, address assignment module 502 by the destination-mac address from
Deleted in the MAC Address list, to avoid the destination-mac address from being allocated again, so as to ensure each terminal device acquisition
Destination-mac address is different, is easy to unifying identifier, tracking and the sale in later stage, maintenance etc..
Embodiment three
The third aspect, the present embodiment provide a kind of MAC distributing equipments and a kind of distribution side of terminal device MAC Address
Method, the distribution method are realized based on MAC distributing equipments end.Specifically, the MAC distributing equipments include:Third communication module 701
And the 3rd address assignment module 702 being connected with third communication module 701.
In the present embodiment, MAC distributing equipments can be to be stored with PC/notebook computer of MAC Address list/hand-held
Equipment etc., third communication module 702 can be the wifi communication modules with soft-ap working conditions, or be arranged on
Wifi hotspot signal procedure (the shared spirits of wifi being such as mountable in PC computers) in electronic equipment, or there is road
By the wireless router of function, can also be with wifi hotspot communication function portable memory (such as 360wifi with
Body USB flash disk), can also be the handheld terminal with wifi hotspot communication function.Its network applied can be wifi network, may be used also
To be the networks such as GSM/2G, GPRS/2.5G network or CDMA/3G, LTE/4G.
The implementation method of specific explanations the present embodiment, this method may comprise steps of below.
S801, third communication module 701 is with needing an at least terminal device for programming destination-mac address to establish communication link.
In the present embodiment, destination-mac address is the MAC Address of producer oneself definition, and it is stored in the MAC Address of MAC distributing equipments
List.It can be accomplished by the following way specifically, third communication module 701 establishes communication link:
Whether detection terminal equipment sends communication connection request;
When detecting the communication connection request that the terminal device is sent, it is verified what is passed through in the communication connection request
In the case of to the terminal device feedback receive link information;
Communication link is established with the terminal device.
S802, the 3rd address assignment module 702 obtain an at least MAC Address as institute from default MAC Address list
State the destination-mac address of an at least terminal device.
S803, third communication module 701 are distributed described one by one by the communication link to an at least terminal device
Destination-mac address.In this step, MAC distributing equipments can successively be distributed one by one by the sequencing for detecting terminal device
At least destination-mac address got.
Assuming that MAC distributing equipments successively detect four station terminal equipment, the order that its priority detects is respectively:Device A,
Equipment B, equipment C, equipment D.MAC distributing equipments successively obtain four MAC Address respectively as above-mentioned four from MAC Address list
The destination-mac address of station terminal equipment, this four MAC Address successively obtained are:44-45-53-54-00-00,44-45-53-
54-00-05,44-45-53-54-00-0D, 44-45-53-54-00-0F.What so above-mentioned four station terminals equipment was successively got
Destination-mac address difference is as shown in the table:
Obtain the order of MAC Address |
Device name |
The destination-mac address got |
1 |
Device A |
44-45-53-54-00-00 |
2 |
Equipment B |
44-45-53-54-00-05 |
3 |
Equipment C |
44-45-53-54-00-0D |
4 |
Equipment D |
44-45-53-54-00-0F |
In other implementations, MAC distributing equipments can also enter the random MAC address of the terminal device detected
Row size sorts, and successively distributes at least destination-mac address got one by one from big to small by the sequence of this size.
By foregoing description, the present embodiment can be in the communication connection request (agreeing to connection) of receiving terminal equipment
When, a destination-mac address is actively sent to this terminal device, is distributed with the MAC Address completed to terminal device so that this terminal
Equipment can obtain this destination-mac address automatically, without separately setting up the flowing water of MAC Address distribution again when producing terminal device
Operation, production efficiency is improved, saved manpower, hardware and time cost.
Further, after the 3rd address assignment module 702 obtains destination-mac address, the 3rd address assignment module 702 will
The destination-mac address is deleted from the MAC Address list, to avoid the destination-mac address from being allocated again, so as to ensure
The destination-mac address that each terminal device obtains is different, is easy to unifying identifier, tracking and the sale in later stage, maintenance etc..
Example IV
Referring to Fig. 9, the present embodiment provides a kind of terminal device MAC Address distribution system, including:
An at least terminal device;
An at least MAC distributing equipments;
The terminal device is connected with a certain MAC distributing equipments, the MAC distributing equipments and an at least terminal device
In a certain or some terminal device connection.
The terminal device, is used for:
Random MAC address is generated according to the system time of the terminal device;
Established and communicated to connect based on preset password and a certain MAC distributing equipments, and based on the random MAC address with it is described
A certain MAC configurations setting is communicated;
Receive the destination-mac address that the MAC distributing equipments are sent, and by the random MAC address with the Destination MAC
Replace address.
The MAC distributing equipments, are used for:
Communication link is established with a certain or some terminal device of an at least terminal device;
An at least MAC Address is obtained from default MAC Address list, to be used as described a certain or some terminal devices
Destination-mac address;
The destination-mac address is distributed one by one to described a certain or some terminal devices by the communication link.
The detailed process of the present embodiment terminal device generation random MAC address can refer to previous embodiment, no longer superfluous herein
State.It can be accomplished by the following way specifically, terminal device establishes communication link with MAC distributing equipments:
The terminal device sends communication connection request to MAC distributing equipments, wherein, the communication connection request is based on pre-
If password generates.In the present embodiment, the MAC distributing equipments are identified as SSID, and the communication connection request is based on preset
Wifi connection requests of the SSID with being connected password.
Whether MAC distributing equipment detection terminal equipment sends communication connection request;Sent when the detection terminal device
During communication connection request, it is verified in the communication connection request and receives connection to terminal device feedback in the case of
Information, agree to establish communication link with the terminal device.、
The terminal device receive it is described receive link information, with MAC distributing equipments establish communicate to connect.Terminal device
Take source MAC or target MAC (Media Access Control) address, the MAC Address of the MAC distributing equipments as purpose MAC of the random MAC address
Location or source MAC enter row data communication.
The present embodiment can be in communication connection request (the agreeing to connection) of MAC distributing equipments receiving terminal equipment, to this
Terminal device actively sends a destination-mac address, is distributed with the MAC Address completed to terminal device so that this terminal device energy
It is enough to obtain this destination-mac address automatically, without separately setting up the continuous productive process of MAC Address distribution again when producing terminal device,
Production efficiency is improved, has saved manpower, hardware and time cost.
In addition, referring to Fig. 8, when with great amount of terminals equipment, great amount of terminals equipment can be also divided into M by the present embodiment
A MAC distributing equipments are respectively configured in group, every group of terminal device, to complete the destination-mac address of each terminal device in each group point
Match somebody with somebody, distributed setting can greatly improve the allocative efficiency and production efficiency of MAC Address, save more time costs.
In addition, the present embodiment, which uses, is based on generating random number random MAC address, it is ensured that in the network residing for the terminal device,
The uniqueness of the random MAC address used during the terminal equipment in communication, caused by when avoiding the destination-mac address being randomly assigned
Distribution repeats or mistake.
Further, after MAC distributing equipments obtain destination-mac address, MAC distributing equipments are by the destination-mac address
Deleted from the MAC Address list, to avoid the destination-mac address from being allocated again, so as to ensure that each terminal device obtains
Destination-mac address it is different, be easy to unifying identifier, tracking and the sale in later stage, maintenance etc..
Embodiment five
Referring to Fig. 10, the present embodiment provides a kind of terminal device MAC Address distribution system, including:Android device, PC electricity
Brain.Android device includes RTC block, MAC Address generation unit, disk, the first wifi module, wifi and connects script, PC automatically
Computer includes the second wifi module, MAC Address distribution process and MAC Address list.First wifi module can refer to foregoing reality
A first communication module is applied, the second wifi module can refer to previous embodiment third communication module.Herein, the second wifi module
To be operated in the wireless communication module of soft-ap states.
The realization principle of the present embodiment is specific as follows.
After the PCB of Android device, which is welded, to be completed, it is required for programming minimum firmware to carry out hardware testing.When test is completed
Afterwards, it is random number seed that MAC Address unit reads system time from RTC block, produces 6 groups of random numbers, forms random MAC
Address, write the MAC Address retaining space of disk.After random MAC address is write disk by MAC Address generation unit, triggering
Wifi connects script automatically.The effect of the script is loading wifi drivings, and reads random MAC address from disk, is write
Into the first wifi module.
Then, wifi connects script with preset SSID with being connected password automatically, allows the first wifi module of Android device
It is connected with the second wifi module of computer.Herein, the second wifi module is operated in soft ap mode, i.e. soft-ap patterns, quite
In router;And SSID is consistent with being connected the wifi of password and Android device and connecting automatically preset in script.
The MAC Address of PC computers distributes monitoring the process and connected to the second wifi module by the first wifi module of Android device
Connect, just choose a MAC Address from the batch MAC Address in MAC Address list, being passed back to Android by the second wifi module sets
The first standby wifi module.And then, MAC Address distribute process by this allocated MAC Address from MAC Address list
Delete, prevent from being reallocated.
After the first wifi module of Android device receives the MAC Address of PC computers passback, this MAC Address is delivered to
MAC Address generation unit, disk is then write by it, replaces original random MAC address.
The present embodiment Android device establishes communication link based on the random MAC address that system time ultimately generates and PC computers
Afterwards, PC computers actively send a destination-mac address to this Android device, are distributed with the MAC Address completed to Android device;Android
Equipment obtains the destination-mac address that need to increase programming by this communication link automatically from PC computers, the final target got
MAC Address replaces random MAC address, writes to the disk of Android device, so as to improve the efficiency of overall volume production, while without again
Increase the MAC Address manual allocation operation of terminal device, save human cost, be advantageous to parallel pipelining process operation.When with a large amount of
During Android device, a large amount of Android devices can also be divided into M groups by the present embodiment, and a PC computers are respectively configured in every group of Android device, with
The destination-mac address distribution of each Android device in each group is completed, distributed setting can greatly improve the distribution of MAC Address
Efficiency and production efficiency, save more time costs.Further, the present embodiment uses random based on generating random number
MAC Address, it is ensured that the random MAC address used in the network residing for the terminal device, during the terminal equipment in communication
Uniqueness, distribution caused by when avoiding the destination-mac address being randomly assigned repeats or mistake.
Each embodiment in this specification is described by the way of progressive, what each embodiment stressed be with
The difference of other embodiment, between each embodiment identical similar part mutually referring to.
All or part of step in the method that above-described embodiment is related to can by program come instruct the hardware of correlation come
Complete, described program can be stored in the storage medium that computer equipment can be read, for performing the various embodiments described above side
All or part of step described in method.The computer equipment, such as:Personal computer, server, the network equipment, intelligent sliding
Dynamic terminal, intelligent home device, wearable intelligent equipment, vehicle intelligent equipment etc.;Described storage medium, such as:RAM、
ROM, magnetic disc, tape, CD, flash memory, USB flash disk, mobile hard disk, storage card, memory stick, webserver storage, network cloud storage
Deng.
Finally, it is to be noted that, herein, such as first and second or the like relational terms be used merely to by
One entity or operation make a distinction with another entity or operation, and not necessarily require or imply these entities or operation
Between any this actual relation or order be present.Moreover, term " comprising ", "comprising" or its any other variant meaning
Covering including for nonexcludability, so that process, method, commodity or equipment including a series of elements not only include that
A little key elements, but also the other element including being not expressly set out, or also include for this process, method, commodity or
The intrinsic key element of equipment.In the absence of more restrictions, the key element limited by sentence "including a ...", is not arranged
Except other identical element in the process including the key element, method, commodity or equipment being also present.
Embodiments of the invention are the foregoing is only, not thereby limit the scope of patent protection of the present invention, every utilization
The equivalent structure or equivalent flow conversion that description of the invention and accompanying drawing content are made, or directly or indirectly it is used in other correlations
Technical field, be included within the scope of the present invention.