69 Commits

Author SHA1 Message Date
Arif Alam
a6fdd32e40 cmd_upgrade: enable curl to follow redirects
Add -L flag to curl download command to automatically follow HTTP
redirects when downloading firmware images. This ensures that upgrade
operations work correctly when the firmware URI returns a redirect
response (e.g., 301, 302).

Signed-off-by: Arif Alam <arif.alam@netexperience.com>
2025-12-11 06:16:11 +01:00
John Crispin
f3d1356a06 add reenroll command
Signed-off-by: John Crispin <john@phrozen.org>
2025-07-08 10:20:31 +02:00
John Crispin
e155483ea0 command: update upgrade and factory commands to handle new operational certs
Signed-off-by: John Crispin <john@phrozen.org>
2025-06-13 07:49:59 +02:00
Paul White
b4cfdc6a1c cmd_upgrade: implement secure download
This implements secure download by adding additional fields to the
upgrade command payload:

  - use-local-certificates (boolean): When provided, enables secure download
    and if true uses built-in certificates, if false requires below fields
  - ca-certificate (string): base64 encoded cas.pem
  - certificate (string): base64 encoded cert.pem
  - private-key (string): base64 encoded key.pem

The following additional changes are included:
  - Switches from wget to curl for downloading as curl supports using
    certificates and in general seems more reliable
  - An automatic download retry was added before reporting the failure
  - When download fails, provides both exit code & http code to the cloud

Fixes: WIFI-14643
Signed-off-by: Paul White <paul@shasta.cloud>
2025-05-26 16:17:29 +02:00
John Crispin
52afdf8f1d fix wifi-scan on wifi-7 devices
Signed-off-by: John Crispin <john@phrozen.org>
2025-04-30 07:59:29 +02:00
John Crispin
45e6c53480 command: add fixed_config
Signed-off-by: John Crispin <john@phrozen.org>
2024-09-16 16:03:45 +02:00
John Crispin
8045e6c51d add full fingerprinting data model
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-31 12:07:01 +02:00
John Crispin
e1487e5112 fix factory reset command.
cmd_line needs to be converted from array to string.

