Error when opening a connection

2 posts / 0 new
Last post
kobe
Error when opening a connection

Hello,

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.

I had a look in the source code and it seems to be a problem in the code sheet GXSMS.cs, in the open method the program sends the AT command "AT+CPIN?\r" at line 1196. Then the modem replys with "+CPIN: READY", the code also waits to get this command but there is a problem there. The SendCommand method seems unable to give this as a reply, because there is no OK in this reply.

Is my modem not following an agreement, that states an OK is needed?
Is this maybe a bug in the code?
This seems critical to me, do other modems give a different reply?

Can someone have a look at this?
At the moment I have changed the code so the READY command is accepted without OK.

Kind regards.

kurumi
kurumi's picture
Error when opening a connection

Hi,

We tested this with few modems. All are returning OK at the end:
AT+CPIN?
+CPIN: READY
OK

Are you receiving \r\n after READY?
BR,

Mikko

________________________________________
Mikko Kurunsaari
Gurux Ltd
Hermiankatu 6-8 H 33720 TAMPERE, FINLAND
Phone: +358 3 265 1244
Home page: http://www.gurux.org