News:

PROTON pic BASIC Compilers for PIC, PIC24, dsPIC33

Main Menu

Sending a At Command String Issue via Uart?

Started by Craig, Today at 04:02 PM

Previous topic - Next topic

Craig

Hi I am having an issue with sending a AT+ Command string to an Air780EU 4G Lte modem.
If I test the modem using Uart on Docklight (Terminal Program) it works fine AT+SSLCFG="cacert",88,"isrgrootx1.pem"<CR><LF>, I will get back an OK acknowledgement I can connect to the server and send and receive everything works as expected.

I am using a Pic18F27Q10 or 18F47Q10 @ 64Mhz I get the same results with both 
Declare Hserial2_Baud = 115200
Declare HRSOut2_Pin = PORTB.6                ' TX2 to the PC To Read Serial Data
Declare HRSIn2_Pin = PORTB.7                   ' RX2 to the PC To Read Serial Data
Declare HSerial2_Terminator = CRLF           ' The parameter CR will transmit a single value of 13 and 10 at the end of transmission
Declare Hserial2_Clear = On                       ' Clear the buffer before receiving


HSerOut2 ["At+CREG?",13,10]                  ' Send AT Command         
HRSIn2 {1000, Paint}, Wait("+CREG:"), GsmMsg[0], GsmMsg[1], GsmMsg[2], GsmMsg[4], GsmMsg[5], GsmMsg[6], GsmMsg[7], GsmMsg[8], GsmMsg[9], GsmMsg[10] 
Print At 0,40,"+CREG:",GsmMsg[1],GsmMsg[2],GsmMsg[4]


I will get the correct command back +CREG:0,1 OK

So the modem is responding correctly but, If I try and send the following it does Not Acknowledge it.

HSerOut2 ["At+SSLCFG=",34,"cacert",34,88,34,"isrgrootx1.pem",34,13,10]     ' 34 = ", 13 = CR, 10 = LF
HRSIn2 {2000, Paint}, Wait("OK"), Temp1
Print At 0,40, Dec Temp1," "                 


I also tried: HRSOut2Ln "At+SSLCFG=",34,"cacert",34,88,34,"isrgrootx1.pem",34

Still No response does the same as above.

I don't know what else to try, any help is much appreciated!

Regards
Craig



   

trastikata

You are missing the comma separator in your AT string:

AT+SSLCFG="sslversion",<n>[,<sslversion>]

trastikata

HSerOut2 ["At+SSLCFG=",34,"cacert",34,44,88,44,34,"isrgrootx1.pem",34,13,10]