This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC3100 TCP connection request error

Other Parts Discussed in Thread: CC3100

My project requires that I write a from-scratch driver for the CC3100. I'm using the CC3100 Booster Pack and directly communicating over SPI to an 8-bit MCU. When my driver attempts to establish a TCP connection using a SOCK_STREAM socket, an error of -145 (SL_ESEC_ASN_TAG_NULL_E) is returned. The relevant message sequence is as follows.

All message byte values are in HEX:

Connect TCP port 80 to openweathermap.org
-----------------------------------------
06 94         SL_OPCODE_SOCKET_CONNECT
0C 00         message length
00 00         padding
10            socket number
20            family and flags
00 50         port 80, high byte first.
CC CC         padding
90 4C 66 A6   IPv4 address


After about a 10-second delay, the following is returned:
---------------------------------------------------------
06 10         SL_OPCODE_SOCKET_CONNECTASYNCRESPONSE
08 00         message length
17 01 01 00   flow control
91 FF         status 0xFF91 = -145
10            socket
00            padding

-145 is defined in socket.h as SL_ESEC_ASN_TAG_NULL_E, "ASN tag error, not null". Its name and description suggest an ASN.1 error. That specification is closely associated with the use of public keys. In the CC3100 circumstance, this would have to be either SSL or TLS.

However, the socket was established with (SL_SOCK_STREAM, SL_IPPROTO_TCP) arguments, vs. (SL_SOCK_STREAM, SL_SEC_SOCKET). Further, a socket request using the latter arguments returns 80 as the socket identifier.

What causes this CC3100 behavior?
Where is this behavior documented?