atl03001
YaBB Newbies
Posts: 26
|
I figured the easiest way to get RSSI is by entering the Xbee's AT command mode- it sends back a hex value of the actual loss in dB/m. I can enter this mode in HT pretty easily by entering '+++' and then the command 'ATDB', then exiting by the command 'ATCN' (or waiting 3 seconds for the timeout). However, I'm trying to do this with the firmware onboard, but I can't seem to figure out how to make it work..I made a new case and do the following: case 'O': //Get RSSI info delayUs(100000); //No commands for 1/10 second to enter AT mode uart0SendString((unsigned char *)"+++"); delayUs(50000); //Delay 1/2 sec to get into AT mode uart0SendString((unsigned char *)"ATDB"); //Command to get RSSI info, in db/m uart0SendChar((unsigned char *)"\n"); //Press enter rssi= uart0GetCh(); //Get first number, in hex rssi2=uart0GetCh(); //Get second number, in hex uart0SendString((unsigned char *)"ATCN"); //Exit AT mode delayUs(100000); //Delay 1/10 sec to get out of AT mode uart0SendChar((unsigned char *)rssi); uart0SendChar((unsigned char *)rssi2); uart0SendChar((unsigned char *)" dB/m"); break; But this doesn't seem to work: the string '+++' is displayed on the HT instead of making the Xbee go into AT mode. I also tried doing separate uart0SendChar((unsigned char *)"+") 3 different times, but got the same results..Any ideas?
|