Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
bump baud to 9600 for FONA, disable encryption for fona
  • Loading branch information
brentru committed May 19, 2020
commit 8d53b311a4245e38bf6388b66a6218378ecdb325
7 changes: 3 additions & 4 deletions examples/minimqtt_adafruitio_cellular.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@

### Cellular ###

# Create a serial connection for the FONA connection using 4800 baud.
# These are the defaults you should use for the FONA Shield.
# For other boards set RX = GPS module TX, and TX = GPS module RX pins.
uart = busio.UART(board.TX, board.RX, baudrate=4800)
# Create a serial connection for the FONA connection
uart = busio.UART(board.TX, board.RX)
rst = digitalio.DigitalInOut(board.D4)
# Initialize FONA
fona = FONA(uart, rst)
Expand Down Expand Up @@ -79,6 +77,7 @@ def message(client, topic, message):
broker="io.adafruit.com",
username=secrets["aio_username"],
password=secrets["aio_key"],
is_ssl=False,
)

# Setup the callback methods above
Expand Down
11 changes: 6 additions & 5 deletions examples/minimqtt_simpletest_cellular.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
print("Cellular secrets are kept in secrets.py, please add them there!")
raise

# Create a serial connection for the FONA connection using 4800 baud.
# These are the defaults you should use for the FONA Shield.
# For other boards set RX = GPS module TX, and TX = GPS module RX pins.
uart = busio.UART(board.TX, board.RX, baudrate=4800)
# Create a serial connection for the FONA connection
uart = busio.UART(board.TX, board.RX)
rst = digitalio.DigitalInOut(board.D4)
# Initialize FONA
fona = FONA(uart, rst)
Expand Down Expand Up @@ -86,7 +84,10 @@ def publish(client, userdata, topic, pid):

# Set up a MiniMQTT Client
client = MQTT.MQTT(
broker=secrets["broker"], username=secrets["user"], password=secrets["pass"]
broker=secrets["broker"],
username=secrets["user"],
password=secrets["pass"],
is_ssl=False,
)

# Connect callback handlers to client
Expand Down