Ok, I think I know why my Arduino script is working on the legacy Router Firmware and not on the new one.
The poor Arduino is exploding because the response of the login is around 13Kb long. The internal buffer the httpclient library uses has 1Kb of ram allocated to this. Even when I increased this to 20Kb it timed out. Even increasing the timeout to 5 minutes, the library is exploding somewhere else (I did not code this library, so I'm not 100% familiar with it).
My next question is:
- Is there a way to limit the info the rut240 adds in the login response? Maybe I can create another user and that would limit the huge amount of info returned?
This is the response I receive from the modem:
< HTTP/1.0 200 OK
< Connection: close
< Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
< X-Frame-Options: SAMEORIGIN
< X-Content-Type-Options: nosniff
< Content-Security-Policy: default-src 'self'; frame-src * 'self';
img-src * 'self'; script-src https://cdn.jsdelivr.net 'unsafe-eval' 'self' 'sha256-8yE2w7Bv8/Il8SvtEkB35j3QNRei9CKtdX8HgqblU04=' 'nonce-pbfMmwrsnzqz1rg86SUDb6A+NvckQ8U3s4almwle63M' 'sha256-3/SyFyEV0Y/9yrhH8vNQqUrPTjxumNcaYo5gRtJvm2c='; style-src https://cdn.jsdelivr.net 'unsafe-hashes' 'sha256-4Su6mBWzEIFnH4pAGMOuaeBrstwJN4Z3pq/s1Kn4/KQ=' 'sha256-kwpt3lQZ21rs4cld7/uEm9qI5yAbjYzx+9FGm/XmwNU=' 'self'
< Access-Control-Allow-Origin: *
< Content-Type: application/json
<
{"jsonrpc":"2.0","id":1,"result":[0,{"ubus_rpc_session":"fafe385bc152f09c750798fc14357b70","timeout":300,"expires":299,"acls":{"access-group":{"core":["read","write"],"network/dns":["read","write"],"network/firewall/attack_prevention":["read","write"],"network/firewall/custom":["read","write"],"network/firewall/forwards":["read","write"],"network/firewall/nat_rules":["read","write"],"network/firewall/rules":["read","write"],"network/firewall/zones":["read","write"],"network/interfaces":["read","write"],"network/lan":["read","write"],"network/mobile/general":["write","read"],"network/mobile/operators/list":["write","read"],"network/mobile/operators/scan":["read","write"],"network/mobile/sim_switch":["read","write"],"network/mwan":["read","write"],"network/network":["read","write"],"network/routes/advanced_routing":["read","write"],"network/routes/dynamic_routes/proto_bgp":["read","write"],"network/routes/dynamic_routes/proto_eigrp":["read","write"],"network/routes/dynamic_routes/proto_nhrp":["read","write"],"network/routes/dynamic_routes/proto_ospf":["read","write"],"network/routes/dynamic_routes/proto_rip":["read","write"],"network/routes/static_routes":["read","write"],"network/vlan/interface_based":["read","write"],"network/vlan/port_based":["read","write"],"network/wireless":["read","write"],"network/wireless/scan":["read","write"],"services/auto-reboot/ping-reboot":["read","write"],"services/auto-reboot/reboot-scheduler":["read","write"],"services/cloud_solutions/rms":["read","write"],"services/events_reporting":["read","write"],"services/io/general":["read","write"],"services/io/juggler/action":["read","write"],"services/io/juggler/condition":["read","write"],"services/io/juggler/input":["read","write"],"services/io/post_get":["read","write"],"services/io/scheduler":["read","write"],"services/mobile_utilities/call-utilities":["read","write"],"services/mobile_utilities/sms/read":["read","write"],"services/mobile_utilities/sms/send":["read","write"],"services/mobile_utilities/sms/storage":["read","write"],"services/mobile_utilities/sms_gateway/auto_reply":["read","write"],"services/mobile_utilities/sms_gateway/email_to_sms":["read","write"],"services/mobile_utilities/sms_gateway/post_get":["read","write"],"services/mobile_utilities/sms_gateway/sms_forwarding":["read","write"],"services/mobile_utilities/sms_utilities":["read","write"],"services/ntpc/general":["read","write"],"services/ntpc/ntp":["read","write"],"services/packages/packages":["read","write"],"services/
(edited so I can post this, post limited to 12k chars)
Thanks for your help.