You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A string representing the name of the Bluetooth device.
string mac
A string representing the MAC address of the Bluetooth device.
The easiest way to obtain a valid DeviceSignature is to get a list of them by calling GetPairedDevices on a SingularityManager.
List<DeviceSignature>pairedDevices=mySingularityManager.GetPairedDevices();DeviceSignaturemyDevice=pairedDevices[0];//if you just wanted the first device//If you are looking for a device with a specific name (in this case exampleDeviceName):for(inti=0;i<pairedDevices.Count;i++){if(pairedDevices[i].name=="exampleDeviceName"){myDevice=pairedDevices[i];break;}}
Example usage:
Let's say you have a DeviceSignature called myDevice that you got from running GetPairedDevices on a singularity manager called mySingularityManager.
Debug.Log(myDevice.name);//Prints the name of your device (e.g. Lucas-ESP32)Debug.Log(myDevice.mac);//Prints the mac address of your devicemySingularityManager.ConnectToDevice(myDevice)//Attempts to connect to this device over bluetooth