Hi,

BT will probably be the way to go for the scenario, since 802.14.5 is quite
complex.
I understand the fact that I must set the Shimmer in master mode
*(SM,1)*so it can manage the connection. Next there are some commands
that seem to
be relevant to the sensing/reconnecting.

I will store the remote address, which is detected by inquiry. *SR,I*
*
*
Since I send a heartbeat from the PC to the Shimmer every 1 sec, I assume
the *CT<address>,<timer>* -command can be helpful? It will disconnect when
no data is seen for 7seconds or so. (This way I don't have to wait two
minutes for the connection to close automatically).

(Since I need to be in command mode all the time, I assume I have to use
the *T,<0,1>* command first for data to be received from the PC?) Correct
me if I'm wrong.

Next I will need to detect in some way whether the connection is in fact
closed or not. If closed, I call the SD-logging function. (I recall finding
a function that detects this, but not sure wich one)

If it is closed, I will call the *C*-command in an attempt to connect to
the remote stored address.

As soon as a connection is set up again, I will call my real time-logging
function.

Does this seem to be correct?
An additional question: When I'm in master mode, the command mode (*$$$*)
will stay on until i use the *---* command right? Or will it close earlier?

Regards,

Maxim






2012/5/15 mike healy <[email protected]>

> Hi,
>
> Bluetooth on the shimmer will close the connection after it moves out of
> range, but it takes a minute or two (this is down to the BT spec). You
> might be able to tweak this timing. Take a look at the RN-42 manual for
> detais:
> http://www.rovingnetworks.com/resources/download/47/Advanced_User_Manual.
> I've just retested with Boilerplate to confirm that this does in fact
> occur. Also remember that Bluetooth (and most RF comms in general) is not
> just line-of-sight.
>
> As for 802.15.4, take a look at the TinyOS tutorials. Lesson 3 is probably
> the most relevant:
> http://docs.tinyos.net/tinywiki/index.php/Mote-mote_radio_communication
>
> Mike
>
>
>
>
> On Tue, May 15, 2012 at 8:53 AM, Maxim Michel <[email protected]>wrote:
>
>> Hi,
>>
>> I tested Bluetooth connection with the Boilerplate firmware. It seems
>> that when the Shimmer leaves the line-of-sight of the PC, it doesn't close
>> the BT connection.
>> Because when it moves back, it just continues streaming again. So
>> detecting whether the connection has been closed completely isn't the best
>> way to go I think.
>>
>> 802.15.4 seems a bit vague in my opinion. Where can I find the right
>> information on how to implement this protocol?
>>
>> Thanks
>>
>>
>>
>> 2012/5/15 mike healy <[email protected]>
>>
>>> Hi,
>>>
>>> An easier way to determine if the Shimmer has lost the BT connection is
>>> to use Bluetooth.connectionClosed() event. In this event you can just post
>>> a task to do whatever you want (such as logging to SD).
>>>
>>> Equally you can use Bluetooth.connectionMade() event to tell when a BT
>>> connection is re-established.
>>>
>>> You will, however, need to do a bit more work on the host (PC) side to
>>> (a) realise when the BT connection is lost and (b) re-establish the
>>> connection when the Shimmer comes back in range (i.e. when the connection
>>> is lost you will need to periodically scan and when the shimmer is detected
>>> again establish a new connection).
>>>
>>> The 802.15.4 radio is more suitable for the type of scheme you describe
>>> (as it is connectionless, unreliable, best effort, etc.).
>>>
>>> Mike
>>>
>>>
>>>
>>> On Mon, May 14, 2012 at 7:03 PM, Maxim Michel <[email protected]>wrote:
>>>
>>>> Hello again,
>>>>
>>>> For my scenario i keep sending a serial command from a c# app to my
>>>> shimmer every 1 second over Bluetooth.
>>>> As soon as the Shimmer hasn't got any BT-connection anymore (so no
>>>> serial commands are received) the Shimmer must perform a function call
>>>> (i.e. SD-logging() ). When he starts to receive the commands again, it must
>>>> call another function (i.e. streamingdata() ).
>>>>
>>>> Does anyone see a solution on how to write this in code? Or does this
>>>> seem to be unlikely to work?
>>>>
>>>> Thanks
>>>>
>>>>
>>>> _______________________________________________
>>>> Shimmer-users mailing list
>>>> [email protected]
>>>> https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
>>>>
>>>>
>>>
>>
>
_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to