Skip to content

Commit 4c56aa3

Browse files
author
brentru
committed
remove version and method check in aws_iot, move to examples instead
1 parent 35a4857 commit 4c56aa3

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

adafruit_aws_iot.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ def __init__(self, mmqttclient, keep_alive=30):
6666
else:
6767
raise TypeError("This class requires a preconfigured MiniMQTT object, \
6868
please create one.")
69-
# Verify nina-fw => 1.4.0
70-
fw_semver_maj = bytes(self.client.wifi.esp.firmware_version).decode("utf-8")[2]
71-
assert int(fw_semver_maj) >= 4, "Please update nina-fw to 1.4.0 or above."
7269
# Verify MiniMQTT client object configuration
7370
try:
7471
self.cid = self.client.client_id
@@ -78,9 +75,6 @@ def __init__(self, mmqttclient, keep_alive=30):
7875
as the Client ID.")
7976
# Shadow-interaction topic
8077
self.shadow_topic = "$aws/things/{}/shadow".format(self.cid)
81-
# Ensure set_certificate and set_private_key were run from ESP32SPI
82-
assert self.client.wifi.esp.set_psk and self.client.wifi.esp.set_crt, "Certificate \
83-
and private key must be set to your AWS Device Cert and Private Key."
8478
# keep_alive timer must be between 30 <= keep alive interval <= 1200 seconds
8579
# https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html
8680
assert 30 <= keep_alive <= 1200, "Keep_Alive timer \

examples/aws_iot_shadows.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646

4747
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
4848
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
49+
50+
# Verify nina-fw version >= 1.4.0
51+
assert int(bytes(esp.firmware_version).decode("utf-8")[2]) >= 4, "Please update nina-fw to >=1.4.0."
52+
4953
"""Use below for Most Boards"""
5054
status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2) # Uncomment for Most Boards
5155
"""Uncomment below for ItsyBitsy M4"""

examples/aws_iot_simpletest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@
4646

4747
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
4848
esp = adafruit_esp32spi.ESP_SPIcontrol(spi, esp32_cs, esp32_ready, esp32_reset)
49+
50+
# Verify nina-fw version >= 1.4.0
51+
assert int(bytes(esp.firmware_version).decode("utf-8")[2]) >= 4, "Please update nina-fw to >=1.4.0."
52+
4953
"""Use below for Most Boards"""
5054
status_light = neopixel.NeoPixel(board.NEOPIXEL, 1, brightness=0.2) # Uncomment for Most Boards
5155
"""Uncomment below for ItsyBitsy M4"""

0 commit comments

Comments
 (0)