SAP Accessory protocol: connecting Smartphone to Gear S2 and beacon simultaneously
SAP Accessory protocol: connecting Smartphone to Gear S2 and beacon simultaneously
BY 18 Jun 2016Web Application Development
Hello,
I have Samsung Galaxy S4 mini, with Android version 4.4.
I can connect without problems this Android phone to a beacon, and receive beacon events. It works.
I can connect without problems the Samsung Gear S2 to Smartphone and send/receive events, using SAP Accesory Protocol (SAP). It works.
In both cases, the communication works good separately.
When I establish simultaneous communications (smartphone-beacon and smartphone-gear s2 at same time), it works during a few seconds, and then I receive lost connection between smartphone and smartwatch. I receive on Smartwatch Consumer Service error 513 (CONNECTION PEER DISCONNECTED).
Then, it is possible establish simultaneous connections using protocol bluetooth low energy? Is possible to connect Smartphone and Gear S2 through transport protocol TRANSPORT_WIFI? Do you have any sample working with TRANSPORT_WIFI? (If simultaneous connections are not possible, i can use wifi, but I don’t need wifi from smartwatch, i need wifi to send messages from smartphone to smartwatch).
Thank you,
Joaquim Puyo
public class ServiceConnection extends SASocket {
public ServiceConnection() {
super(ServiceConnection.class.getName());
}
@Override
public void onError(int channelId, String errorMessage, int errorCode) {
}
@Override
public void onReceive(int channelId, byte[] data) {
final String message = new String(data);
addMessage("Received: ", message);
mHandler.post(new Runnable() {
@Override
public void run() {
smartwatchPresenter.onMessageReceived(message);
}
});
}
@Override
protected void onServiceConnectionLost(int reason) {
closeConnection();
smartwatchPresenter.onServiceConnectionLost();
smartwatchSessionHandler.onServiceDisconnected();
updateTextView("Disconnected");
}
}
SAP Accessory protocol: connecting Smartphone to Gear S2 and beacon simultaneously
Hello,
I have Samsung Galaxy S4 mini, with Android version 4.4.
I can connect without problems this Android phone to a beacon, and receive beacon events. It works.
I can connect without problems the Samsung Gear S2 to Smartphone and send/receive events, using SAP Accesory Protocol (SAP). It works.
In both cases, the communication works good separately.
When I establish simultaneous communications (smartphone-beacon and smartphone-gear s2 at same time), it works during a few seconds, and then I receive lost connection between smartphone and smartwatch. I receive on Smartwatch Consumer Service error 513 (CONNECTION PEER DISCONNECTED).
Then, it is possible establish simultaneous connections using protocol bluetooth low energy? Is possible to connect Smartphone and Gear S2 through transport protocol TRANSPORT_WIFI? Do you have any sample working with TRANSPORT_WIFI? (If simultaneous connections are not possible, i can use wifi, but I don’t need wifi from smartwatch, i need wifi to send messages from smartphone to smartwatch).
Thank you,
Joaquim Puyo
The accesory services.xml:
BY
16 Apr 2025
Tizen Studio
BY
04 Nov 2024
Tizen Studio
BY
02 Apr 2024
Tizen Studio