当前位置:网站首页>How do we connect to WiFi?

How do we connect to WiFi?

2022-06-11 09:37:00 Little tiger_ IOT

0、 How we connect WiFi Of —— No problem answer

  • open WiFi switch ;
  • Choose the WiFi, Input password ;
  • Click to connect ;

1、 How we connect WiFi Of

  • scanning SSID;
  • authentication ;
  • relation ;

1.1、 scanning SSID

SSID Namely WiFi The name of , scanning SSID It's discovery WiFi The process of , It is divided into active scanning and passive scanning ;

  • Active scanning STA Send on all channels Probe Request frame , received Probe Request The frame of AP Will respond to Probe Response, To discover SSID;
  • Passive scanning AP To approximate 100ms Send at regular intervals Beacon frame , And that includes SSID Information about ,STA Listen for each channel Beacon Frame to get SSID;

Passive scanning depends on AP send out Beacon frame ,Beacon Frames are spaced , You can even set the ratio 100ms Also long ;

Active scanning , received Probe Request The frame of AP Will respond Probe Response, therefore Active scanning is faster ;

actually , Active scanning and passive scanning are blend It works , For example 1 Send over the channel  Probe Request At the frame , You can also receive 1 On the channel Beacon frame ,1 Switch after channel detection 2 channel , Cycle until all channels are measured ;

1.1.1、 channel

WiFi Yes 2.4G and 5G Equal frequency band ,2.4G The range of the frequency band is 2.400GHz-2.497GHz;

Every time 20MHz Divided into one channel , altogether 14 Channels , China only uses 1~13 channel ;

As you can see from the diagram , There may be overlap between channels , But if the interval is used, such as 1、6、11 It's independent of each other ;

1.1.2、Beacon frame ( Beacon frame )

【Wi-Fi 802.11 agreement 】 Manage frames And Beacon Frame details _ Little Pirate ~ The blog of -CSDN Blog _beacon frame

This article Beacon The frame is very detailed , I just take a picture to illustrate Beacon The information contained in the frame ;

1.1.3、Probe Request frame ( Detection frame )

SSID Field

  • If SSID It's empty , Then all on the channel AP After receiving the probe frame, it will respond ;
  • If SSID It's specific WiFi name , Only this AP To respond to ;

 1.1.4、Probe Responset frame ( Probe response frame )

The information returned is SSID、Rates、Channel etc. ;

And above Beacon Compare the information sent by the frame , It is found that many fields have ;


1.2、 authentication

Authentication is equivalent to entering WiFi password , Not to know SSID Of STA Can access your WiFi, It is divided into :

  • Shared key authentication ( It has been eliminated );
  • Open systems certification :WPA/WPA2/WPA3, It is also divided into home version and enterprise version Personal、Enterprise, What we often use is WPA/WPA2-Personal encryption ;

Authentication phase , need STA towards AP send out Authentication( Identity Authentication ) frame ,AP If the verification is successful, an Authentication frame ;


1.3、 relation

After certification , It doesn't mean you joined WiFi The Internet , You have permission to join this AP;

Because a AP It often needs more than one STA Access , Distinguish between STA, Just know to enter AP You need to know which data to send STA, Such as the use of MAC Address Association ;

  • Association Request frame : The frame used after link authentication , Request to join Wi-Fi The Internet ;
  • Association Response frame : Send after successful association , contain Association ID( Association identifier );

1.4、 De Certification

Deauthentication frame : stay STA Exit or switch WiFi When you use , Used to terminate an authentication relationship , Contains the reason code for exiting .

原网站

版权声明
本文为[Little tiger_ IOT]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110914309947.html