Check if scanning is actually active by checking bluetoothctl status Returns: True if scanning, False if not scanning, None if unable to determine
(self)
| 187 | return status |
| 188 | |
| 189 | def _check_scan_status(self) -> Optional[bool]: |
| 190 | """ |
| 191 | Check if scanning is actually active by checking bluetoothctl status |
| 192 | Returns: True if scanning, False if not scanning, None if unable to determine |
| 193 | """ |
| 194 | try: |
| 195 | result = subprocess.run(['bluetoothctl', 'show'], |
| 196 | capture_output=True, text=True, timeout=5) |
| 197 | if result.returncode == 0: |
| 198 | output = result.stdout.lower() |
| 199 | if 'discovering: yes' in output: |
| 200 | return True |
| 201 | elif 'discovering: no' in output: |
| 202 | return False |
| 203 | except Exception: |
| 204 | pass |
| 205 | return None |
| 206 | |
| 207 | def power_on(self) -> Tuple[bool, str]: |
| 208 | """ |
no test coverage detected