将SSL证书导入SIM800C

时间:2019-03-27 12:09:56

标签: ssl gsm at-command sim800

我想使用At Command在SIM800c调制解调器中上传SSL证书,并遵循与文档中所述相同的过程。但是我每次都失败了。 AT命令的过程如下:

AT+FSCREATE=C:\IOTHUB.crt<CR><LF>

OK<CR><LF>

AT+FSWRITE=C:\IOTHUB.crt,0,1188,10<CR><LF>

>
MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYDVQQGEwJJRTESMBAGA1UEChMJQmFsdGltb3JlMRMwEQYDVQQLEwpDeWJlclRydXN0MSIwIAYDVQQDExlCYWx0aW1vcmUgQ3liZXJUcnVzdCBSb290MB4XDTAwMDUxMjE4NDYwMFoXDTI1MDUxMjIzNTkwMFowWjELMAkGA1UEBhMCSUUxEjAQBgNVBAoTCUJhbHRpbW9yZTETMBEGA1UECxMKQ3liZXJUcnVzdDEiMCAGA1UEAxMZQmFsdGltb3JlIEN5YmVyVHJ1c3QgUm9vdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKMEuyKrmD1X6CZymrV51Cni4eiVgLGw41uOKymaZN+hXe2wCQVt2yguzmKiYv60iNoS6zjrIZ3AQSsBUnuId9Mcj8e6uYi1agnnc+gRQKfRzMpijS3ljwumUNKoUMMo6vWrJYeKmpYcqWe4PwzV9/lSEy/CG9VwcPCPwBLKBsua4dnKM3p31vjsufFoREJIE9LAwqSuXmD+tqYF/LTdB1kC1FkYmGP1pWPgkAx9XbIGevOF6uvUA65ehD5f/xXtabz5OTZy
dc93Uk3zyZAsuT3lySNTPx8kmCFcB5kpvcY67Oduhjprl3RjM71oGDHweI12v/yejl0qhqdNkNwnGjkCAwEAAaNFMEMwHQYDVR0OBBYEFOWdWTCCR1jMrPoIVDaGezq1BE3wMBIGA1UdEwEB/wQIMAYBAf8CAQMwDgYDVR0PAQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCFDF2O5G9RaEIFoN27TyclhAO992T9Ldcw46QQF+vaKSm2eT929hkTI7gQCvlYpNRhcL0EYWoSihfVCr3FvDB81ukMJY2GQE/szKN+OMY3EU/t3WgxjkzSswF07r51XgdIGn9w/xZchMB5hbgF/X++ZRGjD8ACtPhSNzkE1akxehi/oCr0Epn3o0WC4zxe9Z2etciefC7IpJ5OCBRLbf1wbWsaY71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9HRCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp

OK<CR><LF>


AT+SSLSETCERT=IOTHUB.crt,"ABC123"<CR><LF>

OK<CR><LF>

+SSLSETCERT: 1<CR><LF>

任何帮助都是有意义的

1 个答案:

答案 0 :(得分:0)

David Betancourtcomment中:使用Quectel的QCom软件上载.crt文件。

下载:linklink

步骤:

  • 启动QCom
  • 选择所需的.pem.crt文件。它的大小将显示在中间文本框中,请在命令后面使用此大小。
  • 现在使用at命令来达到模块要求证书字符串的地步,现在使用“发送文件”。

例如:

# Notice: lines with ":::" are results.

# delete the file (if it exists)
AT+FSDEL=C:\User\my.cer
::: OK
# or if not exist
::: ERROR

# create an empty file
AT+FSCREATE=C:\User\my.cer
::: OK

# open created file to write. you must set "size" properly according to your .crt file. In my case it has 1376 bytes.
###### AT+FSWRITE=<path>,<mode>,<size>,<timeout> ####
AT+FSWRITE=C:\User\my.cer,0,1376,30
::: >
   `at this point click on the "send file" button`
::: OK

# to view the file
AT+FSREAD=C:\User\my.cer,0,1376,0
::: content of the file ....

# set certificate
AT+SSLSETCERT="C:\User\my.cer"
::: +SSLSETCERT: 0

这些步骤之后HTTPS是否正常工作?对于我来说,答案是否定的。 我成功导入了,但是仍然无法与某些网站建立https连接。