TCP socket closed after 5 seconds


#1

Hi,

I’m trying to send a TCP message to my device’s Hologram Dashboard using raw AT commands.
I’m able to connect to a network, set up the APN and open the socket, but after a few seconds, my connection closes automatically with the following command +QIURC: “closed”,0.

Attached is my serial port terminal messages where you can see that when I’m about to add the AT+QISEND=0,0 command the connection suddenly closes.

 
RDY 

AT+CPIN? 

+CPIN: READY 

OK 

AT+COPS=? 

+COPS: (1,"vodafone P","voda P","26801",0),(2,"NOS","NOS","26803",0),(1,"MEO","MEO","26806",0),,(0,1,2,3,4),(0,1,2) 

OK 

AT+COPS=1,2,"26801",0 

OK 

AT+COPS? 

+COPS: 1,2,"26801",0 

OK 

AT+QICSGP=1,1,"hologram","","",1 

OK 

AT+QIACT=1 

OK 

AT+QIOPEN=1,0,"TCP","cloudsocket.hologram.io",9999,0,1 

OK 

+QIOPEN: 0,0

AT+QISEND=0,50

> {"k":"my_device_key","d":"Hello,World!","t":"TOPIC1”}

SEND OK

+QIURC: "recv",0,2

50

+QIURC: "closed",0

AT+QISEND=0,0

+QISEND: 50,50,0

OK

It seems like I just have a few seconds available of open socket to write down and send the proper message.

I don’t know if this is part of the Hologram’s bandwidth agreement with the Portuguese networks or a command that I’m missing here to increase the socket timeout.

Also, the messages on my dashboard are being charged, but I see no message history on my console. Right now I have a traffic of 9.48Kb but no message report on my console.


#2

Currently our cloud servers have a 10 second time out. Usually a program sending data to the cloud would generate the message before opening the socket or be able to do it very quickly so it’s not an issue.
Since you’re doing this by hand, just generate the command in a text editor and paste into your terminal when you’re ready