CN106856624B - WIFI equipment and its method for synchronizing time - Google Patents
WIFI equipment and its method for synchronizing time Download PDFInfo
- Publication number
- CN106856624B CN106856624B CN201510901042.7A CN201510901042A CN106856624B CN 106856624 B CN106856624 B CN 106856624B CN 201510901042 A CN201510901042 A CN 201510901042A CN 106856624 B CN106856624 B CN 106856624B
- Authority
- CN
- China
- Prior art keywords
- time
- reception
- access point
- wifi equipment
- current time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W56/00—Synchronisation arrangements
- H04W56/001—Synchronization between nodes
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/02—Hierarchically pre-organised networks, e.g. paging networks, cellular networks, WLAN [Wireless Local Area Network] or WLL [Wireless Local Loop]
- H04W84/10—Small scale networks; Flat hierarchical networks
- H04W84/12—WLAN [Wireless Local Area Networks]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
WIFI equipment and its method for synchronizing time, which comprises when the website and multiple access points parallel connection as different roles, obtain described access point in the temporal information of the current time of reception;Described access point is subtracted into local counter in the time of the current time of reception, to obtain corresponding time deviation numerical value in the time of the current time of reception;Between the current time of reception and next time of reception, under the premise of the time for not changing local counter, time synchronization is carried out with the multiple access point respectively using corresponding time deviation numerical value.Above-mentioned scheme can save the occupied resource of time synchronization when WIFI equipment establishes data transmission link as the website of multiple roles and multiple access points.
Description
Technical field
The present invention relates to wireless transmission detection technique fields, more particularly to a kind of WIFI equipment and its time synchronization side
Method.
Background technique
802.11 agreements are International Power electronic engineering association (Institute of Electrical and
Electronics Engineer, IEEE) it is the standard that Wireless LAN is formulated.According to 802.11 standards, WIFI equipment exists
It, can be by beacon (Beacon) frame or response detected (probe when as establishing data transmission link between website and access point
Response the corresponding timestamp information) carried in frame is synchronized to local time synchronization function (Timing
Synchronization Function, TSF) in counter, to keep the time consistency of local TSF time value and access point,
To achieve the purpose that time synchronization.
But it is passed when establishing data simultaneously between the WIFI equipment simultaneously website and different access points as multiple roles
When transmission link, need using the time synchronization that can be just completed at the same time to multiple counters in corresponding link, there is wastes to provide
The problem of source.
Summary of the invention
The technical issues of embodiment of the present invention solves is how to connect as the website of multiple roles with multiple in WIFI equipment
When access point establishes data transmission link, the occupied resource of time synchronization is saved.
To solve the above problems, the embodiment of the invention provides a kind of method for synchronizing time of WIFI equipment, the method
Include:
When the WIFI equipment is connected in parallel as the website of different roles and multiple access points, the access is obtained
Temporal information of the point in the current time of reception;
Described access point is subtracted into local counter in the time of the current time of reception in the time of the current time of reception, with
Obtain corresponding time deviation numerical value;
Between the current time of reception and next time of reception, under the premise of the time for not changing local counter, make
Time synchronization is carried out with the multiple access point respectively with corresponding time deviation numerical value.
Optionally, described between the current time of reception and next time of reception, in the time for not changing local counter
Under the premise of, time synchronization is carried out with the multiple access point respectively using corresponding time deviation numerical value, comprising:
When needing the temporal information using described access point, obtains the local counter and believe in the time at current time
Breath and the time deviation numerical value, when any between the current time of reception and next time of reception of the current time
It carves;
The local counter is added into the time deviation numerical value in the time at current time, described access point is obtained and exists
The time at current time.
Optionally, the website as different roles and multiple access points are connected in parallel, comprising: respectively as STA
It is connected in parallel with P2P GC and two access points.
Optionally, the described access point that obtains is in the temporal information of the current time of reception, comprising:
The Beacon frame or probe response frame that described access point is sent are received in the current time of reception;
Parse corresponding timestamp information from the Beacon frame or probe response frame, and will be described when
Between stamp information corresponding time as described access point the current time of reception time.
Optionally, the TSF counter that the local counter is 64.
The embodiment of the invention also provides a kind of WIFI equipment, the WIFI equipment includes:
Acquiring unit, suitable for being connect described in acquisition when the website and multiple access points parallel connection as different roles
Temporal information of the access point in the current time of reception;
Computing unit is received suitable for described access point is subtracted local counter in the time of the current time of reception currently
The time at moment, to obtain corresponding time deviation numerical value;
Time synchronization unit is suitable between the current time of reception and next time of reception, is not changing local counter
Time under the premise of, using corresponding time deviation numerical value respectively with the multiple access point carry out time synchronization.
Optionally, the time synchronization unit is suitable for when needing the temporal information using described access point, described in acquisition
Temporal information and the time deviation numerical value of the local counter at current time, when the current time is the current reception
Carve any time between next time of reception;The local counter is inclined plus the time in the time at current time
Difference value obtains described access point in the time at current time.
Optionally, the WIFI equipment is connected in parallel as the website of different roles and multiple access points, comprising: respectively
It is connected in parallel as STA and P2P GC and two access points.
Optionally, the acquiring unit be suitable for the current time of reception receive described access point send Beacon frame or
Probe response frame;Corresponding timestamp information is parsed from the Beacon frame or probe response frame,
And using the timestamp information corresponding time as described access point the current time of reception time.
Optionally, the TSF counter that the local counter is 64.
Compared with prior art, technical solution of the present invention has the advantage that
Above-mentioned scheme passes through note when WIFI equipment is connected in parallel as the website of different role and multiple access points
Record time deviation numerical value of the corresponding access point with WIFI equipment in the corresponding time of reception, and then can be by by local counter
Described access point appointing before next time of reception arrives is obtained plus the time deviation numerical value in the time at current time
The time at meaning time point, and multiple local counters need not be used, it can realize the time of WIFI equipment Yu multiple access points
It is synchronous, therefore, resource can be saved.
Detailed description of the invention
Fig. 1 is the flow chart of the method for synchronizing time of one of embodiment of the present invention WIFI equipment;
Fig. 2 is the flow chart of the method for synchronizing time of another WIFI equipment in the embodiment of the present invention;
Fig. 3 is the schematic diagram of the time for the access point that the WIFI equipment in the embodiment of the present invention calculates corresponding time point;
Fig. 4 is the structural schematic diagram of one of embodiment of the present invention WIFI equipment.
Specific embodiment
To solve the above-mentioned problems in the prior art, technical solution used in the embodiment of the present invention is by by local meter
Number device adds the time deviation numerical value of record in the time at current time, when can obtain the current time of reception and next reception
In any point-in-time in quarter when the temporal information of corresponding access point, resource can be saved.
To make the above purposes, features and advantages of the invention more obvious and understandable, with reference to the accompanying drawing to the present invention
Specific embodiment be described in detail.
Fig. 1 shows the flow chart of the method for synchronizing time of one of embodiment of the present invention WIFI equipment.As shown in Figure 1
WIFI equipment method for synchronizing time, may include following step:
Step S101: it when the WIFI equipment is connected in parallel as the website of different roles and multiple access points, obtains
Take described access point in the temporal information of the current time of reception.
Step S102: described access point is subtracted into local counter in the current time of reception in the time of the current time of reception
Time, to obtain corresponding time deviation numerical value.
Step S103: between the current time of reception and next time of reception, do not changing the time of local counter
Under the premise of, time synchronization is carried out with the multiple access point respectively using corresponding time deviation numerical value.
Above-mentioned scheme passes through note when WIFI equipment is connected in parallel as the website of different role and multiple access points
Corresponding access point is recorded with WIFI equipment in the time deviation numerical value of the corresponding time of reception, described access point is in next time of reception
It the time of any point-in-time before arrival, can be by inclined plus the time in the time at current time by local counter
Difference value obtains, and without using multiple local counters, can realize the time synchronization of WIFI equipment Yu multiple access points, because
This, can save resource.
The method for synchronizing time of the WIFI equipment in the embodiment of the present invention will be further described in detail below.
Fig. 2 shows the flow charts of the method for synchronizing time of another WIFI equipment in the embodiment of the present invention.Such as Fig. 2 institute
The method for synchronizing time for the WIFI equipment shown may include following step:
Step S201: the Beacon frame or probe response that described access point is sent are received in the current time of reception
Frame.
In specific implementation, in the network detection stage, the WIFI equipment as mobile workstation is sent to network side first
Probe Request frame, it is whether compatible therewith with the network for determining detected, and the network will be with probe response frame (Probe
Response) frame carries out response.Wherein, the work station for being responsible for carrying out response is access point (AP).
When WIFI equipment with wireless network after not being successfully connected, access point periodically can send beacon frame to WIFI equipment
(Beacon Frame), so that WIFI equipment can know the presence of the corresponding wireless network of described access point, so as to adjust
Parameter necessary to the network is added.
Step S202: parsing the received Beacon frame of institute or probe response frame, to obtain described connect
Temporal information of the access point in the current time of reception.
It in specific implementation, include institute in the Beacon frame or probe response frame that either access point is sent
Access point is stated in the information of the timestamp of the corresponding time of reception, passes through the Beacon frame or probe sent to access point
Response frame is parsed, and can be obtained each time of reception and be sent connecing for Beacon frame or probe response frame
The real-time time information of access point.
Step S203: local TSF counter is obtained in the temporal information of the current time of reception.
In specific implementation, the time of WIFI equipment can be recorded using the local TSF counter of WIFI equipment.
Step S204: described ground TSF counter is subtracted current in the time of the current time of reception using described access point
The time of the time of reception obtains corresponding time deviation numerical value and records.
In specific implementation, due to being influenced by various factors, time of the local TSF counter of WIFI equipment and each
There are time nonsynchronous situations between a access point.At this point, in order to by WIFI equipment and the time of corresponding access point into
Row synchronizes, can record first time each access point of the local TSF counter of WIFI equipment in corresponding Beacon frame or
Time difference between the time of reception of probe response frame as time deviation numerical value between the two, and is recorded.
Step S205: any point-in-time between the current time of reception and next time of reception counts the local TSF
Number device adds the time deviation numerical value in the time at the time point, obtains described access point and believes in the time at the time point
Breath.
In specific implementation, when any time point between the current time of reception and next time of reception, WIFI equipment
When needing to carry out time synchronization with corresponding access point, by the way that the local TSF counter is added in the time at the time point
The upper time deviation numerical value, can obtain described access point in the temporal information at the time point.
In this way, being used when WIFI equipment is connected in parallel as the website of more than two different roles and multiple access points
One counter, and record time deviation of the corresponding website between the current time of reception and the local TSF counter of itself
Numerical value can determine the time of the current time of reception to any point-in-time between next time of reception, with keep from it is different
Time synchronization between multiple websites.
Shown in Figure 3, WIFI equipment is as STA in each target beacon transmission time (Target Beacon
Transmission Time, TBTT) receive access point AP transmission Beacon frame after, calculate and record one relative to this
The time deviation numerical value of ground TSF counter is remembered such as in continuous 4 times of reception TBBT0, TBBT1, TBBT2 and TBBT3
The time deviation numerical value of record is respectively offset0, offset1, offset2 and offset3, arrives it at next TBTT moment
Any point-in-time between preceding to the current time of reception, the WIFI equipment as STA are needing the time using corresponding access point
When information, can local TSF counter time value, be added with corresponding offset value, WIFI equipment can be realized
Time and the time of access point AP are consistent, to realize the time synchronization of the two.
For example, the time point between TBBT0 and TBBT1, corresponding when the time of local TSF counter is tsf0
The time of access point AP is tsf0+offset0;Time point between TBBT1 and TBBT2, when the time of local TSF counter
When for tsf1 and tsf2, the time of corresponding access point AP is respectively tsf1+offset1 and tsf2+offset2;TBBT1 with
Time point between TBBT2 is tsf3 when the time of local TSF counter, and the time of corresponding access point AP is tsf3+
offset3。
In specific implementation, WIFI equipment can it be synchronous the access point retention time with him using above-mentioned same mode.
It can be seen that during synchronous with each access point retention time by above-mentioned analysis, WIFI equipment is simultaneously
The time that the time change of local TSF counter is not become to corresponding access point, i.e., it will not change local TSF time value, that
, when WIFI equipment is as other roles, above-mentioned same mode also can be used, it is same with other access point retention times
Step.Therefore, the WIFI equipment in the embodiment of the present invention is connected in parallel as the website of multiple and different roles and multiple access points, such as
When being connected in parallel respectively as website (STA) and point-to-point client (P2P GC) with two access points, one can be used only
TSF counter, can be synchronous from different multiple access point retention times, without using multiple TSF counters, therefore,
It can economize on resources.
In an embodiment of the present invention, the TSF counter that the local counter is 64.
The corresponding device of method for synchronizing time to the WIFI equipment in the embodiment of the present invention is described further below.
Fig. 4 shows the structural schematic diagram of one of embodiment of the present invention WIFI equipment.WIFI equipment as shown in Figure 4
400, it may include acquiring unit 401, computing unit 402 and time synchronization unit 403, in which:
The acquiring unit 401, suitable for obtaining when the website and multiple access points parallel connection as different roles
Temporal information of the described access point in the current time of reception.
In specific implementation, the WIFI equipment is connected in parallel as the website of different roles and multiple access points, packet
It includes: being connected in parallel respectively as STA and P2P GC and two access points.
In specific implementation, the acquiring unit 401 is suitable for receiving what described access point was sent in the current time of reception
Beacon frame or probe response frame;When parsing corresponding from the Beacon frame or probe response
Between stab information, and using the timestamp corresponding time as described access point the current time of reception time.
The computing unit 402 exists suitable for described access point is subtracted local counter in the time of the current time of reception
The time of the current time of reception, to obtain corresponding time deviation numerical value;
In an embodiment of the present invention, the TSF counter that the local counter is 64.
The time synchronization unit 403 is suitable between the current time of reception and next time of reception, is not changing local
Under the premise of the time of counter, time synchronization is carried out with the multiple access point respectively using corresponding time deviation numerical value.
In specific implementation, the time synchronization unit 403 is suitable for when needing the temporal information using described access point,
Temporal information and the time deviation numerical value of the local counter at current time are obtained, the current time is described works as
Any time between the preceding time of reception and next time of reception;The local counter is added into institute in the time at current time
Time deviation numerical value is stated, obtains described access point in the time at current time.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of above-described embodiment is can
It is completed with instructing relevant hardware by program, which can store in computer readable storage medium, and storage is situated between
Matter may include: ROM, RAM, disk or CD etc..
The method and system of the embodiment of the present invention are had been described in detail above, the present invention is not limited thereto.Any
Field technical staff can make various changes or modifications without departing from the spirit and scope of the present invention, therefore guarantor of the invention
Shield range should be defined by the scope defined by the claims..
Claims (8)
1. a kind of method for synchronizing time of WIFI equipment characterized by comprising
When the WIFI equipment is connected in parallel as the website of different roles and multiple access points, obtains described access point and exist
The temporal information of the current time of reception;
Described access point is subtracted into local counter in the time of the current time of reception, to obtain in the time of the current time of reception
Corresponding time deviation numerical value;
Between the current time of reception and next time of reception, when needing the temporal information using described access point, institute is obtained
Temporal information and the time deviation numerical value of the local counter at current time are stated, the current time is the current reception
Any time between moment and next time of reception;
The local counter is added into the time deviation numerical value in the time at current time, obtains described access point current
The time at moment, when being carried out respectively with the multiple access point with realizing using corresponding time deviation Numerical Implementation WIFI equipment
Between it is synchronous.
2. the method for synchronizing time of WIFI equipment according to claim 1, which is characterized in that when the WIFI equipment conduct
The website of different roles and multiple access points are connected in parallel, comprising: parallel respectively as STA and P2P GC and two access points
Connection.
3. the method for synchronizing time of WIFI equipment according to claim 1, which is characterized in that the acquisition described access point
In the temporal information of the current time of reception, comprising:
The Beacon frame or probe response frame that described access point is sent are received in the current time of reception;
Parse corresponding timestamp information from the Beacon frame or probe response frame, and by the timestamp
The information corresponding time as described access point the current time of reception time.
4. the method for synchronizing time of WIFI equipment according to claim 1, which is characterized in that the local counter is 64
The TSF counter of position.
5. a kind of WIFI equipment characterized by comprising
Acquiring unit, suitable for obtaining when the WIFI equipment is connected in parallel as the website of different roles and multiple access points
Take described access point in the temporal information of the current time of reception;
Computing unit, suitable for described access point is subtracted local counter in the current time of reception in the time of the current time of reception
Time, to obtain corresponding time deviation numerical value;
Time synchronization unit, be suitable between the current time of reception and next time of reception, do not change local counter when
Between under the premise of, using corresponding time deviation numerical value respectively with the multiple access point carry out time synchronization;The time is same
Unit is walked to be suitable between the current time of reception and next time of reception, when needing the temporal information using described access point,
Temporal information and the time deviation numerical value of the local counter at current time are obtained, the current time is described works as
Any time between the preceding time of reception and next time of reception;The local counter is added into institute in the time at current time
Time deviation numerical value is stated, obtains described access point in the time at current time, to realize using corresponding time deviation numerical value reality
Existing WIFI equipment carries out time synchronization with the multiple access point respectively.
6. WIFI equipment according to claim 5, which is characterized in that website of the WIFI equipment as different roles
It is connected in parallel with multiple access points, comprising: be connected in parallel respectively as STA and P2P GC and two access points.
7. WIFI equipment according to claim 5, which is characterized in that the acquiring unit is suitable for connecing in the current time of reception
Receive Beacon frame or probe response frame that described access point is sent;From the Beacon frame or probe
Corresponding timestamp information is parsed in response frame, and using the timestamp information corresponding time as described access point
In the time of the current time of reception.
8. WIFI equipment according to claim 5, which is characterized in that the TSF counter that the local counter is 64.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510901042.7A CN106856624B (en) | 2015-12-08 | 2015-12-08 | WIFI equipment and its method for synchronizing time |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510901042.7A CN106856624B (en) | 2015-12-08 | 2015-12-08 | WIFI equipment and its method for synchronizing time |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106856624A CN106856624A (en) | 2017-06-16 |
CN106856624B true CN106856624B (en) | 2019-11-26 |
Family
ID=59132740
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510901042.7A Active CN106856624B (en) | 2015-12-08 | 2015-12-08 | WIFI equipment and its method for synchronizing time |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106856624B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113383503B (en) * | 2020-01-10 | 2024-03-01 | 北京小米移动软件有限公司 | Time synchronization method, device, terminal, access point equipment and storage medium |
CN116528346A (en) * | 2022-01-24 | 2023-08-01 | 华为技术有限公司 | Time synchronization method, device and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227267A (en) * | 2006-12-21 | 2008-07-23 | 美国博通公司 | Method and system for transmitting data |
CN103260177A (en) * | 2007-11-09 | 2013-08-21 | 高通股份有限公司 | Access point configuration based on received access point signals |
CN103329603A (en) * | 2011-11-15 | 2013-09-25 | 戴卡维夫有限公司 | A wireless access point clock synchronization system |
CN104244399A (en) * | 2014-09-15 | 2014-12-24 | 歌尔声学股份有限公司 | Wireless device time synchronizing method, wireless devices and wireless communication system |
CN104753622A (en) * | 2013-12-25 | 2015-07-01 | 中国科学院沈阳自动化研究所 | Low-overhead time synchronization method based on receivers under start network |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103458496B (en) * | 2012-06-04 | 2019-02-01 | 中兴通讯股份有限公司 | A kind of method for synchronizing time and system using WiFi-direct |
-
2015
- 2015-12-08 CN CN201510901042.7A patent/CN106856624B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101227267A (en) * | 2006-12-21 | 2008-07-23 | 美国博通公司 | Method and system for transmitting data |
CN103260177A (en) * | 2007-11-09 | 2013-08-21 | 高通股份有限公司 | Access point configuration based on received access point signals |
CN103329603A (en) * | 2011-11-15 | 2013-09-25 | 戴卡维夫有限公司 | A wireless access point clock synchronization system |
CN104753622A (en) * | 2013-12-25 | 2015-07-01 | 中国科学院沈阳自动化研究所 | Low-overhead time synchronization method based on receivers under start network |
CN104244399A (en) * | 2014-09-15 | 2014-12-24 | 歌尔声学股份有限公司 | Wireless device time synchronizing method, wireless devices and wireless communication system |
Also Published As
Publication number | Publication date |
---|---|
CN106856624A (en) | 2017-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103458498B (en) | Intelligent wireless sensor network time synchronization method | |
CN103458496B (en) | A kind of method for synchronizing time and system using WiFi-direct | |
US10945227B2 (en) | Method and device for signal measurement | |
CN108370614A (en) | Method for converting protocol and device | |
CN104918319B (en) | Clock synchronization simplified information interaction method applied to wireless sensor network | |
CN103688586B (en) | Reference signal processing method and user equipment, base station | |
MX2013014501A (en) | Systems for synchrophasor data management. | |
CN102315985A (en) | Time synchronization precision test method for intelligent device adopting IEEE1588 protocols | |
CN105450491B (en) | A kind of time synchronization hardware structure and method for synchronizing time based on 1588 agreements | |
CN106856624B (en) | WIFI equipment and its method for synchronizing time | |
CN107196726A (en) | The clock synchronizing method and system of a kind of LED visible light indoor positioning | |
CN109379751A (en) | Adjacent area report method and device, readable storage medium storing program for executing, user equipment, base station | |
CN113038597A (en) | UWB-based positioning method and system | |
CN104065935A (en) | Automatic time synchronization system for transformer substation video monitoring mainframe and time synchronization method thereof | |
CN106717068B (en) | The distance between a kind of NAN equipment measurement method and NAN equipment | |
CN103607731B (en) | A kind of processing method and processing device of measurement report | |
CN104993897A (en) | Pre-filling time stamp synchronization method suitable for WIA-PA network | |
CN108259105A (en) | A kind of time synchronizing method, apparatus and synchronizing network | |
CN202256575U (en) | Online failure positioning system based on IEEE1588 for underground cable | |
CN105141406A (en) | Time synchronization method, time synchronization apparatus and simulation system | |
CN105763310A (en) | Monitoring method and apparatus of power grid time frequency signals | |
CN104753622A (en) | Low-overhead time synchronization method based on receivers under start network | |
CN108093474A (en) | The method and system of indoor positioning are synchronously realized using virtual time | |
CN205657845U (en) | Based on GPS time reference multi -point synchronization communication device | |
CN203968154U (en) | A kind of long-range kernel phase system based on wireless Internet |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |