Hello,
I am using a easy command aplication based on code from manual in C and i have a problem.
It is that some commands are OK and some freeze a program. I dont know the reason why but in my oppinion there is a problem that something in code when im sending a command has a prefix 0x00 so as I read in manual router ignoring it and program lag because he is waiting for reply. But I am not so good in C.
And another thing: could someone tell me what i need to send to router for maybe add a address for ether1?
Thx much.
Don’t forget to attach a zero at the end of the last line of the command also. It will not respond if you don’t. In C, it should be easy, since it uses zero terminated strings. Send (length of the last line + 1) characters. Using mrz’s example:
send(“/ip/address/add”); (no zero added here)
send(“=address=1.1.1.1/24”); (no zero added here)
send(“=interface=ether1” + chr(0)); (add zero here)