-
-
Notifications
You must be signed in to change notification settings - Fork 101
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8d9c947
commit c7eab0f
Showing
10 changed files
with
175 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Uncomment this setting to wait for the usb to connect first. | ||
# By default, we try to connect and wait for the phone to connect first regardless of the usb connection. | ||
#AAWG_CONNECTION_WAIT_FOR_ACCESSORY=1 | ||
# Set the connection strategy to use | ||
# 0 - Dongle mode (default). Waits for both dongle and headunit bluetooth connections and then starts the wifi and usb connections. | ||
# 1 - Phone first. Waits for the phone bluetooth and wifi to connect first, and then starts the usb connection. | ||
# 2 - Usb first. Waits for the usb to connect first, and then starts the bluetooth and wifi connection with phone. | ||
AAWG_CONNECTION_STRATEGY=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
aa_wireless_dongle/package/aawg/src/bluetoothAdvertisement.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <stdio.h> | ||
|
||
#include "common.h" | ||
#include "bluetoothAdvertisement.h" | ||
|
||
static constexpr const char* INTERFACE_BLUEZ_LE_ADVERTISEMENT = "org.bluez.LEAdvertisement1"; | ||
|
||
/* static */ std::shared_ptr<BLEAdvertisement> BLEAdvertisement::create(DBus::Path path) { | ||
return std::shared_ptr<BLEAdvertisement>(new BLEAdvertisement(path)); | ||
} | ||
|
||
BLEAdvertisement::BLEAdvertisement(DBus::Path path): DBus::Object(path) { | ||
this->create_method<void(void)>(INTERFACE_BLUEZ_LE_ADVERTISEMENT, "Release", sigc::mem_fun(*this, &BLEAdvertisement::Release)); | ||
|
||
type = this->create_property<std::string>(INTERFACE_BLUEZ_LE_ADVERTISEMENT, "Type", DBus::PropertyAccess::ReadOnly); | ||
serviceUUIDs = this->create_property<std::vector<std::string>>(INTERFACE_BLUEZ_LE_ADVERTISEMENT, "ServiceUUIDs"); | ||
localName = this->create_property<std::string>(INTERFACE_BLUEZ_LE_ADVERTISEMENT, "LocalName"); | ||
} | ||
|
||
void BLEAdvertisement::Release() { | ||
Logger::instance()->info("Bluetooth LE Advertisement released\n"); | ||
} |
17 changes: 17 additions & 0 deletions
17
aa_wireless_dongle/package/aawg/src/bluetoothAdvertisement.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#pragma once | ||
|
||
#include "bluetoothCommon.h" | ||
|
||
class BLEAdvertisement: public DBus::Object { | ||
public: | ||
static std::shared_ptr<BLEAdvertisement> create(DBus::Path path); | ||
|
||
std::shared_ptr<DBus::Property<std::string>> type; | ||
std::shared_ptr<DBus::Property<std::vector<std::string>>> serviceUUIDs; | ||
std::shared_ptr<DBus::Property<std::string>> localName; | ||
|
||
protected: | ||
BLEAdvertisement(DBus::Path path); | ||
|
||
void Release(); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters