-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
First 1.1.0 test results (iPhone) #23
Comments
Hey there, thanks for the demo-code and logs. I am curious if this a module problem, here is why: We basically wrap all native API's, but especially on events, we don't do any other business-logic. See some details here:
And that's basically it. If there are characteristics, there are wrapped here, otherwise, an empty array is returned. Not sure how to debug this, since I do not have a proper Bluetooth-device with me right now. |
Thanks Hans, I am not "at home" in iOS source code, but I can see what is going on. Sorry for that. Also firing discoverCharacteristicsForService does not result in a didDiscoverCharacteristicsForService event being fired. Maybe the call is not correct; I can't derive that from the source code nor the Wiki.
The log:
|
I know @wsliaw recently did a lot with the module, maybe he can help? |
|
Thanks! didDiscoverCharacteristicsForService is now fired. Maybe the example should be updated with this. Could the module be updated so the UUID's are exposed for service & characteristic and also for peripheral? Another question; how can I send a UINT64 value (byte array length 8) over Bluetooth? Javascript does not support > 53bits accuracy. If I create a Ti.Buffer, should I use Ti.Codec.TYPE_BYTE and fill the buffer bytes with the byteArray bytes? Thanks!! |
Yea, I think I'll make a PR for that This is how I do it:
|
PR ready for the UUID properties, 1.1.2 on the way. |
I just see that the didDiscoverCharacteristicsForService is only fired once, yet there are 2 services having 5 characteristics each. This is the log when I use the BLE module from Logicallabs
|
@focussing so what did you get from |
The Bluetooth device I am using advertises 2 services. Ti.Bluetooth sees that, so per service a "didDiscoverCharacteristicsForService" has to be done. I am testing with 1.1.2 version now, but I don't get uuid reported, for example from didDiscoverPeripheral.
Also didDiscoverCharacteristicsForService is not fired. |
@focussing Peripherals do not have a UUID, they are identified via their |
True! Of course you are right. Sorry! This is the code and log. The only thing right now is that only the first of 2 service's characteristics are discovered:
|
Maybe because you are using |
@focussing consider discoverServices with UUIDs
Please tell me what's the result, thank you |
Closing due to inactivity. Feel free to reopen if the issue persists. |
@wsliaw your suggestion gives an error message.
Normally do don't know the service UUID on forehand. For a new Bluetooth module, first you list the services and UUID's in the console. And then you'll want to get the Characteristics per Service, and start listening or sending data to specific Characteristics. |
By the way, off course I switched to the latest release of this module 1.2.1 Getting the same result as earlier:
|
These characteristics are common ones, giving information about manufacturer etc. |
@focussing So what exact event / method is not working? If you compare it to some Swift examples, it should be nearly 1:1 the name API naming, so that might lead us to the related issue here. Thanks for keeping this active! |
Reopening to keep track about the process. ping @focussing |
Tested the new 1.1.0 release.
Main issue is that no reporting of UUIDs is done when reporting discovered peripherals, services and characteristics.
It discovers my Bluetooth device (VB-1913...), and connects to this device.
When the device is connected it finds it's 1 service, and finds that this service has characteristic(s).
However it doesn't report which characteristics.
In order to use this module in an application, the control by specific UUIDs is needed.
The text was updated successfully, but these errors were encountered: