Greetings!
we just bought a new LTE modem that needs activation after each plugging in via special software.
so, pseudo-LTE interface is unable to work in mikrotik properly by itself.
after some googling I found a way to bipass usage of ‘special software’ - just sending POST request to modem from any device that is able to reach this modem.
so it works well on my laptop connected to mikrotik by python/Jupiter:
import requests
URL='> http://192.168.0.1/goform/goform_set_cmd_process> ’
HEADERS={‘Host’: ‘192.168.0.1’, ‘Accept’: ‘/’, ‘Referer’: '> http://192.168.0.1/goform/goform_set_cmd_process> '}
PARAMS={‘goformId’: ‘CONNECT_NETWORK’}
r = requests.post(url = URL, headers = HEADERS, data = PARAMS)
print(r.text)
but this should be automated for field-using.
I tried but did’t succeed to write different variations of fetch command, like this one:
/tool fetch mode=http url=“> http://192.168.0.1/goform/goform_set_cmd_process> " http-method=post http-header-field=Host:192.168.0.1,Accept:/,Referer:> http://192.168.0.1/goform/goform_set_cmd_process > http-data=”{‘goformId’: ‘CONNECT_NETWORK’}"
may you please help to find out what’s wrong with that? (and to create a script that runs this code after starting interface lte1 ^_^’ )
thank you in advance.