|
53 | 53 | from cryptography.hazmat.backends import default_backend
|
54 | 54 | from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
55 | 55 |
|
56 |
| -version_tuple = (2024, 3, 0) |
| 56 | +version_tuple = (2024, 4, 0) |
57 | 57 | version = version_string = __version__ = "%d.%d.%d" % version_tuple
|
58 | 58 | __author__ = "rospogrigio, xZetsubou"
|
59 | 59 |
|
@@ -596,12 +596,7 @@ def abort(self):
|
596 | 596 |
|
597 | 597 | async def wait_for(self, seqno, cmd, timeout=5):
|
598 | 598 | """Wait for response to a sequence number to be received and return it."""
|
599 |
| - # This is for >= 3.4 devices [workaround]. |
600 |
| - # if cmd == CONTROL_NEW and self.version >= 3.4: |
601 |
| - # seqno += 2 |
602 | 599 | if seqno in self.listeners:
|
603 |
| - self.error(f"listener exists for {seqno}") |
604 |
| - return |
605 | 600 | raise Exception(f"listener exists for {seqno}")
|
606 | 601 |
|
607 | 602 | self.debug("Command %d waiting for seq. number %d", cmd, seqno)
|
@@ -983,11 +978,7 @@ async def exchange(self, command, dps=None, nodeID=None):
|
983 | 978 | self.debug("3.4 or 3.5 device: negotiating a new session key")
|
984 | 979 | await self._negotiate_session_key()
|
985 | 980 |
|
986 |
| - self.debug( |
987 |
| - "Sending command %s (device type: %s)", |
988 |
| - command, |
989 |
| - self.dev_type, |
990 |
| - ) |
| 981 | + self.debug("Sending command %s (device type: %s)", command, self.dev_type) |
991 | 982 | payload = self._generate_payload(command, dps, nodeId=nodeID)
|
992 | 983 | real_cmd = payload.cmd
|
993 | 984 | dev_type = self.dev_type
|
@@ -1100,8 +1091,6 @@ async def detect_available_dps(self, cid=None):
|
1100 | 1091 | # in the ranges [1-25] and [100-110] need to split the bruteforcing in
|
1101 | 1092 | # different steps due to request payload limitation (max. length = 255)
|
1102 | 1093 |
|
1103 |
| - if not cid: |
1104 |
| - self.dps_cache = {} |
1105 | 1094 | ranges = [(2, 11), (11, 21), (21, 31), (100, 111)]
|
1106 | 1095 |
|
1107 | 1096 | for dps_range in ranges:
|
|
0 commit comments