Community discussions

MikroTik App
 
cyb2
just joined
Topic Author
Posts: 21
Joined: Tue Mar 14, 2023 6:25 pm

Remote controlling SwOS Lite

Tue May 28, 2024 9:23 am

Hi,

I want to remote control a CSS610-8P-2S+ with SwOS Lite. I would like to change the PoE Out to "on" or "off" to be able to remotely enable/disable WiFi access points.

Is there any way to do this?

Best regards,
cyb
 
cyb2
just joined
Topic Author
Posts: 21
Joined: Tue Mar 14, 2023 6:25 pm

Re: Remote controlling SwOS Lite

Tue May 28, 2024 3:36 pm

I found out that I can grab the current PoE-states with curl:
curl --digest -u admin:pass -v http://192.168.1.1/poe.b
This gives me a resultset of some hex values:
{i01:[0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x02,0x02],
 i02:[0x03,0x02,0x05,0x04,0x01,0x00,0x06,0x07,0x00,0x01],
 i03:[0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00],
 i04:[0x03,0x03,0x03,0x03,0x03,0x03,0x01,0x01,0x00,0x00],
 i05:[0x0060,0x006c,0x0064,0x0071,0x0038,0x003c,0x0000,0x0000,0x0000,0x0000],
 i06:[0x0214,0x0214,0x0214,0x0215,0x0215,0x0214,0x0000,0x0000,0x0000,0x0000],
 i07:[0x002f,0x0035,0x0035,0x003a,0x001a,0x001f,0x0000,0x0000,0x0000,0x0000],
 i08:0x8902,
 i09:'5953514d334b3130414548'}
After adjusting the PoE-state of some ports I think that the array of values i01 contains the PoE-states, 0x00 means off, 0x01 means on, 0x02 means auto.

I can also grab those values with a PowerShell Invoke-WebRequest or with a python request.

Does anybody know how to post values into the switch?

Do you think it is possible to post only single values (switch on poe for one or two ports) or has the complete array to be posted?

Best regards,
cyb
 
cyb2
just joined
Topic Author
Posts: 21
Joined: Tue Mar 14, 2023 6:25 pm

Re: Remote controlling SwOS Lite

Tue May 28, 2024 4:06 pm

I am already able to configure the PoE-state (of all ports) with curl, which is great:
curl --digest -u admin:pass -d "{i01:[0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x02,0x02]}" -H "Content-Type: application/x-javascript" -X POST http://192.168.1.1/poe.b
So I just need do adjust this for PowerShell or python and I am done.

Maybe someone else with the same requirements finds this post and does not need to do the reverse engineering again...
 
dksoft
Member Candidate
Member Candidate
Posts: 165
Joined: Thu Dec 06, 2012 8:56 am
Location: Germany

Re: Remote controlling SwOS Lite

Mon Jun 09, 2025 1:28 pm

Maybe someone else with the same requirements finds this post and does not need to do the reverse engineering again...
Thanks for you information. That was very helpfull for me.