Bug? Wearable DataLayer library - Cannot send messages to more than one paired device

Tim Green

Member
Licensed User
Longtime User
Using the Wearable DataLayer 1.0 library I have communication working well (Thank you! barx) between a Nexus 10 tablet and a single paired Moto360 watch. Similar to the examples in the library thread, I process the Results list in the NodeResults event to find the Node maps and save and then use these when transmitting short messages using the Send method. There is normally only one Node map in the Results list. The Nexus 10 finds the node for the Moto360, and the Moto360 finds the node for the Nexus 10.

When I pair a second Moto360 with the Nexus 10, as expected, the Results list in the NodeResults event then returns two node maps. The Nexus 10 finds both Moto360's, and each Moto360 finds the Nexus 10 and the other Moto360.

Since I save both node maps in each of the devices I expected to use these to direct where the Send method transmits its messages to. But I found that it does not matter which node map is used in the Send method, all messages are transmitted to only one device. The pattern which has become apparent is that each device only transmits messages to the last node of the Results list provided in the NodeResults event.

Is this a bug? Or am I confused about how it should work? Does anyone have experience using this library to communicate with more than one Wearable?

The setup to test this somewhat involved. I can create simplified apps for the Nexus and Moto360's to demonstrate the issue.

The API note about the Send method:

Send (NodeID As String, Timeout As Long, msgPath As String, Data As String)
Sends a message to a specified node
NodeID - The ID of the node to connect to.

As a test I replaced the NodeID parameter with a dummy string and the behavior did not change, the message was still transmitted to the last Node found in the Results list provided in the NodeResults event. Perhaps this is the default behavior if the NodeID is invalid?

Thanks. - Tim Green
 
Top