|
25 | 25 | group_dev = parser.add_argument_group(title="Device control") |
26 | 26 | group_dev.add_argument("-d", "--device", help="target device MAC address. If no address is given the first compatible device found will be used", default=False) |
27 | 27 | group_dev.add_argument('-w', '--wait', help='wait for device to appear', action='store_true') |
28 | | -group_dev.add_argument('-r', '--reconnect', help='wait and reconnect when loosing connection', action='store_true') |
| 28 | +group_dev.add_argument('-r', '--reconnect', help='wait and reconnect after losing connection', action='store_true') |
29 | 29 | group_dev.add_argument("-H", "--hci", help="HCI used for communication. Defaults to hci0", default="hci0") |
30 | 30 | group_dev.add_argument("-T", "--scantime", help="Time in seconds to scan for devices. Defaults to 2 Seconds", default=2, type=int) |
31 | 31 |
|
@@ -168,7 +168,7 @@ def __init__(self, address): |
168 | 168 | self.requester = NotifyRequester(self.received, address, False) |
169 | 169 |
|
170 | 170 | def connect(self): |
171 | | - debug(1, "Conneting to " + target) |
| 171 | + debug(1, "Connecting to " + target) |
172 | 172 | sys.stdout.flush() |
173 | 173 |
|
174 | 174 | self.requester.connect(True) |
@@ -210,7 +210,7 @@ def send_data(self): |
210 | 210 | debug(3, "Found compatible device at address " + address) |
211 | 211 | target = address |
212 | 212 | except: |
213 | | - debug(0, "Device discovery failed. Is bluetooth enabled? Are you root?") |
| 213 | + debug(0, "Device discovery failed. Is bluetooth enabled? Are you root? Try running the script with the --device option to bypass the scan - see https://github.com/adlerweb/J7-C_UC96_BLE_Logger/blob/main/README.md#warning") |
214 | 214 |
|
215 | 215 | if args.wait: |
216 | 216 | doWait = True |
|
0 commit comments