GL.iNet API - Problems


there is a neat REST api for querying and controlling the routers settings described at GL.iNet API.

And indeed - e.g. get token, get client list, get wireless AP information work like a charme. Great!

But radio/txpower/set fails - {“msg”:“iw failed”,“code”:-99}. Obviously /www/api uses “iw” - but there is no iw in the default installation. And you can’t install it, cause there is no package for it in the repositories.

Btw there are TWO api binaries, one in /www, one in /www/cgi-bin. And you can use both. They differ in size.

Any idea aside of “iw missing” why radio/txpower/set fails?

Thanks - gcl

what parameters did you send?

I checked the browser and it sent the following data.


I don’t think it need iw command.