Discussion:
[Shimmer-users] Bluetooth reconnection
Jonas Lucchesi
2013-06-13 19:56:53 UTC
Permalink
Hi all,

I'm having some difficulties in my application and I hope someone could
help me. A bluetooth connection is established and some messages are
exchanged, then connection is closed for a while and re-established later.
All this process seems to be working well, except that after reconnection
sensor not always receive the income messages (sometimes it does, but very
often it doesn't).

to turn Bluetooth off, I'm using:
call BTStdControl.stop();

and to turn it on again:
call BluetoothInit.init();
call BTStdControl.start();

note: connection is re-established "succesfully", sensor is always able to
send a message, it's only not always able to receive one.

Does anyone have an idea of what is going on?

Thanks,
Jonas Lucchesi
Sarra Sarah
2013-06-14 16:01:47 UTC
Permalink
Hi,
did you use this :

async event void Bluetooth.connectionMade(uint8_t status){//bluetooth
connection established


//exchange message

}

If this doesn't work try to show us the code.

good luck.
Post by Jonas Lucchesi
Hi all,
I'm having some difficulties in my application and I hope someone could
help me. A bluetooth connection is established and some messages are
exchanged, then connection is closed for a while and re-established later.
All this process seems to be working well, except that after reconnection
sensor not always receive the income messages (sometimes it does, but very
often it doesn't).
call BTStdControl.stop();
call BluetoothInit.init();
call BTStdControl.start();
note: connection is re-established "succesfully", sensor is always able to
send a message, it's only not always able to receive one.
Does anyone have an idea of what is going on?
Thanks,
Jonas Lucchesi
_______________________________________________
Shimmer-users mailing list
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
Loading...