Open mrajiullah opened 5 years ago
>>> Running simple-connect.py
>>>
>>>
>
Pycom MicroPython 1.18.2.r7 [v1.8.6-849-df9f237] on 2019-05-14; FiPy with ESP32
Type "help()" for more information.
>>>
>>> lte.isconnected()
True
>>> import upings
>>> upings.ping('google.com')
PING google.com (32.32.15.128): 64 data bytes
4 packets transmitted, 0 packets received
(4, 0)
>>> upings.ping('kau.se')
PING kau.se (0.0.0.0): 64 data bytes
4 packets transmitted, 0 packets received
(4, 0)
>>> upings.ping('www.kau.se')
PING www.kau.se (32.32.15.128): 64 data bytes
4 packets transmitted, 0 packets received
(4, 0)
>>>
>>> import urequests
>>> response = urequests.get('http://jsonplaceholder.typicode.com/albums/1')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "urequests.py", line 114, in get
File "urequests.py", line 102, in request
File "urequests.py", line 60, in request
OSError: [Errno 113] EHOSTUNREACH
>>> import usocket
>>> print(usocket.getaddrinfo("www.google.com", 80)[0][-1])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OSError: -113
Output: Unsuccessful