I'm sorry for the late response....
I had everything working - but then my computer stop working
and all my files + explaining + my own code gone
(I didn't have any backup - I'm an IDIOT!)
I just need a reminder about setting new value
I'm still using the basic API in C# (I just needed it to work and after it I will try the tik4net library)
I got stuck here :
private void SendNewSetting_Click(object sender, EventArgs e)
{
// find out the .id of the SIM interface
mikrotik.Send("/interface/ppp-client/print");
mikrotik.Send("?name=" + SIM);
mikrotik.Send("=.proplist=.id", true);
string temp = mikrotik.Read()[0];
temp = temp.Substring(8);
textBox2.ForeColor = System.Drawing.Color.Black;
textBox2.Text = (temp);
mikrotik.Send("/interface/ppp-client/set");
mikrotik.Send("=.id=" + temp);
mikrotik.Send("=user=" + NewUser);
mikrotik.Send("=password=" + NewPassword);
mikrotik.Send("=apn=" +NewApn , true );
foreach (string h in mikrotik.Read())
{
// textBox2.Text = ("1" + h);
}
}
when I print I can see the id = *7
but he doesn't change me the value
why?
I don't remember what I have done last time...
and when I do this in Console , it's working
Console.WriteLine("Enter SIM number - ");
string SIM = Console.ReadLine();
Console.WriteLine("Enter new APN - ");
string NewApn = Console.ReadLine();
mikrotik.Send("/interface/ppp-client/print");
mikrotik.Send("?name=" + SIM);
mikrotik.Send("=.proplist=.id", true);
string temp = mikrotik.Read()[0];
temp = temp.Substring(8);
mikrotik.Send("/interface/ppp-client/set");
mikrotik.Send("=.id=" + temp);
mikrotik.Send("=apn=" + NewApn, true);
foreach (string h in mikrotik.Read())
{
// Console.WriteLine(h);
}
Thanks ,