Skip to content

Update Cellular Examples for Adafruit FONA (3G/GSM) #29

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 2 commits into from
Jul 21, 2020

Conversation

brentru
Copy link
Member

@brentru brentru commented Jun 1, 2020

Updating Cellular examples for Adafruit Fona v2.0.0
https://github.com/adafruit/Adafruit_CircuitPython_FONA


Tests

FONA808

examples/requests_advanced_cellular.py

code.py output:
Attaching to network...
Attaching to network...
Attaching to network...
Attached!
Connecting to network...
Network Connected!
Fetching JSON data from http://httpbin.org/get...
------------------------------------------------------------
Response's Custom User-Agent Header: Adafruit CircuitPython,blinka/1.0.0
------------------------------------------------------------
Response HTTP Status Code:  200
------------------------------------------------------------
Raw Response:  b'{\n  "args": {}, \n  "headers": {\n    "Host": "httpbin.org", \n    "User-Agent": "Adafruit CircuitPython,blinka/1.0.0", \n    "X-Amzn-Trace-Id": "Root=1-5ed55a7a-971197216b39495592d6b928"\n  }, \n  "origin": "172.58.230.203", \n  "url": "http://httpbin.org/get"\n}\n'

examples/requests_simpletest_cellular.py

code.py output:
Attaching to network...
Attaching to network...
Attaching to network...
Attached!
Connecting to network...
Network Connected!
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
Text Response:  This is a test of Adafruit WiFi!
If you can read this, its working :)

----------------------------------------
Fetching JSON data from http://httpbin.org/get
----------------------------------------
JSON Response:  {'url': 'http://httpbin.org/get', 'headers': {'User-Agent': 'Adafruit CircuitPython', 'Host': 'httpbin.org', 'X-Amzn-Trace-Id': 'Root=1-5ed5599c-3fc3b9e0c88b9b9c6401c2f0'}, 'args': {}, 'origin': '172.58.219.124'}
----------------------------------------
POSTing data to http://httpbin.org/post: 31F
----------------------------------------
Data received from server: 31F
----------------------------------------
POSTing data to http://httpbin.org/post: {'Date': 'July 25, 2019'}
----------------------------------------
JSON Data received from server: {'Date': 'July 25, 2019'}
----------------------------------------

FONA3G

examples/requests_advanced_cellular.py

code.py output:
Attaching to network...
...
Attached!
Connecting to network...
Network Connected!
Fetching JSON data from http://httpbin.org/get...
------------------------------------------------------------
Response's Custom User-Agent Header: Adafruit CircuitPython,blinka/1.0.0
------------------------------------------------------------
Response HTTP Status Code:  200
------------------------------------------------------------
Raw Response:  b'{\n  "args": {}, \n  "headers": {\n    "Host": "httpbin.org", \n    "User-Agent": "Adafruit CircuitPython,blinka/1.0.0", \n    "X-Amzn-Trace-Id": "Root=1-5ed56081-59b25ec0b38383f42de98e28"\n  }, \n  "origin": "172.58.235.142", \n  "url": "http://httpbin.org/get"\n}\n'

requests_simpletest_cellular.py

code.py output:
Attaching to network...
...
Attaching to network...
Attached!
Connecting to network...
Connecting to network...
Network Connected!
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
----------------------------------------
Text Response:  This is a test of Adafruit WiFi!
If you can read this, its working :)

----------------------------------------
Fetching JSON data from http://httpbin.org/get
----------------------------------------
JSON Response:  {'url': 'http://httpbin.org/get', 'headers': {'User-Agent': 'Adafruit CircuitPython', 'Host': 'httpbin.org', 'X-Amzn-Trace-Id': 'Root=1-5ed5626f-4e8e8a8366aeb608051d33c4'}, 'args': {}, 'origin': '172.58.235.22'}
----------------------------------------
POSTing data to http://httpbin.org/post: 31F
----------------------------------------
Data received from server: 31F
----------------------------------------
POSTing data to http://httpbin.org/post: {'Date': 'July 25, 2019'}
----------------------------------------
JSON Data received from server: {'Date': 'July 25, 2019'}
----------------------------------------

@brentru brentru requested a review from a team June 1, 2020 20:22
Copy link
Collaborator

@makermelissa makermelissa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have the hardware to test on, but the code changes look good to me.

@makermelissa makermelissa merged commit 43017e3 into adafruit:master Jul 21, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Jul 22, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_DS3231 to 2.4.0 from 2.3.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_DS3231#27 from jepler/calibration-and-temperature

Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 to 1.5.0 from 1.4.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_PCF8523#19 from jepler/calibration-registers

Updating https://github.com/adafruit/Adafruit_CircuitPython_PM25 to 1.0.2 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_PM25#3 from dglaude/patch-1

Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 3.3.0 from 3.2.5:
  > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#82 from fede2cr/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT to 3.2.2 from 3.2.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_MiniMQTT#44 from 2bndy5/master

Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 1.3.0 from 1.2.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#8 from FoamyGuy/performance_boost

Updating https://github.com/adafruit/Adafruit_CircuitPython_Requests to 1.5.0 from 1.4.3:
  > Merge pull request adafruit/Adafruit_CircuitPython_Requests#29 from brentru/update-cellular-3g
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.

2 participants