Я пытаюсь подключить устройство к IBM Bluemix с безопасностью TLS1.2 с оборудованием Quectel M95 GPRS.
Может ли кто-нибудь помочь, почему я не могу открыть SSL-соединение. Я получаю ответ на команду QSSLOPEN как «-1».
Последовательность запуска команды следующая:
{ "ate0", "OK", 20, 2500, 0 },
{ "at+cpin=?", "OK", 6, 6000, 0 },
{ "at+qinistat", "+QINISTAT: 3", 25, 350, 0 },
{ "at+creg?", "+CREG:", SIM_MAX_REG, 350, 0 },
{ "at+clip=1","OK",5,350, 0 },
{ "at+qaudch=2", "OK", 5, 350, 0 },
{ "at+clvl=50", "OK", 5, 350, 0 },
{ "at+qmic=0,14", "OK", 5, 350, 0 },
{ "ats0=0", "OK", 5, 350, 0 },
{ "at+qspn?", "+QSPN:", 3, 350, 0 },
{ "at+cmgf=1", "OK", 5, 350, 0 },
{ "at+cscs=\"ira\"", "OK", 5, 350, 0 },
{ "at+csmp=49,167,0,241", "OK", 5, 350, 0 },
{ "at+cnmi=2,1,0,1,0", "OK", 5, 350, 0 },
{ "at+qifgcnt=0", "OK", 5, 350, 0 },
{ "at+qimux=1", "OK", 5, 350, 0 },
{ "at+qidnsip=", "OK", 5, 350, 5 },
{ "at+qicsgp=1,", "OK", 5, 350, 2 },
{ "at+qimode=0", "OK", 5, 350, 0 },
{ "at+cgreg?", "+CGREG:", GPRS_MAX_REG, 350, 0 },
{ "at+qiregapp", "OK", 5, 350, 0 },
{ "at+qiact", "OK", 15, 2000, 0 },
{ "at+qindi=1", "OK", 5, 350, 0 }, handle
{ "at+qisde=0", "OK", 5, 350, 0 }, //21 Control
{ "AT+QSSLCFG=\"ignorertctime\",1","OK",5,350, 0 }, //22
{ "AT+QSSLCFG=\"sslversion\",0,4","OK",5,350, 0 }, //22
{ "AT+QSSLCFG=\"ciphersuite\",0,\"0X009C,0X009D\"","OK",5,350, 0 }, //23
{ "AT+QSSLCFG=\"seclevel\",0,1","OK",5,350, 0 }, //24
{ "AT+QSSLCFG=\"seclevel\",0,2","OK",5,350, 0 }, //24
{ "AT+QSSLCFG=\"ctxindex\",0","OK",5,350, 0 }, //24
{ "AT+QSSLCFG=\"cacert\",0,\"RAM:cacert.pem\"","OK",5,350, 0 }, //25
{ "AT+QSSLCFG=\"clientcert\",0,\"RAM:client.pem\"","OK",5,350, 0 }, //26
{ "AT+QSSLCFG=\"clientkey\",0,\"RAM:userkey.pem\"","OK",5,350, 0 }, //26
{ "at+qsslopen=0,0,","+QSSLOPEN:",5, 35000, 3 }, //28 Start
{ "at+qiopen=1,\"tcp\",","CONNECT",3, 1000, 4 }, //29 Start
{ "at+qsslstate", "+QSSLSTATE:", 10, 2500, 0 }, //30
{ "at+qsslsend", ">", 3, 1000, 1 }, //31 Send
{ "at+qisend", ">", 3, 1000, 1 }, //25 Send d
{ "at+qsslrecv=0,0,512", "+QSSLRECV:", 2, 750, 0 }, //32 Read
{ "at+qird=0,1,1,512", "+QIRD:", 2, 750, 0 }, //33 Read
{ "at+qiopen=0,\"tcp\",","CONNECT",5, 5000, 3 }, //22 Start
{ "at+qiopen=1,\"tcp\",","CONNECT",3, 5000, 4 }, //23 Start
{ "at+qistate", "STATE:", 10, 2500, 0 }, //24
{ "at+qisend", ">", 3, 1000, 1 }, //25 Send
{ "at+qisend", ">", 3, 1000, 1 }, //25 Send
{ "at+qird=0,1,0,512", "+QIRD:", 2, 750, 0 }, //26 Read
{ "at+qird=0,1,1,512", "+QIRD:", 2, 750, 0 }, //27 Read
{ "at+qisack","+QISACK",2,1000, 0 }, //34
{ "at+qsslclose=0","CLOSE",8,350, 0 }, //35 Close
{ "at+qiclose=0","CLOSE",8,350, 0 }, //29 Close
{ "at+qiclose=1","CLOSE",8,350, 0 }, //36 Close
{ "at+qccid"," ",5,350, 0 }, //37 Show
{ "at+cnum","+CNUM:",3,350, 0 }, //38
{ "at+qilocip"," ",5,350, 0 }, //39 Get
{ "ata", "OK", 5, 350, 0 }, //40 Answer
{ "ath", "OK", 3, 350, 0 }, //41
{ "atd", "OK", 5, 350, 0 }, //42
{ "at+qcellloc=1", "+QCELLLOC", 3, 2000, 0 }, //43
{ "at+qhttpurl=","CONNECT",10, 500, 0 }, //44 Set
{ "http:// ","OK",6, 500, 0 }, //45 Set
{ "at+qhttpget=60","OK",3, 61000, 0 }, //46 HTTP
{ "at+qhttpread=60","CONNECT",3, 61000, 0 }, //47 Read
{ "at+ctzu=3","OK",3,350, 0 }, //48 Network
{ "at+qnitz=1","OK",3,350, 0 }, //49 Network
{ "at+cclk?","+CCLK:",3,350, 0 }, //50 Clock
{ "at+qmgda=\"del all\"","OK",4,750, 0 }, //51 Delete
{ "at+csq","CSQ:",3,350, 0 }, //52 Read
{ "at+gsn"," ",3,350, 0 }, //53 Read
{ "at+qpowd=0","OK",3,350, 0 }, //54 Power
{ "at+cfun=4","OK",5,350, 0 }, //55 Power
/********** SSL Connection *********/
{ "at+qsslrecv=","+QSSLRECV:",5,350, 0 }, //56 AT+QSSLRECV Retrieve
{ "at+qsslstate","+QSSLSTATE:",5,350, 0 }, //57 AT+QSSLSTATE Query
{ "at+qsecwrite=","CONNECT",3,500, 0 }, //58 AT+QSECWRITE Add a
{ "at+qsecread=","+QSECREAD:",3,500, 0 }, //59 AT+QSECREAD Query
{ "at+qsecdel=","OK",5,350, 0 }, //60 AT+QSECDEL Delete a
Я запускаю команды с помощью Enums для каждой команды и пытаюсь запустить команды в двух режимах:
Я указал идентификатор организации, имя пользователя для аутентификации и пароль для аутентификации в коде.
Пожалуйста, помогите мне в этом вопросе ...
Кроме того, если вы можете предложить мне хорошую практическую книгу, объясняющую концепции кодирования с примерами программирования IoT, будет большим подспорьем.
Проблема решена. Последовательность запуска была правильной, и я успешно подключился к IBM Bluemix с помощью TLS1.2 Security.