code: def get_octets(self, octets=None, timeout=1.0):
          
          if octets is None:
              # Send NDEF Message with one empty Record.
              octets = b'\xd0\x00\x00'
  
          if not self.socket:
              try:
                  self.connect('urn:nfc:sn:snep')
              except nfc.llcp.ConnectRefused:
                  return None
              else:
                  self.release_connection = True
          else:
              self.release_connection = False
  
          try:
              request = struct.pack('>BBLL', 0x10, 0x01, 4 + len(octets),
                                    self.acceptable_length) + octets
  
              if not send_request(self.socket, request, self.send_miu):
                  return None
  
              response = recv_response(
                  self.socket, self.acceptable_length, timeout)
  
              if response is not None:
                  if response[1] != 0x81:
                      raise SnepError(response[1])
  
                  return response[6:]
  
          finally:
              if self.release_connection:
                  self.close()
docs: Get NDEF message octets from a SNEP Server.
  
          .. versionadded:: 0.13
  
          If the client has not yet a data link connection with a SNEP
          Server, it temporarily connects to the default SNEP Server,
          sends the message octets, disconnects after the server
          response, and returns the received message octets.