diff --git a/src/explorepy/serial_client.py b/src/explorepy/serial_client.py index a565c502..741f4f10 100644 --- a/src/explorepy/serial_client.py +++ b/src/explorepy/serial_client.py @@ -1,7 +1,6 @@ # -*- coding: utf-8 -*- """A module for bluetooth connection""" import logging -import struct import threading import time from collections import deque @@ -13,10 +12,7 @@ exploresdk, settings_manager ) -from explorepy._exceptions import ( - DeviceNotFoundError, - UnsupportedBtHardwareError -) +from explorepy._exceptions import DeviceNotFoundError logger = logging.getLogger(__name__) @@ -122,26 +118,6 @@ def _check_mac_address(device_name, mac_address): return (device_name[-4:-2] == mac_address[-5:-3]) and (device_name[-2:] == mac_address[-2:]) -def get_device_name(p): - """ Gets name of the Explore device - Args: - p (port instance): number of bytes to be read - """ - serial_port = serial.Serial(port=p.device, baudrate=115200, timeout=2) - get_name_cmd = b'\xC6' * 14 - serial_port.write(get_name_cmd) - data = serial_port.read(4) # get packet header - if len(data) == 0: - # device does not support name query command, raise Exception - raise UnsupportedBtHardwareError - length = struct.unpack('