Signed-off-by: John Crispin <john@phrozen.org>
2024-05-14 15:37:02 +02:00
John Crispin
a0a420fd43 gracefully close the websocket during factory reset
Signed-off-by: John Crispin <john@phrozen.org>
2024-05-10 12:03:53 +02:00
John Crispin
e2cef05c78 return a success message before triggering FW upgrade
Signed-off-by: John Crispin <john@phrozen.org>
2023-12-13 09:53:38 +01:00
John Crispin
16ef7bcbfa tip name and serial fields are swapped when triggering a wifi scan
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-09 07:27:18 +01:00
John Crispin
3d9bd6522a add channel utilization and assoc count to wifi scan results
Signed-off-by: John Crispin <john@phrozen.org>
2023-11-07 06:49:42 +01:00
John Crispin
71f42ca0f3 add keep_config to upgrade command
Signed-off-by: John Crispin <john@phrozen.org>
2023-10-23 08:27:22 +02:00
John Crispin
27ad7a83a9 cmd_rrm.uc: do not enforce a channel
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:40 +02:00
John Crispin
4dd5fa4365 add certupdate command handler
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:40 +02:00
John Crispin
400d241b8f rename usteer2 -> rrm
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:40 +02:00
John Crispin
235d666c21 add transfer command handler
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:40 +02:00
John Crispin
2e6be837cb keep-redirector should store the new gateway.json instead
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-28 14:52:40 +02:00
John Crispin
5f480eb8af add neighbor action to rrm handler
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-19 09:08:12 +02:00
John Crispin
e99eaf9bdb add rrm cmd handler
Signed-off-by: John Crispin <john@phrozen.org>
2023-09-18 09:36:12 +02:00
John Crispin
e5ff55392b channel 40 was not set correctly during wifi-scan
Signed-off-by: John Crispin <john@phrozen.org>
2023-08-21 07:56:02 +02:00
John Crispin
5062854949 make the wifi scanning code aware of the TIP OUI
Signed-off-by: John Crispin <john@phrozen.org>
2023-07-26 14:37:59 +02:00
John Crispin
e156652c1b FWsignature->signature
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-28 08:53:54 +02:00
John Crispin
47f39e9e1d cmd_upgrade: signature requirement was not properly detected
Signed-off-by: John Crispin <john@phrozen.org>
2023-06-14 09:24:53 +02:00
John Crispin
27b1d45c98 cmd_upgrade: create /ucentral.upgrade
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-17 15:40:38 +02:00
John Crispin
e30b05f369 propagate reboot_cause
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-16 14:05:50 +02:00
John Crispin
4b86496e07 fix generation of upgrade.tgz
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-11 14:55:27 +02:00
John Crispin
c112a0cf8b rtty: allow configuration of the mutual tls feature
Signed-off-by: John Crispin <john@phrozen.org>
2023-05-11 08:55:38 +02:00
John Crispin
54453a6345 cmd_script: custom scripts with no uri failed to send the stdout to the server
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-14 14:43:26 +01:00
John Crispin
5517c1c7e0 wifiscan: add additional options to the periodic scan feature
Signed-off-by: John Crispin <john@phrozen.org>
2023-03-01 16:37:56 +01:00
John Crispin
5287f72bb7 fix wifiscan channel
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-28 12:04:45 +01:00
John Crispin
35cf7bfb39 add more verbose error code to the script command
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-22 15:15:17 +01:00
John Crispin
c3f6981844 sysupgrade: GW sends FWsignature and not signature
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-13 09:02:09 +01:00
John Crispin
e88b5674eb wifiscan: add support for periodic scans
Signed-off-by: John Crispin <john@phrozen.org>
2023-02-06 10:29:53 +01:00
John Crispin
77f1d1d42f use correct rstriction property during upgrade
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-12 13:57:03 +01:00
John Crispin
c6ba7ce3e9 add diagnostic script support
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-03 07:37:56 +01:00
John Crispin
5d70069c53 cmd_script: add an additional return json when upload was triggered
Signed-off-by: John Crispin <john@phrozen.org>
2022-12-01 07:43:43 +01:00
John Crispin
eb0c25c1f3 add signature verification wrapper
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-21 06:32:10 +01:00
John Crispin
7a4b10a6b8 rework script handler
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-07 08:43:52 +01:00
John Crispin
40de47357b add developer=1 override option for locked units
Signed-off-by: John Crispin <john@phrozen.org>
2022-11-02 08:12:09 +01:00
John Crispin
d40b4c676c add FCC restriction support
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-31 09:19:09 +01:00
John Crispin
9968cb6688 cmd_trace: limit maximum file size to 25% of free mem
Signed-off-by: John Crispin <john@phrozen.org>
2022-10-27 16:49:03 +02:00
John Crispin
2671671c91 add script command handler
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-29 17:52:04 +02:00
John Crispin
cf89dd4496 always send all IEs inside the wifi scan result
Signed-off-by: John Crispin <john@phrozen.org>
2022-05-25 13:22:06 +02:00
John Crispin
81f1886bea convert system and command scripts to raw mode
Signed-off-by: John Crispin <john@phrozen.org>
2022-04-20 15:02:25 +02:00
John Crispin
b3ce69e0cd wifiscan: allow bandwith override
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 08:58:20 +01:00
John Crispin
6d59accd76 trace: improve tracing code
fix timeout handling and only add packet count if no duration was requested

Signed-off-by: John Crispin <john@phrozen.org>
2022-02-22 08:49:20 +01:00
John Crispin
5f769a0b37 wifisca: add CSA support
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-11 16:37:47 +01:00
John Crispin
7bc2f00441 improve wifi scanning
Signed-off-by: John Crispin <john@phrozen.org>
2022-02-04 07:24:48 +01:00
John Crispin
0a4956623b add new wifi-scanning code
Signed-off-by: John Crispin <john@phrozen.org>
2022-01-27 14:59:04 +01:00