-
Notifications
You must be signed in to change notification settings - Fork 350
Description
Feature request: Extend hotspot-to-WPA script to support VLAN-specific WiFi passphrase sync (ROS v7.17+)
Background
Hi there,
I would like to extend the existing hotspot-to-WPA script to also synchronize clients connected via the new VLAN-specific WiFi passphrase feature introduced in RouterOS v7.17 with the Hotspot-to-WPA-added MAC address list.
The background is that I have a mixed environment using VLANs with both 802.11ac and 802.11ax devices.
Upgrading 802.11ac devices to wifiwave2 removes the option to assign VLANs via the access list, so I will have a mixed setup.
- old CAPsMAN for ac devices with VLAN support via an access list.
- new CAPsMAN for ax devices to enable the use of the PPSK feature.
(I cannot use old CAPsMAN for ax devcices, see 1 and 2)
Proposal
Enhance the hotspot-to-WPA script to:
-
Synchronize MAC addresses of clients connected via the new VLAN-specific WiFi passphrase (introduced in ROS v7.17) with the Hotspot-to-WPA MAC address list.
-
Upon WiFi join on AX devices, add the client’s MAC to the access list as if it had joined via Hotspot.
- Enables easier onboarding in mixed AC/AX setups.
- Allows headless devices to connect without manual access list entries.
-
Periodically scan CAPsMAN client list for devices without a DHCP lease (i.e., static IPs) and:
- Add them to the access list.
- Generate a log entry for tracking.
This is properly covered by routeros-scripts/doc/collect-wireless-mac.md at main · eworm-de/routeros-scripts
-
add the option to add hostname to the access list as that can help to troubleshoot hosts
Workflow
To implement this, I plan to create several PRs:
- Documentation update – Wxtend the existing documentation to clearly describe the current functionality (to enable occasional developers to get started more quickly) and explain the new features.
- Script preparation – Add comments and placeholders in the current script to outline where and how the new code will be integrated.
- Feature implementation – Write the new code to synchronize VLAN-specific WiFi passphrase clients with the Hotspot-to-WPA MAC list.
- Static IP detection module – Implement periodic CAPsMAN client list scans for devices without DHCP leases (static IPs) and add them to the access list with logging (some IoT devices could be setup with a Static IP).
This is properly covered by routeros-scripts/doc/collect-wireless-mac.md at main · eworm-de/routeros-scripts - maybe these functions to routeros-scripts/global-functions.rsc at main · eworm-de/routeros-scripts:
Scripts to be touched
- routeros-scripts/global-functions.rsc at main · eworm-de/routeros-scripts
- routeros-scripts/hotspot-to-wpa.template.rsc at main · eworm-de/routeros-scripts
- routeros-scripts/hotspot-to-wpa-cleanup.template.rsc at main · eworm-de/routeros-scripts
- maybe adapt routeros-scripts/dhcp-lease-comment.template.rsc at main · eworm-de/routeros-scripts to spare hostname in the comment field in case of point 4 in the proposal above.
Footnotes
-
cap ax with old capsman on wi-fi ac - RouterOS / Beginner Basics - MikroTik community forum ↩
-
cap ax with old capsman on wi-fi ac - RouterOS / Beginner Basics - MikroTik community forum ↩
-
Searching for words in an array. - RouterOS / Scripting - MikroTik community forum ↩
-
"Find" command - RouterOS / General - MikroTik community forum ↩