-
Notifications
You must be signed in to change notification settings - Fork 74
Adding WPA2 Enterprise support to the WiFi manager library #45
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
8e65459
Chunk buffer sends into 64 byte chunks
martymcguire 9cade63
rm temp vars. replace buffer slice w/ memoryview.
martymcguire 79425a6
Fixed infinite loop when socket readline fails
ZachNo bf54a08
Update adafruit_esp32spi/adafruit_esp32spi_socket.py
ZachNo 7386534
Adding WPA2 Enterprise support to the WiFi manager library
docmollo d8f4ad2
Added an enum-like class for the WiFi connection type and refactored …
docmollo 8e2b787
Replaced enum-like class with 2 constants; various fix-ups based on P…
docmollo ac4aee5
Merge pull request #42 from ZachNo/socket_hang_fix
ladyada c25157e
Make timeout a keyword argument
anecdata 868dd5e
Merge pull request #50 from anecdata/master
makermelissa 4df8144
add first mock api, blinks!
7772894
add valid pin tupleset check before initialization, raise error
00e7f97
drop all pull functionality since we dont have it defined in adafruit…
5e97cb1
add switch_to_x methods, docstrings
6a0c036
pylinting - 8.79/10, look at drivemode/direction classes...
4923344
checking in digitalio, ready
8599c01
add credit to where credit is due :)
e199972
Merge pull request #51 from brentru/mock-pwmout-digitalio
brentru 6fcb231
Adding pwmout back in
64ca443
correct pin in attrerror, fixup docstrings
c916224
set freq
596b879
frequency should return, not raise
46b4dea
Merge pull request #52 from brentru/add-pwmout-implementation
brentru d21b709
add an externally defined rgbled status_led to _wifimanager
aeae91e
test the pixel attributes within pixel_status
92182ea
Merge pull request #53 from brentru/expose-rgbled-status-wifimanager
ladyada 0d7c5b5
Adding WPA2 Enterprise support to the WiFi manager library
docmollo 15ea3cc
Added an enum-like class for the WiFi connection type and refactored …
docmollo 1eca01c
Replaced enum-like class with 2 constants; various fix-ups based on P…
docmollo 1ff8edf
Refactored wifimanager connect function into 3 separate functions; re…
docmollo e01c762
fixing merge conflicts
docmollo 4190bc3
fix the failure_count issue...sorry about that!
docmollo 54bcb5a
make ._esp public
a23026d
Merge pull request #60 from brentru/make-esp-object-public
brentru 8f964cc
Merge pull request #29 from martymcguire/mm-chunk-socket-sends
siddacious 1e77ef5
merged conflicts
docmollo a492dda
merged conflicts
docmollo bce6bfa
merged conflicts
docmollo cbc7901
merged conflicts
docmollo 447955a
merged conflicts
docmollo 0c07ceb
merged conflicts
docmollo 5931c1b
merged conflicts
docmollo 7bc0ec6
merged conflicts
docmollo bb679e8
fix a regression due to the rebase'ing...
docmollo 5c7a735
more fix-ups from rebase; fixed param defs in __init__
docmollo c89d13e
fixing more issues
docmollo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import time | ||
import board | ||
import busio | ||
from digitalio import DigitalInOut | ||
import neopixel | ||
from adafruit_esp32spi import adafruit_esp32spi | ||
from adafruit_esp32spi.adafruit_esp32spi_wifimanager import ESPSPI_WiFiManager | ||
|
||
print("ESP32 SPI WPA2 Enterprise webclient test") | ||
|
||
# Get wifi details and more from a secrets.py file | ||
try: | ||
from secrets import secrets | ||
except ImportError: | ||
print("WiFi secrets are kept in secrets.py, please add them there!") | ||
raise | ||
|
||
# If you are using a board with pre-defined ESP32 Pins: | ||
docmollo marked this conversation as resolved.
Show resolved
Hide resolved
|
||
esp32_cs = DigitalInOut(board.ESP_CS) | ||
esp32_ready = DigitalInOut(board.ESP_BUSY) | ||
esp32_reset = DigitalInOut(board.ESP_RESET) | ||
|
||
# If you have an externally connected ESP32: | ||
# esp32_cs = DigitalInOut(board.D9) | ||
# esp32_ready = DigitalInOut(board.D10) | ||
# esp32_reset = DigitalInOut(board.D5) | ||
|
||
spi = busio.SPI(board.SCK, board.MOSI, board.MISO) | ||
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset) | ||
"""Use below for Most Boards""" | ||
status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2) # Uncomment for Most Boards | ||
"""Uncomment below for ItsyBitsy M4""" | ||
#status_light = dotstar.DotStar(board.APA102_SCK, board.APA102_MOSI, 1, brightness=0.2) | ||
wifi = ESPSPI_WiFiManager(esp, secrets, status_light, connection_type=ESPSPI_WiFiManager.ENTERPRISE) | ||
|
||
counter = 0 | ||
|
||
while True: | ||
try: | ||
print("Posting data...", end='') | ||
data = counter | ||
feed = 'test' | ||
payload = {'value':data} | ||
response = wifi.post( | ||
"https://io.adafruit.com/api/v2/"+secrets['aio_username']+"/feeds/"+feed+"/data", | ||
json=payload, | ||
headers={"X-AIO-KEY":secrets['aio_key']}) | ||
print(response.json()) | ||
response.close() | ||
counter = counter + 1 | ||
print("OK") | ||
except (ValueError, RuntimeError) as e: | ||
print("Failed to get data, retrying\n", e) | ||
wifi.reset() | ||
continue | ||
response = None | ||
time.sleep(15) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.