Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion Shimmer32FeetAPI/ShimmerLogAndStream32FeetBLE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,16 @@ public class ShimmerLogAndStream32FeetBLE : ShimmerLogAndStream
protected String macAddress { get; set; }
ConcurrentQueue<byte> cq = new ConcurrentQueue<byte>();
private static bool Debug = false;
public ShimmerLogAndStream32FeetBLE(String devID, String bMacAddress)
/// <summary>
///
/// </summary>
/// <param name="devID"></param>
/// <param name="bMacAddress"> for example 114f439f84aa</param>
/// <param name="hwVersion"></param>
public ShimmerLogAndStream32FeetBLE(String devID, String bMacAddress, ShimmerVersion hwVersion)
: base(devID)
{
HardwareVersion = (int)hwVersion;
macAddress = bMacAddress;
}

Expand Down Expand Up @@ -75,6 +82,21 @@ protected override void OpenConnection()
BluetoothUuid TxID = BluetoothUuid.FromGuid(new Guid("49535343-8841-43f4-a8d4-ecbe34729bb3"));
BluetoothUuid RxID = BluetoothUuid.FromGuid(new Guid("49535343-1e4d-4bd9-ba61-23c647249616"));
BluetoothUuid ServiceID = BluetoothUuid.FromGuid(new Guid("49535343-fe7d-4ae5-8fa9-9fafd205e455"));

if (HardwareVersion == (int)ShimmerVersion.SHIMMER3R)
{
TxID = BluetoothUuid.FromGuid(new Guid("65333333-A115-11E2-9E9A-0800200CA102"));
RxID = BluetoothUuid.FromGuid(new Guid("65333333-A115-11E2-9E9A-0800200CA101"));
ServiceID = BluetoothUuid.FromGuid(new Guid("65333333-A115-11E2-9E9A-0800200CA100"));
}
else if (HardwareVersion == (int)ShimmerVersion.SHIMMER3)
{
TxID = BluetoothUuid.FromGuid(new Guid("49535343-8841-43f4-a8d4-ecbe34729bb3"));
RxID = BluetoothUuid.FromGuid(new Guid("49535343-1e4d-4bd9-ba61-23c647249616"));
ServiceID = BluetoothUuid.FromGuid(new Guid("49535343-fe7d-4ae5-8fa9-9fafd205e455"));
}


ServiceTXRX = bluetoothDevice.Gatt.GetPrimaryServiceAsync(ServiceID).GetAwaiter().GetResult();
if (ServiceTXRX != null)
{
Expand Down
11 changes: 9 additions & 2 deletions ShimmerAPI/ShimmerAPI/ShimmerLogAndStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -718,8 +718,15 @@
}
else
{
//ReadCalibDump();
ReadCalibrationParameters("All");
var t = this.GetType();
if (HardwareVersion == (int)ShimmerBluetooth.ShimmerVersion.SHIMMER3 && t.Name.Equals("ShimmerLogAndStream32FeetBLE")) // temporary fix to get shimmer3 BLE working, not recommended for use
{
ReadCalibDump();

Check warning on line 724 in ShimmerAPI/ShimmerAPI/ShimmerLogAndStream.cs

View workflow job for this annotation

GitHub Actions / build

'ShimmerLogAndStream.ReadCalibDump()' is obsolete: 'This method is unfinished and should not be used.'

Check warning on line 724 in ShimmerAPI/ShimmerAPI/ShimmerLogAndStream.cs

View workflow job for this annotation

GitHub Actions / build

'ShimmerLogAndStream.ReadCalibDump()' is obsolete: 'This method is unfinished and should not be used.'
}
else
{
ReadCalibrationParameters("All");
}
}

status_text = "Acquiring EXG1 configure settings...";
Expand Down
4 changes: 2 additions & 2 deletions ShimmerCapture/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This is a GUI Example showing the use of the API on Streaming/Configuring/Connecting to a Shimmer3 device
* Both Bluetooth Classic and BLE is supported
* Both Bluetooth Classic and BLE (only Shimmer3R) is supported
* For Bluetooth Classic please pair the device first and use the com port to connect
* For BLE, the device does not require pairing, use the mac address to connect to the device
* For BLE, the device does not require pairing, use the mac address to connect to the device, the mac address should be in the form ffffffffffff
2 changes: 1 addition & 1 deletion ShimmerCapture/ShimmerCapture/Control.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1267,7 +1267,7 @@ public void Connect()
}
else
{
ShimmerDevice = new ShimmerLogAndStream32FeetBLE("Shimmer", comboBoxComPorts.Text);
ShimmerDevice = new ShimmerLogAndStream32FeetBLE("Shimmer", comboBoxComPorts.Text, ShimmerAPI.ShimmerDevice.ShimmerVersion.SHIMMER3R);
}
ShimmerDevice.UICallback += this.HandleEvent;

Expand Down
Loading