Execute Gurux.SMS.Read() generate System.ArgumentOutOfRangeException
Reasons:
1) incorrect calculation of length Service Center number
int sz = 2 * ServCenterlen - 1;
correct: int sz = 2 * (ServCenterlen - 1);
2) message type is not taken into account when parsing
fix code:
public static void Encode(string data, GXSMSMessage msg)
{
if (data.Length < 1)
{
throw new ArgumentOutOfRangeException("Invalid data.");
}
Today I tried to find some code to control a sms modem of schneider electric, with at commands and c#. i tried to use this library but everytime I open the connection, the error "Pin is needed" is shown.