macOS StartupProject
Hello,
Regarding StartupProject with macOS (10.13.6) I do not understand what is going wrong.
cf . https://github.com/mbientlab/MetaWear-SDK-iOS-macOS-tvOS/blob/master/StarterProject/macOS/ScanViewController.swift
Scan works very well but impossible to get LED on or OFF...
Indeed, it looks like if "device.connectAndSetup().continueOnSuccessWith" was not working with macOS... not even an error...
It looks strange as device is well selected after double-click ; device.name value corresponding to the selected row.
Thanks for your attention
Patrice
NB : my 3 metamotion-R are running with version 1.4.2 and are running perfectly with iOS 12.
This discussion has been closed.
Comments
Add error handling to the async task and post the returned error.
Hello Eric,
Here is what is logged after double-click on one metawear ; which means that "device.logDelegate = ConsoleLogger.shared" is responding...
Code is exactly the same in repo from github.
I have tried to add a print(t.error) inside device.connectAndSetup().continueOnSuccessWith but nothing in the console...
Does it works for you ?
With old sdk it was working... and it is still working even with 1.4.2 firmware...
Thanks for your help
Patrice
Use
continueWith
to proprogate errors.Thanks Eric for your advice. I now get and "error" but only when disconnecting...
Optional(Error Domain=CBErrorDomain Code=6 "The connection has timed out unexpectedly." UserInfo={NSLocalizedDescription=The connection has timed out unexpectedly.})
I still must be missing something...
Thanks again
Patrice
Monitor the BLE activity on macOS and post what the BT radio is doing when calling
connectAndSetup
.Hello Eric,
I succeed to extract infomations about bluetoothd process but I am not sure that it is what you are expected...
Otherwise I have tested it again and with old sdk I do confirm that it works perfectly ; I mean connection and déconnection with led effects (green and red).
With new sdk, it connects, but impossible to disconnect with double click and the led command do not work...
Really strange for me...
No, monitor the BLE activity i.e. what the BT radio is doing and what data is being exchanged between the device and mac.
Sorry Eric, I do not know how to do such a thing... with wireshark ? I am going to try...
I work on a macbook air with High Sierra 10.13.6.
I am using internal BT radio.
I have tried with and external usb BT adapter (class 1) but it doesn't work at all as it doesn't work also with the old sdk (which runs perfectly with internal BT)...
Hi Eric, I do not have any sniffer dongle to capture BLE traffic with wireshark.
On your side, can you confirm that the last startupproject is working correctly since upgrade to the new sdk ? I guess that yes but in this case :
Internal or external BT ? Both are not working the same way ?
What would be the minimal hardware and software configuration for mac OS ?
Issues have been fixed, please try latest code on develop branch
Many thanks Stephen,
It looks better as "connecting" appears in the selected row but it is still impossible to connect and put led on.
It looks like if
isConnectedAndSetup
was not responding as it always respond "false"...I spent some new couple of hours to try to understand but without any result : with internal like usb external BT...
I also found this post on the forum from tpitman on 9 august ;
https://mbientlab.com/community/discussion/2631/macos-connect-doesnt-succeed?
... unfortunately without any clue...
Concretely if my app is running on iOS I would like to develop an interface on mac os, so as to be able to use a best BT receiver signal (class 1)...
Many thanks for considering my request.
Hello Eric and Stephen,
I made some new tries, but in vain... I also installed Bluetooth Explorer and PacketLogger but nothing, really nothing is moving when launching
connectAndSetup
; nothing this is strange I admit... I necessarily miss something...I also check develop branch and test the ultimate modifications (5 days ago) in "MockModule.swift" but nothing better
In parallel, so as to check my macbook bluetooth adapter, I made some tests with my Marshall headphones Bluetooth 4 with aptX, and everything is running very well ; with the internal as with the external usb BLE adapter. The only real big difference is the range which is really better with my usb external adapter with dedicated antenna (talus class 1 adapter )... and this is what I am looking for with my Metawear-R.
Otherwise, as StartupProject doesn't work (at least for me...), did you plan to push on App Store a full MetaBase app available for mac os that I could download to compare ?
Thanks for your help
Patrice
Start with a simple macOS application that uses CoreBluetooth to connect and discover BLE services. Test that your app works with your MetaWears.
No, there is no plan on releasing a macOS version of MetaBase.