Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Socket response Halogram over CAT-M1

    Scheduled Pinned Locked Moved FiPy
    2 Posts 2 Posters 164 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • securigyS Offline
      securigy
      last edited by securigy

      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 ?

      1 Reply Last reply Reply Quote 0
      • A Offline
        andyh13
        last edited by

        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.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • 1 / 1
        • First post
          Last post

        Pycom on Twitter

        Pycom