Skip to content

Commit fefc4bd

Browse files
committed
Create a bluetooth discovery example
1 parent de6b626 commit fefc4bd

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

ExampleConsole/Program.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,20 @@
1111
// along with this program. If not, see <http://www.gnu.org/licenses/>.
1212

1313
using MatterDotNet.Entities;
14+
using MatterDotNet.OperationalDiscovery;
1415

1516
namespace ExampleConsole
1617
{
1718
internal class Program
1819
{
1920
static async Task Main(string[] args)
2021
{
21-
Controller controller = Controller.Load("fabric.fabric", "fabric.key");
22-
await controller.EnumerateFabric();
23-
Console.WriteLine(controller.ToString());
24-
22+
Console.WriteLine("Scanning for Devices....");
23+
ODNode[] discovered = await BTDiscoveryService.ScanAll();
24+
Console.Clear();
25+
Console.WriteLine("Devices Discovered: ");
26+
foreach (ODNode node in discovered)
27+
Console.WriteLine(node.ToString());
2528
Console.ReadLine();
2629
}
2730
}

0 commit comments

Comments
 (0)