hi shafiq,
your questions will be better serviced is addressed to shimmer research
support ([email protected]). this mailing list is geared
toward application development questions and discussion.
i will say that your application does not wire to nor call the bluetooth
module's init routine, so it will never respond to incoming traffic.
but first i would find out why you can't seem to power the shimmer off.
suggestion one: start with blink. suggestion two: install
boilerplate and run the shimmerconnect app to see if well-tested code
works properly.
-steve
On 04/25/2011 07:18 AM, Shafiqul Amin wrote:
Hi,
Whenever I charged my shimmer node for the first time, I saw RED led is
on. Then, I tried to press the reset button for 10 sec to shut it down.
But, it never goes off. RED and orange light is always on. Then I tried
to program the node with a sample application. It programed
successfully. But RED and orange light is always on. Finally I tried to
pair with my laptop using blue-tooth. My laptop can detect the node and
can connect successfully by assigning the node as "FireFly-DE7D".
Later, I installed the HelloWorld program on node but did not get string
on my HyperTerminal instead got "$$$". I have attached the screen shot.
Finally I tried to detect the node using my nokia N97 mobile. But, my
mobile never detected the node.
Could you please tell me how can I resolve these issues?
Regards
Shafiq
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ HelloWorldC.nc
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
#include "Timer.h"
#include "RovingNetworks.h"
module HelloWorldC {
uses interface Bluetooth;
uses interface StdControl as BTStdControl;
uses interface Leds;
uses interface Timer<TMilli> as Timer;
uses interface Boot;
}
implementation {
extern int sprintf(char *str, const char *format, ...)
__attribute__ ((C));
char msgbuf[60];
bool ready;
event void Boot.booted()
{
sprintf(msgbuf, "Hello World!\r");
atomic ready = FALSE;
call BTStdControl.start();
}
task void sendData() {
call Bluetooth.write(msgbuf, strlen(msgbuf));
}
async event void Bluetooth.connectionMade(uint8_t status) {
call Leds.led0Toggle();
//if(ready)
//call Timer.startPeriodic( 50 );
}
async event void Bluetooth.commandModeEnded() {
atomic ready = TRUE;
}
async event void Bluetooth.connectionClosed(uint8_t reason){
call Leds.led1Toggle();
}
async event void Bluetooth.dataAvailable(uint8_t data){ }
event void Bluetooth.writeDone(){ }
event void Timer.fired()
{
post sendData();
}
}
########################## HelloWorldAppC #####################
configuration HelloWorldAppC {
}
implementation {
components
MainC,
HelloWorldC,
RovingNetworksC,
new TimerMilliC() as TimerC,
LedsC;
HelloWorldC -> MainC.Boot;
HelloWorldC.Leds -> LedsC;
HelloWorldC.Timer -> TimerC;
HelloWorldC.Bluetooth -> RovingNetworksC;
HelloWorldC.BTStdControl -> RovingNetworksC;
}
_______________________________________________
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