-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Netgear EX6100v2 #24
Comments
Thanks for opening this - can you paste the content of /sys/kernel/debug/gpio with the switch in each position? Also what version of OpenWrt are you using? |
Using OpenWRT snapshot
This is a two position switch. The up position is marked "extender" on the case silk screen and sets the device in extender mode under the stock firmware. Here is the info with the switch in the up position with gpio58 pulled high.
The down position is marked "access point" on the case silk screen and sets the device in access point mode under the stock firmware. Here is the info with the switch in the down position with gpio58 pulled low.
GPIO52 changes constantly because it's assigned to the wifi radio. It has no bearing on the switch which only changes GPIO58 from what I can tell by running This script predicts the correct physical switch position 100% of the time:
I have built a custom image where I modified https://github.com/openwrt/openwrt/blob/main/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi to add these lines under keys:
but this made no difference. Hope that info helps. |
Any pointers you could provide on how to add this code to the snapshot would be helpful. |
The second gpio table (produced by pinctrl instead of gpiolib), with lines like:
is not something I have encountered before. The script will need to be updated to read this. The difficulty isn't in the actual code change, is it how to change it while maintaining compatibility with other devices. |
I believe updating the devicetree description for the device will be necessary in addition to updating the switch-data.json data file. Can you try:
|
Thank you for the message. I built a new snapshot image and created /etc/slide-switch/slide-data.json containing the code you pasted above. When I run slide-switch this is the error: I then also added the above code to /usr/share/slide-switch/switch-data.json which gets rid of this error however when I attempt to run slide-switch init, this error prints: |
Sorry that should have been /etc/slide-switch/switch-data.json.
Hmm can you post the directory listing of /proc/device-tree/keys (or /sys/firmware/devicetree/base/keys, /proc/device-tree should be a symlink to /sys/firmware/devicetree/base)? Also do the other buttons (wps, reset) work correctly? I suggest temporarily replacing the scripts in /etc/rc.button with ones that log button presses and releases to syslog (see https://openwrt.org/docs/guide-user/hardware/hardware.button for more) for testing. |
/sys/firmware/devicetree/base/keys has the same directory contents. The switch does not seem to show up. Reset and WPS work properly. Here is the log (only pressed WPS for this example but results are same with reset):
|
Not sure why the "switch" key isn't appearing in /proc/device-tree/keys... were there any compile errors when you built the custom image, or any boot errors/warnings? (And just to be sure, you are booting with your custom image?) |
After your post, I began again from scratch using the imagebuilder for SNAPSHOT (r23684-881235c713). The results are the same. Adding just that switch block to the .dtsi file makes no difference. I tried this with the image builder for 22.03.5 stable with the same results. No build errors either time with the updated .dtsi file. The device boots perfectly and is fully functional otherwise. I'm not sure what else would need to be added to the .dtsi file to make the key populate in the OS. |
The Netgear EX6100v2 has a physical switch which controls GPIO pin 58. I'm not sure how to add this as code. Want to contribute any way I can. Here is the configuration:
Switch up
gpio58 : in high
Switch down
gpio58 : in low
The text was updated successfully, but these errors were encountered: