Exemple #1
0
 def send_data(self, characteristic_uuid, data):
     print("BLECLI >> Write following data to characteristic with UUID '" +
           characteristic_uuid + "' :")
     print("\t>> " + utils.str_to_hexstr(data))
     print("BLECLI >> Enter data read from characteristic (in hex) :")
     resp = input("\t<< ")
     return utils.hexstr_to_str(resp)
Exemple #2
0
 def send_data(self, path, data, session_id = 0):
     print("Client->Device msg :", path, session_id, utils.str_to_hexstr(data))
     try:
         resp = input("Enter device->client msg : ")
     except Exception as err:
         print("error:", err)
         return None
     return utils.hexstr_to_str(resp)
Exemple #3
0
 def send_data(self, characteristic_uuid, data):
     print("BLECLI >> Write following data to characteristic with UUID '" + characteristic_uuid + "' :")
     print("\t>> " + utils.str_to_hexstr(data))
     print("BLECLI >> Enter data read from characteristic (in hex) :")
     resp = input("\t<< ")
     return utils.hexstr_to_str(resp)