set_wireless_channel
Adjust a MikroTik wireless interface's frequency and channel width, with optional deadman restore to prevent losing management access.
Instructions
Set a /interface/wireless interface's frequency (MHz) and
optionally channel_width.
LOCKOUT-RISK on a PtP link that is itself the management path to the
far end: a bad frequency (or a DFS Channel Availability Check stall)
can cut the only route back to the device. By default
(arm_deadman=True), a confirm=True apply FIRST arms a dead-man
(arm_dead_man) that restores the interface's prior frequency/
channel-width after deadman_minutes (1-60, default 3) unless
cancelled - call cancel_dead_man(device_name, dead_man["name"])
once the new channel is confirmed good. Set arm_deadman=False only
for an interface known NOT to be a management path.
The returned preview's warning ALWAYS reports whether frequency
needs a DFS Channel Availability Check under this interface's
CURRENT frequency-mode (superchannel: none, instant; otherwise
~60s in the general DFS range 5250-5725MHz, ~600s in the
5600-5650MHz weather-radar sub-band - verified against real
hardware). See docs/api-notes-wireless-rf.md.
WRITE tool, guarded: blocked entirely unless the server is running
with MIKROTIK_ALLOW_WRITE=true. Call with confirm=False (the
default) to get a before/after preview (including the DFS warning,
without arming anything) without changing anything; call again with
confirm=True to actually apply it. Errors if interface_name
doesn't exist on /interface/wireless - never creates one. This
targets /interface/wireless only - see guard.py's module note for
why ROS7's newer /interface/wifi package is out of scope this
round.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | ||
| frequency | Yes | ||
| arm_deadman | No | ||
| device_name | Yes | ||
| channel_width | No | ||
| interface_name | Yes | ||
| deadman_minutes | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||