Loading system/test/rootcanal/bluetooth_hci.cc +15 −10 Original line number Diff line number Diff line Loading @@ -143,6 +143,11 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) { // Add the controller as a device in the model. test_model_.Add(controller_); // Send responses to logcat if the test channel is not configured. test_channel_.RegisterSendResponse([](const std::string& response) { ALOGI("No test channel yet: %s", response.c_str()); }); if (BtTestConsoleEnabled()) { SetUpTestChannel(6111); SetUpHciServer(6211, Loading @@ -151,6 +156,16 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) { 6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); }); } // Add some default devices for easier debugging test_channel_.AddDefaults(); // This should be configurable in the future. ALOGI("Adding Beacons so the scan list is not empty."); test_channel_.Add({"beacon", "be:ac:10:00:00:01", "1000"}); test_channel_.AddDeviceToPhy({"2", "1"}); test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"}); test_channel_.AddDeviceToPhy({"3", "1"}); unlink_cb_ = [this, cb](sp<BluetoothDeathRecipient>& death_recipient) { if (death_recipient->getHasDied()) ALOGI("Skipping unlink call, service died."); Loading Loading @@ -293,16 +308,6 @@ void BluetoothHci::SetUpTestChannel(int port) { test_channel_.RegisterSendResponse( [](const std::string& response) { ALOGI("No test channel: %s", response.c_str()); }); // Add some default devices for easier debugging test_channel_.AddDefaults(); // This should be configurable in the future. ALOGI("Adding Beacons so the scan list is not empty."); test_channel_.Add({"beacon", "be:ac:10:00:00:01", "1000"}); test_channel_.AddDeviceToPhy({"1", "0"}); test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"}); test_channel_.AddDeviceToPhy({"2", "0"}); if (socket_fd == -1) { ALOGE("Test channel SetUp(%d) failed.", port); return; Loading system/vendor_libs/test_vendor_lib/model/setup/test_command_handler.cc +9 −9 Original line number Diff line number Diff line Loading @@ -59,29 +59,29 @@ void TestCommandHandler::AddDefaults() { AddPhy({"BR_EDR"}); // Add the controller to the Phys AddDeviceToPhy({"0", "0"}); AddDeviceToPhy({"0", "1"}); AddDeviceToPhy({"1", "1"}); AddDeviceToPhy({"1", "2"}); // Add default test devices and add the devices to the phys // Add({"beacon", "be:ac:10:00:00:01", "1000"}); // AddDeviceToPhy({"1", "0"}); // AddDeviceToPhy({"2", "1"}); // Add({"keyboard", "cc:1c:eb:0a:12:d1", "500"}); // AddDeviceToPhy({"2", "0"}); // AddDeviceToPhy({"3", "1"}); // Add({"classic", "c1:a5:51:c0:00:01", "22"}); // AddDeviceToPhy({"3", "1"}); // AddDeviceToPhy({"4", "2"}); // Add({"car_kit", "ca:12:1c:17:00:01", "238"}); // AddDeviceToPhy({"4", "1"}); // AddDeviceToPhy({"5", "2"}); // Add({"sniffer", "ca:12:1c:17:00:01"}); // AddDeviceToPhy({"5", "1"}); // AddDeviceToPhy({"6", "2"}); // Add({"sniffer", "3c:5a:b4:04:05:06"}); // AddDeviceToPhy({"1", "1"}); // AddDeviceToPhy({"7", "2"}); // Add({"remote_loopback_device", "10:0d:00:ba:c1:06"}); // AddDeviceToPhy({"2", "1"}); // AddDeviceToPhy({"8", "2"}); List({}); SetTimerPeriod({"10"}); Loading Loading
system/test/rootcanal/bluetooth_hci.cc +15 −10 Original line number Diff line number Diff line Loading @@ -143,6 +143,11 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) { // Add the controller as a device in the model. test_model_.Add(controller_); // Send responses to logcat if the test channel is not configured. test_channel_.RegisterSendResponse([](const std::string& response) { ALOGI("No test channel yet: %s", response.c_str()); }); if (BtTestConsoleEnabled()) { SetUpTestChannel(6111); SetUpHciServer(6211, Loading @@ -151,6 +156,16 @@ Return<void> BluetoothHci::initialize(const sp<IBluetoothHciCallbacks>& cb) { 6311, [this](int fd) { test_model_.IncomingLinkLayerConnection(fd); }); } // Add some default devices for easier debugging test_channel_.AddDefaults(); // This should be configurable in the future. ALOGI("Adding Beacons so the scan list is not empty."); test_channel_.Add({"beacon", "be:ac:10:00:00:01", "1000"}); test_channel_.AddDeviceToPhy({"2", "1"}); test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"}); test_channel_.AddDeviceToPhy({"3", "1"}); unlink_cb_ = [this, cb](sp<BluetoothDeathRecipient>& death_recipient) { if (death_recipient->getHasDied()) ALOGI("Skipping unlink call, service died."); Loading Loading @@ -293,16 +308,6 @@ void BluetoothHci::SetUpTestChannel(int port) { test_channel_.RegisterSendResponse( [](const std::string& response) { ALOGI("No test channel: %s", response.c_str()); }); // Add some default devices for easier debugging test_channel_.AddDefaults(); // This should be configurable in the future. ALOGI("Adding Beacons so the scan list is not empty."); test_channel_.Add({"beacon", "be:ac:10:00:00:01", "1000"}); test_channel_.AddDeviceToPhy({"1", "0"}); test_channel_.Add({"beacon", "be:ac:10:00:00:02", "1000"}); test_channel_.AddDeviceToPhy({"2", "0"}); if (socket_fd == -1) { ALOGE("Test channel SetUp(%d) failed.", port); return; Loading
system/vendor_libs/test_vendor_lib/model/setup/test_command_handler.cc +9 −9 Original line number Diff line number Diff line Loading @@ -59,29 +59,29 @@ void TestCommandHandler::AddDefaults() { AddPhy({"BR_EDR"}); // Add the controller to the Phys AddDeviceToPhy({"0", "0"}); AddDeviceToPhy({"0", "1"}); AddDeviceToPhy({"1", "1"}); AddDeviceToPhy({"1", "2"}); // Add default test devices and add the devices to the phys // Add({"beacon", "be:ac:10:00:00:01", "1000"}); // AddDeviceToPhy({"1", "0"}); // AddDeviceToPhy({"2", "1"}); // Add({"keyboard", "cc:1c:eb:0a:12:d1", "500"}); // AddDeviceToPhy({"2", "0"}); // AddDeviceToPhy({"3", "1"}); // Add({"classic", "c1:a5:51:c0:00:01", "22"}); // AddDeviceToPhy({"3", "1"}); // AddDeviceToPhy({"4", "2"}); // Add({"car_kit", "ca:12:1c:17:00:01", "238"}); // AddDeviceToPhy({"4", "1"}); // AddDeviceToPhy({"5", "2"}); // Add({"sniffer", "ca:12:1c:17:00:01"}); // AddDeviceToPhy({"5", "1"}); // AddDeviceToPhy({"6", "2"}); // Add({"sniffer", "3c:5a:b4:04:05:06"}); // AddDeviceToPhy({"1", "1"}); // AddDeviceToPhy({"7", "2"}); // Add({"remote_loopback_device", "10:0d:00:ba:c1:06"}); // AddDeviceToPhy({"2", "1"}); // AddDeviceToPhy({"8", "2"}); List({}); SetTimerPeriod({"10"}); Loading