-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed as not planned
Closed as not planned
Copy link
Description
I've been trying to get a fairly simple requests function working
@property
def alm_state(self):
payload = '[{"cmd":"GetAlarm", "action": 1, "param":{"Alarm": {"type": "md", "channel": 0}}}]'
return urequests.post(f'http://{self.ip}/api.cgi?cmd=GetAlarm&token={self.api_token}', json=payload).json()
However the issue I think is with the network being unable to respond to lower MTU paths
If I do a simple requests to a HTTP endpoint on the LAN everything works as expected, however if I do one to a HTTP endpoint over a VPN I get an error.
urequests.post("http://192.168.4.5")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "urequests.py", line 120, in post
File "urequests.py", line 60, in request
OSError: [Errno 103] ECONNABORTED
Public websites are mostly ok and local HTTP endpoints are ok.
>>> urequests.post("http://10.16.4.1")
<Response object at 3fff0890>
>>> urequests.post("http://www.cisco.com")
<Response object at 3fff12f0>
>>>
I looked into the network library but there is no option to change MTU. I suspect that the network stack on the NodeMCU boards at least is unable to respond to MTU changes.
Metadata
Metadata
Assignees
Labels
No labels