I found some more time to dig into this and I believe I've now done enough legwork to confirm that this is a legitimate bug in merlin. I installed the latest stock Asus firmware on my router from
here and confirmed that WPS is indeed working. I then upgraded to the latest merlin firmware and found that WPS is not working.
Based on my experiments, the WPS process can be triggered via the command line by running
service wps_start_method
. On firmware revisions where WPS works, this command then sets the
wps_proc_status
and
wps_proc_status_x
variables in nvram to 1 and kicks-off the WPS connection process. On the latest Merlin firmware
wps_proc_status_x
and
wps_proc_status
remain 0 after invoking
service wps_start_method
.
Code:
admin@RT-AC86U-7028:/var/run# service start_wps_method
Done.
admin@RT-AC86U-7028:/var/run# nvram show | grep wps_pro
wps_proc_status=0
wps_proc_status_x=0
I took a look at the source code on github to try to track down the bug. I believe
start_wps_method
is defined in wps-broadcom.c
here. There is a section which stubs out these methods if the RTCONFIG_WPS macro is not defined
here. However, it looks like the macro is set to "y" during compilation in config_base
here so I don't think that's what's going on.
I tried to read through the function to see if there might be a lower-level call to trigger WPS that I could run manually (to verify that the bug is in fact in the start_wps_method function and not in lower level code) but couldn't find one. Based on my understanding, the code that actually does the work is in set_wps_env which is called by start_wps_method
here. It looks like set_wps_env opens a socket and sends the wps command to it which seems a little difficult to do on the command line.
At this point, it would probably be more productive to have someone familiar with the codebase investigate. It looks like issues are disabled on the github repo so I'm not sure where to file a bug. I'll add another comment on the main release thread in addition to this comment here. Hopefully, one of them will garner enough attention to get this looked at.