Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extmod/network_nina: Fix the AP security mode constants. #14372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iabdalkader
Copy link
Contributor

@iabdalkader iabdalkader commented Apr 24, 2024

I was looking at the Nina firmware recently when I noticed that the command opcode 0x19 actually starts the AP in WPA/WPA2 mode. This has been long misunderstood because its handler was called setApPassPhrase implying that it's WEP. Even though a function exists in the firmware that attempts to set up an AP with WEP, it seems that this mode is not supported for AP.

I've verified this and the AP is using WPA/WPA2:

> nmcli dev wifi
BSSID              SSID  MODE   CHAN  RATE        SIGNAL  BARS  SECURITY  
84:CC:A8:30:4C:51  NINA  Infra  1     135 Mbit/s  100     ▂▄▆█  WPA1 WPA2 

There are no functional changes in this PR, it just fixes the constants names and removes the useless sanity checks for WEP.

The only AP security mode supported is actually WPA/WPA2 not WEP. The
firmware command `0x19` starts the AP using `WIFI_AUTH_WPA_WPA2_PSK`
mode.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Copy link

codecov bot commented Apr 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.39%. Comparing base (9c7f065) to head (63e2839).

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #14372   +/-   ##
=======================================
  Coverage   98.39%   98.39%           
=======================================
  Files         161      161           
  Lines       21204    21204           
=======================================
  Hits        20864    20864           
  Misses        340      340           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

Code size report:

   bare-arm:    +0 +0.000% 
minimal x86:    +0 +0.000% 
   unix x64:    +0 +0.000% standard
      stm32:    +0 +0.000% PYBV10
     mimxrt:    +0 +0.000% TEENSY40
        rp2:    +0 +0.000% RPI_PICO
       samd:    +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant