Merge ~sylvain-pineau/checkbox-support:eddystone_scanner_poweron_bluetoothctl into checkbox-support:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 6c543b130bbdb261fb579327e363aeb9c4a16361
Merged at revision: 9a352e7482b26ca734bcea826ae822792b02677d
Proposed branch: ~sylvain-pineau/checkbox-support:eddystone_scanner_poweron_bluetoothctl
Merge into: checkbox-support:master
Diff against target: 26 lines (+7/-0)
1 file modified
checkbox_support/scripts/eddystone_scanner.py (+7/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+356422@code.launchpad.net

Description of the change

power on the BT adapter using bluetoothctl as we can face the following bug on UC:

https://bugs.launchpad.net/snappy-hwe-snaps/+bug/1706649

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/checkbox_support/scripts/eddystone_scanner.py b/checkbox_support/scripts/eddystone_scanner.py
index 62f6cc0..c67626e 100644
--- a/checkbox_support/scripts/eddystone_scanner.py
+++ b/checkbox_support/scripts/eddystone_scanner.py
@@ -22,7 +22,9 @@ import argparse
22import asyncio22import asyncio
23import logging23import logging
24import sys24import sys
25import time
2526
27from checkbox_support.interactive_cmd import InteractiveCommand
26from checkbox_support.vendor.aioblescan import create_bt_socket28from checkbox_support.vendor.aioblescan import create_bt_socket
27from checkbox_support.vendor.aioblescan import BLEScanRequester29from checkbox_support.vendor.aioblescan import BLEScanRequester
28from checkbox_support.vendor.aioblescan import HCI_Cmd_LE_Advertise30from checkbox_support.vendor.aioblescan import HCI_Cmd_LE_Advertise
@@ -64,6 +66,11 @@ def main():
64 except Exception as e:66 except Exception as e:
65 parser.error("Error: " + str(e))67 parser.error("Error: " + str(e))
66 return 168 return 1
69 with InteractiveCommand('bluetoothctl') as btctl:
70 btctl.writeline('power on')
71 time.sleep(1)
72 btctl.writeline('exit')
73 btctl.kill()
67 event_loop = asyncio.get_event_loop()74 event_loop = asyncio.get_event_loop()
68 # First create and configure a STREAM socket75 # First create and configure a STREAM socket
69 try:76 try:

Subscribers

People subscribed via source and target branches