I’m trying to get wireless control of the RUT901 router via /wireless/actions/disconnect endpoint and every time i get response similart to this:
{“success”:false,“errors”:[{“source”:“sta_id”,“code”:103,“value”:“wifi1”,“error”:“Interface must be a station”,“section”:“disconnect”}]}
The thing is that i have no idea what to put in the sta_id, i have tried everything from device_ids, ssid, mac, network name, .. and can’t really seem to get it working. I tried searching docs and no mention of it either. Could someone please help me where can i get the sta_id from?
i am able to use the API to scan for networks and connect to a network as well. Bu the /wireless/actions/disconnect endpoint requires following in the request
{
“data”: {
“sta_id”: “string”
}
}
and I can’t figure out where to get the sta_id from. I can’t find it anywhre in the docs.
sta_id means wireless interface id that has “mode” set as “sta” (Client). Also you probably want to disable “auto_reconnect” to get more control over it before using disconnect/reconnect actions