CXWIF Command — WiFi Configuration
Configures the global behavior of the device’s WiFi module.
What is it for?
📶 Main use cases:
- 🔌 Activate or deactivate the WiFi module
- 📡 Select Station (client) or Access Point mode
- 📤 Enable automatic report sending via WiFi
- ⚙️ Initial WiFi system configuration
Commands
| Operation | Syntax |
|---|---|
| Query | QCXWIF |
| Configure | SCXWIFwifipwr,apmode,autodestiny |
| Response | RCXWIFwifipwr,apmode,autodestiny |
Parameters
| Parameter | Description | Values |
|---|---|---|
wifipwr | Module activation | 0 = Off (default), 1 = On |
apmode | Operation mode | 0 = Station (default), 1 = Access Point (APX), 2 = Access Point (APY) |
autodestiny | Auto-destination: WiFi as the outgoing channel for reports | 0 = No, 1 = Yes (default) |
The third field: autodestiny
It decides whether reports may go out over WiFi. This is the field that confuses people most, because it has nothing to do with powering the module on.
| Value | What it does |
|---|---|
1 (default) | The device may switch the report channel to WiFi. Reports without an explicit destination go to IP3 (if defined) or alternately to IP0/IP1. |
0 | The report channel never switches to WiFi: reports keep going out over cellular even with WiFi connected and on a strong signal. |
autodestiny=0 does not turn WiFi off. With >SCXWIF1,0,0< the module stays on and connected, and still serves everything else:
- configuring the device over WiFi (commands, terminal, Access Point portal),
- updating the firmware,
- forcing a one-off send over WiFi with the
;@WIFsuffix (see G Command).
The only thing that changes is where automatic reports go out: over cellular. If the device is set to 1,0,0 and the cellular status reads NOCONN, that is not a fault: see cellular connection states.
The three fields are applied only if present: >SCXWIF1< changes the power state alone and leaves mode and auto-destination as they were. An out-of-range value is ignored without an error. And changing any of the three restarts the WiFi connection, so the network takes a few seconds to come back up.
Examples
Station Mode with WiFi Reports
// WiFi ON, Station mode, automatic reports ON
>SCXWIF1,0,1<
>RCXWIF1,0,1;ID=865413053386354;*31<Access Point Mode
// WiFi ON, AP mode, no automatic reports
>SCXWIF1,1,0<
>RCXWIF1,1,0;ID=865413053386354;*30<Quick Configurations
| Scenario | Command | Description |
|---|---|---|
| 📡 WiFi as client | >SCXWIF1,0,0< | Connect to existing network |
| 📶 WiFi as AP | >SCXWIF1,1,0< | Create own network |
| 📶 WiFi as AP (APY) | >SCXWIF1,2,0< | Create own network with APY data |
| 📤 Client + reports | >SCXWIF1,0,1< | Client with automatic sending |
| 🔴 Turn off WiFi | >SCXWIF0,0,0< | Deactivate module |
Operation Modes
| Mode | Description | Associated command |
|---|---|---|
| Station | Device connects to existing WiFi network | APW |
| Access Point | Device creates its own WiFi network | APX |
| Access Point (APY) | Device creates a second WiFi network with APY data | APY |
Compatibility
See Also
- APW Command - Station mode configuration
- APX Command - Access Point mode configuration
- IP Command - Report destinations
- Terminal Access Point mode - Practical example