CN109327915A - A kind of connection method, device and terminal - Google Patents
A kind of connection method, device and terminal Download PDFInfo
- Publication number
- CN109327915A CN109327915A CN201811147245.1A CN201811147245A CN109327915A CN 109327915 A CN109327915 A CN 109327915A CN 201811147245 A CN201811147245 A CN 201811147245A CN 109327915 A CN109327915 A CN 109327915A
- Authority
- CN
- China
- Prior art keywords
- task
- scan task
- scan
- terminal
- connect
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W48/00—Access restriction; Network selection; Access point selection
- H04W48/20—Selecting an access point
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W76/00—Connection management
- H04W76/10—Connection setup
- H04W76/18—Management of setup rejection or failure
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
This application involves fields of communication technology.This application provides a kind of connection method, device and terminal, whether which includes: to detect terminal and connect with AP to succeed;If the terminal and the AP connection failure, newly-built being connect with the AP for task;Scan task operation is detected whether, if so, terminating the scan task;Execute connecting with AP for the task.The application improves the speed that terminal is connect automatically with AP.
Description
Technical field
This application involves fields of communication technology, in particular to a kind of connection method, device and terminal.
Background technique
Access point (Access Point, AP) is the access point of wireless network, is commonly called as " hot spot ", AP can create wireless guarantor
Very (Wireless Fidelity, Wi-Fi) network, brings great convenience to the work and life of people.
Currently, can attempt to connect automatically again after First Contact Connections failure, but the speed ratio of connection when terminal is connect with AP
It is relatively slow.
Summary of the invention
This application provides a kind of connection method, device and terminals, improve the speed that terminal is connect automatically with AP.
In a first aspect, this application provides a kind of connection methods, comprising:
Detection terminal connect whether succeed with AP;
If the terminal and the AP connection failure, newly-built being connect with the AP for task;
Scan task operation is detected whether, if so, terminating the scan task;
Execute connecting with AP for the task.
Wherein, described to have detected whether scan task operation, if so, terminating the scan task further include:
If there is the scan task is run, obtains the scan task and start the time executed;
The time that the scan task has executed is calculated according to the time that the scan task starts to execute;
Judge that time that the scan task has executed accounts for the ratio of scan period,
If the ratio is more than or equal to preset threshold, the scan task is waited to be finished;If the ratio is small
In preset threshold, the scan task is terminated.
Wherein, the detection terminal connect with AP whether it is successful before further include: receive the order connecting with AP.
Wherein, if the terminal and the AP connection failure, creating with connecting for task of the AP includes: by institute
Stating connecting with AP for task increases in the work queue of wpa_supplicant.
Wherein, described to have detected whether scan task operation, if so, terminating the scan task includes: detection wpa_
Whether there is the scan task to be located at before connecting with AP for the task in the work queue of supplicant.
Second aspect, this application provides a kind of attachment devices, comprising:
Whether detection unit succeeds for detecting terminal and connecting with AP;
Newly-built unit, if for the terminal and the AP connection failure, newly-built being connect with the AP for task;
Unit is terminated, for detecting whether having scan task operation, if so, terminating the scan task;
Execution unit, for executing connecting with AP for the task.
Wherein, the termination unit is also used to:
If there is the scan task is run, obtains the scan task and start the time executed;
The time that the scan task has executed is calculated according to the time that the scan task starts to execute;
Judge that time that the scan task has executed accounts for the ratio of scan period;
If the ratio is more than or equal to preset threshold, the scan task is waited to be finished;If the ratio is small
In preset threshold, the scan task is terminated.
It wherein, further include receiving unit, for receiving the order connecting with AP.
The third aspect, this application provides a kind of computer readable storage mediums, are stored thereon with computer program, described
The step of any of the above-described the method is realized when program is executed by processor.
Fourth aspect, this application provides a kind of terminal, including memory, processor and storage are on a memory and can be
The computer program run on processor, the processor realize the step of any of the above-described the method when executing described program
Suddenly.
The application connection method has the following beneficial effects:
In the application connection method, if terminal and AP connection failure, newly-built connecting with AP for the task of terminal detects terminal
Whether there is scan task running, if so, the scan task is terminated, then there is no need to wait scan task to be finished,
And directly execute connecting with AP for task.By the scheme of the application, if terminal 10 and 20 First Contact Connections of access point fail,
Terminal 10 can create connecting with access point 20 for task, then execute the task of the connection, at this moment if there is scanning in terminal 10
Task is being run, and terminates the scan task, and such connection task can be immediately performed, and does not have to hold again after the completion of scanning
Row can so save the time of a maximum scan period, to improve the speed that terminal 10 is connect automatically with access point 20
Degree.
Detailed description of the invention
Fig. 1 is the exemplary application schematic diagram of a scenario of the application connection method;
Fig. 2 a is the schematic diagram one that scan task and connection task queue execute in the application terminal;
Fig. 2 b is the schematic diagram two that scan task and connection task queue execute in the application terminal;
Fig. 3 is the flow diagram one of the application connection method;
Fig. 4 is the flow diagram two of the application connection method;
Fig. 5 is the structural schematic diagram one of the application attachment device;
Fig. 6 is the structural schematic diagram two of the application attachment device;
Fig. 7 is the structural schematic diagram of the application terminal.
Specific embodiment
The application is further introduced with reference to the accompanying drawings and examples.
In following introductions, term " first ", " second " only for descriptive purposes, and should not be understood as instruction or dark
Show relative importance.Following introductions provide multiple embodiments of the application, can replace or merge between different embodiments
Combination, therefore the application is it is also contemplated that all possible combinations comprising documented identical and/or different embodiments.Thus, such as
Fruit one embodiment include feature A, B, C, another embodiment include feature B, D, then the application also should be regarded as include containing
A, the every other possible combined embodiment of one or more of B, C, D, although the embodiment may be in the following contents
In have specific literature record.
In following introductions, statement " having ", " can have ", "comprising" and " comprising " or " may include " and " can be with
Including " indicate that there are corresponding feature (for example, elements of such as numerical value, function, operation or component etc), but be not excluded for depositing
In additional feature.
In following introductions, when an element (for example, first element) is referred to as " (operation or communication) is couple to " or " connects
Be connected to " another element (for example, second element) when, other elements can be directly coupled or connected, or may exist
Intermediary element (for example, third element).On the other hand, when an element (for example, first element) referred to as " is directly coupled to "
Or when " being directly connected to " another element (for example, second element), it should be appreciated that be not present intermediary element (for example, third element).
Following description provides example, and does not carry out to range, applicability described in claims or example
Limitation.The function and arrangement of the element of description can be made a change in the case where not departing from the range of teachings herein.Respectively
Various processes or component can suitably be omitted, substitute or be added to a example.Such as described method can be with described suitable
Sequence different sequence executes, and can add, omits or combine various steps.Furthermore, it is possible to will be retouched about some examples
The feature stated is combined in other examples.
Fig. 1 is the exemplary application schematic diagram of a scenario of the application connection method, as shown in Figure 1, terminal 10 and access point 20
Between for be wirelessly connected.Wherein, terminal 10 for example can be mobile phone, tablet computer, personal computer, notebook, desk-top calculating
Machine, server, personal digital assistant (Personal Digital Assistant, PDA), E-book reader, portable medical
Equipment, camera, wearable device, multimedia player etc., but not limited to this.Access point 20 is the access point of wireless network, custom
Claim " hot spot ", access point 20 can for example create Wi-Fi network.
After there is access point 20 service set SSID, user service set SSID is arranged to access point 20, access
Point 20 is write service set SSID in beacon (beacon), in the form of broadcast, every a beacon interval (beacon
Interval it) sends in the sky primary.Receive beacon terminal read beacon in service set SSID parameter, then
Service set SSID is presented on the interface of terminal, and user is it is seen that service set SSID.User wants connection AP
When, the AP for wanting connection is clicked, that is, is presented on the service set SSID of the AP on 10 interface of terminal, terminal 10 can prompt user
Password (if having saved password, do not need input password, can connect automatically) is inputted, user inputs password and passes through identity
It can be connect with access point 20 after verifying, state shown in FIG. 1 is to have had input password, and terminal 10 is carrying out authentication
State.
During terminal 10 is connect with access point 20, connection may fail due to various reasons.Lead to terminal 10 and connects
The reason of 20 connection failure of access point for example, complex environment, there are radio interference in complex environment, for example, wireless phone,
The radio interference of bluetooth headset, micro-wave oven etc. can interfere with the wireless signal of access point 20.In addition there are may be access point
20 itself radiation covering not enough, excessively high etc. reasons of overload, temperature.It can be attempted after terminal 10 and 20 connection failure of access point
Automatic connection again, but automatic connection speed is slower, increases the time that user waits connection network, and the experience of user is bad.
Present inventor studies discovery: in terminal 10 (such as Android mobile phone) and 20 connection procedure of access point, terminal 10
Scan task and connection task can be executed, scan task, then will scanning for available access point 20 near end of scan 10
To access point 20 be shown on the interface of terminal 10, user click want connection access point 20, terminal 10 execute connection
Task sends authentication request to access point 20 and is used to connect with access point 20.Fig. 2 a is scan task in the application terminal
With connection task queue execute schematic diagram one, as shown in Figure 2 a, in terminal 10, scanning and connection be in a manner of task
Queuing execution is carried out in work queue 40, which task comes front, which task is just first carried out, the task execution positioned at front
After task in execution position later.It can attempt to connect automatically again after terminal 10 and the failure of 20 First Contact Connections of access point
It connects, has issued scan command if before second of automatic connection, that is to say, that when executing connection task,
There is scan command executing, then connection task just executes after the completion of will being postponed to scanning, so causing to connect automatically
Speed is slow, and the time that user waits terminal 10 to connect upper access point 20 is longer.
By studying above, present applicant proposes a kind of connection method, device and terminals, if terminal connect mistake with AP
It losing, newly-built connecting with AP for the task of terminal, whether detection terminal has scan task running, if so, the scan task is terminated,
Then there is no need to wait scan task to be finished, and connecting with AP for task is directly executed.By the scheme of the application, such as
Fruit terminal 10 and 20 First Contact Connections of access point fail, and terminal 10 can create connecting with access point 20 for task, and then executing should
At this moment the task of connection terminates the scan task if there is scan task is being run in terminal 10, connection task in this way can
It is immediately performed, and does not have to execute again after the completion of scanning, to improve the speed that terminal 10 is connect automatically with access point 20.
For the ease of the understanding of those skilled in the art, the application is by following embodiment to technical side provided by the present application
The specific implementation process of case is illustrated.
Embodiment one
Fig. 3 is the flow chart one of the present embodiment connection method, as shown in figure 3, the present embodiment connection method includes step
101, detection terminal connect whether succeed with AP;Step 103, if terminal and AP connection failure, newly-built being connect with AP for task;
Step 105, scan task operation has been detected whether, if so, terminating scan task;Step 107, times connecting with AP is executed
Business.Step 101-107 is described below.
Step 101, whether detection terminal is connect with AP succeeds.
In some embodiments, whether terminal 10 detects terminal 10 and connect with AP and succeed.The process packet that terminal is connect with AP
Include scanning, certification and association, wherein the purpose of scanning process is to scan available AP nearby, is connected for selection by the user
It connects.After user selects the AP to be connected, terminal sends ID authentication request, the authentication that AP sends terminal to the AP of selection
Request is verified, and if the verification passes, AP sends the response being verified to terminal.The ID authentication request of terminal is led to
After crossing, into association phase, terminal sends association request to AP, and AP returns to associated response to terminal, and so far, terminal is built with AP
Vertical connection, can mutually transfer data frame.Terminal 10 can also for example be led to by judging whether to receive the associated response of AP
Whether cross between judgement and AP can pass data frame mutually to detect whether and AP successful connection.
In some embodiments, before this step further include: receive the order connecting with AP.The scanning of terminal 10 can to nearby
After AP, AP is shown on the interface of terminal 10, user clicks selected AP, i.e., has issued connection selection to terminal 10
AP order, terminal 10 just starts the program connecting with AP.
Step 103, if terminal and AP connection failure, newly-built being connect with AP for task.
In some embodiments, if terminal 10 and AP successful connection, also there is no need to Auto-reconnect again, the application masters
It is directed to terminal 10 and AP connection failure, needs the case where connecting automatically again.
In some embodiments, if terminal and AP connection failure, newly-built being connect with AP for the task of terminal, that is to say, that
If terminal automatic connection AP failure for the first time, terminal initiate automatic connection, newly-built connecting with AP for task (for the second time) again.
In some embodiments, this step further includes that connecting with AP for the task that will be created increases to wpa_supplicant
Work queue in.Wpa_supplicant is the tool for configuring wireless network, is responsible for completing the relevant login of certification, encryption etc.
Work.Fig. 2 a is the schematic diagram one that scan task and connection task queue execute in the application terminal, and Fig. 2 b is the application terminal
The schematic diagram two that middle scan task and connection task queue execute, as illustrated in figures 2 a-2b, the work queue of wpa_supplicant
Include scan task in 40, connect task dispatching multiple tasks, when executing task, is successively executed according to sequence from front to back.It will
Newly-built connecting with AP for task increases in the work queue 40 of wpa_supplicant there are two types of situation, a kind of situation are as follows:
As shown in Figure 2 a, there is no scan task before connecting task in work queue 40, then first carrying out connecting with AP for task, connect
Task not will receive the interference of scan task;Another situation are as follows: as shown in Figure 2 b, in work queue 40, connection task it
It is preceding to have had scan task, that is to say, that after terminal 10 creates connection task, when executing the connection task, to sweep
It retouches task just to perform, in response to this, the application subsequent step will do it processing.
Step 105, scan task operation has been detected whether, if so, terminating scan task.
In some embodiments, terminal has detected whether scan task operation, if so, terminating the scan task.Because
If there is scan task is run, connection task just needs to execute after the completion of scanning, due to needing one section of waiting time,
Cause connection task execution to be delayed, increase total time of connection task execution, the automatic connection speed of terminal is slower.
In some embodiments, whether this step further includes having scanning to appoint in the work queue for detect wpa_supplicant
Business is located at before connection task, if so, explanation has scan task to be carrying out at this time, then terminating the scan task, connects down
Connection task can be directly executed, needs not wait for and executes connection task after scan task is finished again.
In some embodiments, terminal finds network by listening to the beacon frame that AP is periodically sent, and terminal can also be according to
It is secondary to issue probe requests thereby (Probe Request) frame in multiple channels to find network.
Step 107, connecting with AP for task is executed.
In some embodiments, after terminating scan task, terminal 10 executes connecting with AP for task, including sends body to AP
The processes such as part certification request, association request.
In the present embodiment connection method, if terminal and AP connection failure, newly-built connecting with AP for the task of terminal, detection is eventually
Whether end has scan task running, if so, terminating the scan task, then there is no need to wait scan task to execute
Finish, and directly executes connecting with AP for task.By the scheme of the application, if terminal 10 and 20 First Contact Connections of access point lose
It loses, terminal 10 can create connecting with access point 20 for task, the task of the connection then be executed, at this moment if there is sweeping in terminal 10
It retouches task running, terminates the scan task, such connection task can be immediately performed, and not had to after the completion of scanning again
It executes, the time of a maximum scan period can be so saved, to improve what terminal 10 was connect automatically with access point 20
Speed.
Embodiment two
Fig. 4 is the flow diagram two of the present embodiment connection method, as shown in figure 4, the present embodiment connection method includes step
Rapid 201, detection terminal connect whether succeed with AP;Step 203, if terminal and AP connection failure, newly-built times being connect with AP
Business;Step 205, scan task operation has been detected whether, if so, obtaining scan task starts the time executed;Step 207,
Start the time that the time executed calculating scan task has executed according to scan task;Step 209, judge scan task
The time of execution accounts for the ratio of scan period, if ratio is more than or equal to preset threshold, step 211 is executed, if ratio is less than
Preset threshold executes step 213;Step 211, scan task is waited to be finished;Step 213, scan task is terminated;Step
215, execute connecting with AP for task.Step 201-215 is described below.
Step 201, whether detection terminal is connect with AP succeeds.
This step is essentially identical with step 101, please refers to the introduction of step 101.
Step 203, if terminal and AP connection failure, newly-built being connect with AP for task.
This step is essentially identical with step 103, please refers to the introduction of step 103.
Step 205, scan task operation has been detected whether, if so, obtaining scan task starts the time executed.
In some embodiments, terminal 10 has detected whether that scan task is being run, such as detection wpa_supplicant
Work queue in whether there is scan task to be located at before the connecting with AP of the task, also can detecte in the memory list of terminal 10
Whether there is or not scan tasks.If run without scan task, so that it may directly execution connection task;If there is scan task, obtain
Take scan task start execute time, that is, scan task since when execute.
Step 207, the time that the time executed calculating scan task has executed is started according to scan task.
In some embodiments, terminal 10 starts what the time executed calculating scan task had executed according to scan task
Time, that is to say, that terminal 10 with the now time subtract scan task start execute time can be obtained by scan task
The time executed.
Step 209, judge that time that scan task has executed accounts for the ratio of scan period, if ratio be more than or equal to it is pre-
If threshold value, step 211 is executed, if ratio is less than preset threshold, executes step 213.
In some embodiments, the scan period, which refers to, executes the time that single pass task needs, and terminal 10 is opened wirelessly
Function after, can at interval of the regular hour execute single pass task, periodically in target zone AP (such as Wifi heat
Point) it is scanned.In this step, terminal judges that the time that scan task has executed accounts for the ratio of scan period, that is, counts
It calculates the ratio that the time that scan task has executed accounts for the scan period and executes step if ratio is more than or equal to preset threshold
211, if ratio is less than preset threshold, execute step 213.Threshold value in this step can according to need specific setting, such as
80%, 90%, 95%, 99% etc..
In this step, judging that time that scan task has executed accounts for the ratio of scan period is to judge scan task
Have been carried out how many, if scan task has been carried out 95% or 99%, illustrates that scan task is carried out at once and finish
, step 211 is at this moment executed, waits scan task to be finished, because if at this moment terminating scan task, will cause terminal 10
The waste of system resource, scan task has been carried out most (such as 95% or 99%) after all.In such case
Under, wait scan task to be finished, that is, wait the very small part time (such as 5% or 1%) of scan period, with
It waits the most of the time (such as 80% of scan period) of scan period to compare, improves the speed that terminal is connect automatically with AP
Degree.
If the ratio that the time that scan task has executed accounts for the scan period is less than preset threshold, step 213 is executed, eventually
Only scan task.When ratio is less than preset threshold, illustrate that the task of scanning just performs sub-fraction, there are also most not to have
There is execution, at this moment if wait scan task to be finished executes the task of connection again, the time waited is with regard to some length, meeting
Cause connection speed slow, therefore, in the case, terminates scan task, need not thus scan task be waited to be finished, and
Step 215 is executed, that is, executes connecting with AP for task, to improve the speed that terminal 10 connects AP automatically.
Step 215, connecting with AP for task is executed.
This step is essentially identical with step 107, please refers to the introduction of step 107.
The present embodiment obtains scan task other than having the effect of embodiment one, and when there is scan task operation
Start the time executed, starts the time that the time executed calculating scan task has executed, judgement further according to the scan task
The time that scan task has executed accounts for the ratio of scan period, that is, judges scan task has been carried out how many, if
Ratio is more than or equal to preset threshold, illustrates that scan task is carried out at once and finishes, at this moment scan task is waited to be finished, because
If will cause the waste of 10 system resource of terminal at this moment to terminate scan task, it is big to have been carried out one for scan task after all
Part (such as 95% or 99%), has saved the system resource of terminal 10 in this way.And in the present embodiment, it waits to be scanned
Task execution finishes, that is, wait the scan period the very small part time (such as 5% or 1%), this with etc. it is to be scanned
The most of the time (such as 80% of scan period) in period is compared, and the speed that terminal is connect automatically with AP is improved.If swept
Retouch the time that task has executed account for the scan period ratio be less than preset threshold, illustrate scanning task just perform a small portion
Point, there are also most to be not carried out, and at this moment terminates scan task, it is not necessary to wait scan task to be finished, and directly execute
Being connect with AP for task, to improve the speed that terminal 10 connects AP automatically.
Present invention also provides a kind of attachment devices, and Fig. 5 is the structural schematic diagram one of the application attachment device, such as Fig. 5 institute
Show, the application attachment device includes:
Whether detection unit 11 succeeds for detecting terminal and connecting with AP;
Newly-built unit 13, if for terminal and AP connection failure, newly-built being connect with AP for task;
Unit 15 is terminated, for detecting whether having scan task operation, if so, terminating scan task;
Execution unit 17, for executing connecting with AP for task.
Optionally, unit 15 is terminated to be also used to:
If there is scan task is run, obtains scan task and start the time executed;
Start the time that the time executed calculating scan task has executed according to scan task;
Judge that time that scan task has executed accounts for the ratio of scan period;
If ratio is more than or equal to preset threshold, scan task is waited to be finished;If ratio is less than preset threshold, eventually
Only scan task.
Optionally, the work queue that unit 13 is used to increase to connecting for task wpa_supplicant with AP is created
In.
Optionally, whether terminate unit to be also used to: detecting has scan task position in the work queue of wpa_supplicant
Before being connect with AP for task.
Fig. 6 is the structural schematic diagram two of the application attachment device, as shown in fig. 6, shown in the present embodiment attachment device and Fig. 5
Attachment device unlike further include receiving unit 19, for receiving the order connecting with AP.
In this specification, for attachment device embodiment, the embodiment of content and connection method is essentially identical, phase
Close the introduction that place refers to connection method embodiment.
Present invention also provides a kind of terminal, Fig. 7 is the structural schematic diagram of the application terminal, as shown in fig. 7, terminal 30 is wrapped
Include processor 31, memory 32, transmitter 35, receiver 34, processor 31, memory 32, transmitter 35 and receiver 34 it
Between communicated by bus 33.
In some embodiments, processor 31 may be single or multiple core central processing unit, or be specific integrated electricity
Road, or it is configured to implement one or more integrated circuits of the application.Memory 32 can store for high random access
Device (Random Access Memory, RAM), or nonvolatile memory (non-volatile memory), such as
At least one magnetic disk storage.Memory 32 may include program in computer instruction 321 for storing computer instruction 321
Code.
In some embodiments, whether processor 20 succeeds for detecting terminal and connecting with AP;If terminal is connect with AP
Failure, newly-built being connect with AP for task;
Scan task operation is detected whether, if so, terminating scan task;Execute connecting with AP for task.
Optionally, processor 20 is also used to run if there is scan task, reads scan task and starts the time executed;Root
Start the time that the time executed calculating scan task has executed according to scan task;Judge the time that scan task has executed
The ratio of scan period is accounted for, if ratio is more than or equal to preset threshold, scan task is waited to be finished;If ratio is less than pre-
If threshold value, scan task is terminated.
Optionally, receiver 34 is also used to receive the instruction connecting with AP, and receiver can also for example receive AP and be sent to
The information of terminal 30.
Optionally, processor 20 is also used to increase to connecting for task the work queue of wpa_supplicant with AP
In.
Optionally, whether processor 20 is also used to detect in the work queue of wpa_supplicant has scan task to be located at
Before being connect with AP for task.
In this specification, for terminal embodiment, the embodiment of content and connection method is essentially identical, correlation
Place refers to the introduction of connection method embodiment.
Those skilled in the art can be understood that the technical solution of the application can be come by software and/or hardware
It realizes." unit " and " module " in this specification refers to complete independently or cooperates with other component complete specific function
Software and/or hardware, wherein hardware for example can be FPGA (Field-ProgrammaBLE Gate Array, scene can compile
Journey gate array), IC (Integrated Circuit, integrated circuit) etc..
Unit and/or module are managed everywhere in the application, can pass through the analog circuit reality of realization function described herein
It is existing, it can also be realized by executing the software of function described herein.
Present invention also provides a kind of terminal, including memory, processor and storage are on a memory and can be in processor
The step of computer program of upper operation, processor realizes the above method when executing program.
Present invention also provides a kind of computer readable storage mediums, are stored thereon with computer program, which is located
Manage the step of realizing the above method when device executes.Wherein, computer readable storage medium can include but is not limited to any type
Disk, including floppy disk, CD, DVD, CD-ROM, mini drive and magneto-optic disk, ROM, RAM, EPROM, EEPROM, DRAM,
VRAM, flash memory device, magnetic or optical card, nanosystems (including molecular memory IC), or be suitable for store instruction and/
Or any kind of medium or equipment of data.
In several embodiments provided herein, it should be understood that disclosed device and method can pass through it
Its mode is realized.The apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
A kind of logical function partition, there may be another division manner in actual implementation, such as: multiple units or components can combine, or
It is desirably integrated into another system, or some features can be ignored or not executed.In addition, shown or discussed each composition portion
Mutual coupling or direct-coupling or communication connection is divided to can be through some interfaces, the INDIRECT COUPLING of equipment or unit
Or communication connection, it can be electrical, mechanical or other forms.
Each functional unit in each embodiment of the application can be fully integrated in one processing unit, be also possible to each
Unit can also be integrated in one unit individually as a unit with two or more units;It is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of hardware adds SFU software functional unit.
Described above is only preferred embodiment of the present application, is not intended to limit this application, for the skill of this field
For art personnel, various changes and changes are possible in this application.Within the spirit and principles of this application, made any to repair
Change, equivalent replacement, improvement etc., should be included within the scope of protection of this application.
Claims (10)
1. a kind of connection method characterized by comprising
Detection terminal connect whether succeed with AP;
If the terminal and the AP connection failure, newly-built being connect with the AP for task;
Scan task operation is detected whether, if so, terminating the scan task;
Execute connecting with AP for the task.
2. connection method according to claim 1, which is characterized in that it is described to have detected whether scan task operation, if
Have, terminate the scan task further include:
If there is the scan task is run, obtains the scan task and start the time executed;
The time that the scan task has executed is calculated according to the time that the scan task starts to execute;
Judge that time that the scan task has executed accounts for the ratio of scan period,
If the ratio is more than or equal to preset threshold, the scan task is waited to be finished;If the ratio is less than pre-
If threshold value, the scan task is terminated.
3. connection method according to claim 1 or 2, which is characterized in that the detection terminal connect whether succeed with AP
Before further include: receive the order connecting with AP.
4. connection method according to claim 1 or 2, which is characterized in that if the terminal is connect with the AP
Failure, creating with connecting for task of the AP includes: that connecting with AP for the task is increased to the work of wpa_supplicant
Make in queue.
5. connection method according to claim 1 or 2, which is characterized in that it is described to have detected whether scan task operation, such as
Fruit has, and terminates the scan task includes: whether to have the scan task position in the work queue for detect wpa_supplicant
Before being connect with AP for the task.
6. a kind of attachment device characterized by comprising
Whether detection unit succeeds for detecting terminal and connecting with AP;
Newly-built unit, if for the terminal and the AP connection failure, newly-built being connect with the AP for task;
Unit is terminated, for detecting whether having scan task operation, if so, terminating the scan task;
Execution unit, for executing connecting with AP for the task.
7. attachment device according to claim 6, which is characterized in that the termination unit is also used to:
If there is the scan task is run, obtains the scan task and start the time executed;
The time that the scan task has executed is calculated according to the time that the scan task starts to execute;
Judge that time that the scan task has executed accounts for the ratio of scan period;
If the ratio is more than or equal to preset threshold, the scan task is waited to be finished;If the ratio is less than pre-
If threshold value, the scan task is terminated.
8. attachment device according to claim 6 or 7, which is characterized in that further include receiving unit, connect for receiving with AP
The order connect.
9. a kind of terminal, which is characterized in that including memory, processor and store on a memory and can run on a processor
Computer program, which is characterized in that the processor realizes any one of the claim 1-5 institute when executing described program
The step of stating method.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of any one of claim 1-5 the method is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811147245.1A CN109327915B (en) | 2018-09-29 | 2018-09-29 | Connection method, device and terminal |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811147245.1A CN109327915B (en) | 2018-09-29 | 2018-09-29 | Connection method, device and terminal |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109327915A true CN109327915A (en) | 2019-02-12 |
CN109327915B CN109327915B (en) | 2021-01-29 |
Family
ID=65266620
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811147245.1A Active CN109327915B (en) | 2018-09-29 | 2018-09-29 | Connection method, device and terminal |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109327915B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113507709A (en) * | 2021-09-10 | 2021-10-15 | 中国人民解放军总医院 | Automatic network connection method and device for medical equipment in scene of medical internet of things |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105516913A (en) * | 2014-09-22 | 2016-04-20 | 中兴通讯股份有限公司 | WIFI connection method and WIFI connection device |
CN106792984A (en) * | 2016-11-29 | 2017-05-31 | 努比亚技术有限公司 | A kind of WIFI hot spot scanning connection control method and terminal |
US20170265244A1 (en) * | 2016-03-11 | 2017-09-14 | Brother Kogyo Kabushiki Kaisha | Communication apparatus |
CN107949031A (en) * | 2017-12-20 | 2018-04-20 | 深圳市中科明望通信软件有限公司 | A kind of scan method of wireless network, mobile terminal and storage medium |
CN107979863A (en) * | 2017-11-27 | 2018-05-01 | 广东欧珀移动通信有限公司 | A kind of WiFi automatic connection methods, system and terminal device |
-
2018
- 2018-09-29 CN CN201811147245.1A patent/CN109327915B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105516913A (en) * | 2014-09-22 | 2016-04-20 | 中兴通讯股份有限公司 | WIFI connection method and WIFI connection device |
US20170265244A1 (en) * | 2016-03-11 | 2017-09-14 | Brother Kogyo Kabushiki Kaisha | Communication apparatus |
CN106792984A (en) * | 2016-11-29 | 2017-05-31 | 努比亚技术有限公司 | A kind of WIFI hot spot scanning connection control method and terminal |
CN107979863A (en) * | 2017-11-27 | 2018-05-01 | 广东欧珀移动通信有限公司 | A kind of WiFi automatic connection methods, system and terminal device |
CN107949031A (en) * | 2017-12-20 | 2018-04-20 | 深圳市中科明望通信软件有限公司 | A kind of scan method of wireless network, mobile terminal and storage medium |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113507709A (en) * | 2021-09-10 | 2021-10-15 | 中国人民解放军总医院 | Automatic network connection method and device for medical equipment in scene of medical internet of things |
CN113507709B (en) * | 2021-09-10 | 2021-11-23 | 中国人民解放军总医院 | Automatic network connection method and device for medical equipment in scene of medical internet of things |
Also Published As
Publication number | Publication date |
---|---|
CN109327915B (en) | 2021-01-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5112340B2 (en) | Improved method and system for testing a subscriber identity module (SIM) application toolkit | |
CN105933888B (en) | A kind of eSIM card method for burn-recording and device based on NFC | |
TWI724019B (en) | Method for testing a low power radio frequency (rf) data packet signal transceiver | |
CN102469081B (en) | Method, equipment and system for operating smart card | |
CN109416800B (en) | Authentication method of mobile terminal and mobile terminal | |
CN105827600A (en) | Method and apparatus for logging in client | |
US11451539B2 (en) | Identity identification and preprocessing | |
CN110351875A (en) | A kind of secondary cell wave beam failure recovery method, terminal and base station | |
US9877269B2 (en) | Electronic device and method of connecting electronic device to network | |
WO2021223672A1 (en) | Near field communication (nfc) method and apparatus, and electronic device | |
CN110430280A (en) | Account automatic logging method and system, storage medium and cloud desktop server | |
CN110177384A (en) | Cut-in method, device, wireless access point and readable storage medium storing program for executing | |
CN106850518A (en) | Safety certifying method and device | |
US10938806B2 (en) | Communication method and device | |
US9183370B2 (en) | System for authenticating a user to a portable electronic device using an authentication token transmitted to a smart card reader | |
CN101867912A (en) | Authentication method of access network and terminal | |
CN114024790A (en) | Distribution network binding method of intelligent household appliance, mobile terminal and cloud server | |
EP4175852B1 (en) | An identification method for electric vehicle charging stations | |
CN106856585A (en) | Set up the method and device of short-distance wireless passage | |
CN105072082A (en) | Method and device for transmitting verification code | |
CN109327915A (en) | A kind of connection method, device and terminal | |
CN104640112A (en) | Authentication method, device and system | |
CN106028323A (en) | Network access method, terminal and access point | |
CN109391472A (en) | Wireless network authentication method and device | |
CN111372224A (en) | Method, device and equipment for sharing seed code number by eSIM (embedded subscriber identity Module) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
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 |