How to read ans set GPIO values in GL-AR150?

This is what it looks like:

encoder

Who can give me some directions to get started with software?

The encoder should work the same as a mousewheel. so could i use the HID kernel module to do this?

Or can code be borrowed from there?

 

 

I usually do “try and error” combined with much searching on Google.

Maybe I can get the right parts of you and try whether I can get something to work or not.
Could you contact me on one of the e-mailadresses shown on the contactpage of my website?: The Big Site
The contactform it self is currently broken.

Since we are both Dutch you can write it in Dutch. :wink:

Did a quick Google search. It looks like there are software tools to read out values of a mousewheel. The downside is that this tools only works within X sessions. Since the GL-AR150 is only a router and not a desktop computer with X session desktop these tools won’t work. But maybe there is an other way to make use of the rotary encoder.

Hey Jeroen,

Je hebt mail, het info account.

:slight_smile:

I recieved your e-mail frietpan. Thank you! I wrote a reply back.

With a little luck you’ll find a envalope with a few goodies in the mailbox on saturday.

In addition to my step by step instructions above in this post: 404 Page not found - GL.iNet

When you have upgrade your firmware from 2.12 to 2.13 you’ll need to install libusb-compat for compatibility for the libusb version the blink1-tool requires.

You can install libusb-compat in the following ways:

  • From the console / SSH session: opkg install libusb-compat
  • From LuCI: Go to Menu > System > Software. Fill in "libusb-compat" at the field "Download and install package:" and click on "OK".
  • From GLi webinterface: Go to "App repo" pane. Fill in "libusb-compat" at the search field and click on "Search". Click on "install " in front of "libusb-compat".
Edit: I did make a bullet list, but I do miss the bullets...

the bullets doesn’t work because of the css.

Maybe I need to change the forum from bbpress to phpbb

Hi Guys,

I just bought myself an MR300N today which I’m looking forward to receiving. in preparation I decided to read this forum and I’m in the middle of building myself an OpenWrt firmware from here.

Anyway, I rememebred reading your discussion on the Rotary encoder, and then, while configuring the build I noticed this in the build config, see my attached image. I wonder if this is useful to you?

It’s a kernel module for a GPIO based rotary encoder :smiley:

The Rotary Encoder project is being discussed in this thread: 404 Page not found - GL.iNet

We already did know it is possible to compile the firmware with the needed drivers, but we can’t find any documentation on how to make use of it.

Thanks for the link. I’ll have a read through the module code when I get a chance and see if I can help. I already compiled the firmware myself with modules yesterday but I only ordered my device yesterday so I can’t test anything until it arrives.

If you can give me the model of your rotary encoder I’ll order the same one.

I don’t have much knowledge about components. Mine came from the user “frietpan”. I think it’s best to repeat your question within the right thread. I will message him through an alternate way to inform him about this.

Because this topic comes up on the first page when you Google read button state openwrt, I’ll post the solution here.

You can read the state in the debug information @ /sys/kernel/debug/gpio. hi is state 1, lo is state 2.

GPIO number can be found at the device specific page, for example GL-AR150 Series - GL.iNet Docs