Socket response Halogram over CAT-M1



  • Does anybody know if there is a response from the socket that was used to send data to Hologram?
    That is, if I do the following, should I expect any response in result = lteSocket.recv(1024)
    The reason I am asking is that the code does not run beyond this point as it waits for response and I wonder if I should expect any response at all... Interestingly enough this code worked with another (environmental) sensor...

                message = ECG.GetData()
                print("message: {} json string: {}".format(idx+1, message))
    
                data = '{"k": "%s", "d": "%s", "t": "%s"}' % (DEVICE_KEY, message, TOPIC)
                print("data: {}".format(data))
                lteSocket.send(bytes(data, 'ascii'))
                print("==== LTE Socket data sent")
                utime.sleep(1)
    
                try:
                    print('Reading response from socket...')
                    result = lteSocket.recv(1024) #.decode()
                if (len(result) == 0):
                    print("==== LTE Socket: Received no response...")
                else:
                    print("==== LTE Socket: Recieved result: {}".format(result))
    

    EDIT:
    From this example in documentation:
    https://docs.pycom.io/tutorials/lte/cat-m1/

    I read that:
    When using the expansion board and the FiPy together, the RTS/CTS jumpers MUST be removed as those pins are being used by the LTE radio. Keeping those jumpers in place will lead to erratic operation and higher current consumption specially while in deepsleep.

    So is anybody can point out what and where do I need to remove on Expansion Board 3.1 ?



  • I'm no expert, and I don't have the expansion board, but assuming you don't have to cut anything and it's not permanent, I would remove the UART_RX and UART_TX jumpers in this diagram

    I'm not sure we can answer whether you should be getting a response. If you are sending an HTTP request, you would expect a response. A robust program would probably account for the possibility of not receiving one (say, for instance, that you lose cell signal?). But without seeing more about lteSocket, it looks like a typical socket that's presumably either UDP or TCP. In that case, I'm not aware of any reason you'd expect a response. It depends on whether someone sends something to you.


Log in to reply
 

Pycom on Twitter