Show Posts
Pages: [1] 2
1  Using Arduino / Networking, Protocols, and Devices / Array of data structures on: July 22, 2013, 10:17:58 am
Hi ,

Please i need your advice before i begin inplementing.
SO previously , working on localisation in star topology with xbee serie 1, The only solution i had, with the given sensors
was to send back the result of ATND command to the computer and then with java code i resolve the sensors locations.

I don't know if it still a good solution or not.
But i just had in mind , what if i try to filter the incoming bytes in an array of data structures and then the location resolution will be done with every sensor by itself.
The structure will contain the sensor NI, neighbor Ni, and neighbor RSSI. Transform the RSSI into distance.

Then I'll need an array to save the different distances to allow trilateration.

Please, am i going on the right solution or extremely wrong ??

need your help!!
2  Using Arduino / Networking, Protocols, and Devices / Re: problem with Arduino /xbee on: July 08, 2013, 01:07:02 pm
OK Thank you Sir for your help
And  here is my new code, But I get a new problem : the arduino UNO board resets automatically in few seconds :/
Attached is a link for the picture i took as a result of the code.
http://www.mediafire.com/?94bfst44683kxod


Code:
void setup(){
      Serial.begin(9600);
      delay(1000);
      command_mode();
      }

void loop() {
            while ( Serial.available()>0 )      {
            byte ch = Serial.read();
                  Serial.print(char(ch));
      }
     
}

void command_mode(){
byte ok;
delay(1200);
  Serial.print("+++");
  delay(1200);
  bool bOK = false;
  while (Serial.available() > 0) {
    ok=Serial.read();
    Serial.print(char(ok));
     bOK = true;
  }
 
  if(bOK)
  {
   
    Serial.println();
    Serial.println("ATNI");
    delay(1000);
    read_data();
    delay(500);
   
    Serial.println("ATND");
   
   
}
}
void read_data(){
  byte data;
  while(Serial.available()){
    data=Serial.read();
    delay(1000);
    Serial.print(char(data));
    delay(500);
  }
Serial.flush();

}
3  Using Arduino / Networking, Protocols, and Devices / Re: problem with Arduino /xbee on: July 08, 2013, 11:17:17 am
Please Sir, here is my code, I don't find out why it doesn't work :/ :/

PS : it still works for 4 sensor nodes, but no more than 4 :/ And when i deleted all the delays, it doesn't work for even the 4 nodes, Help !!


Code:
char recu[100];
int i;

void setup(){
      Serial.begin(9600);
      delay(1000);
      command_mode();
      }

void loop() {
      
      i = 0 ;
      while ( Serial.available()==0 ){}
      while ( Serial.available()>0 )      {
            recu[i] = Serial.read();
           char octet = recu[i];
           i++;
           if (i>0) {
                  Serial.print(octet);
                  delay(300);
            }
      }
    
}

void command_mode(){

delay(1200);
  Serial.print("+++");
  delay(1200);
  bool bOK = false;
  while (Serial.available() > 0) {
    Serial.write(Serial.read());
     bOK = true;
  }
  
  if(bOK)
  {
    
    Serial.println();
    Serial.println("ATNI");
    delay(1000);
    read_data();
    delay(500);
    
    Serial.println("ATND");
}
}
void read_data(){
  byte data;
  while(Serial.available()){
    data=Serial.read();
    delay(1000);
    Serial.print(char(data));
    delay(500);
  }
Serial.flush();
}
4  Using Arduino / Networking, Protocols, and Devices / problem with Arduino /xbee on: July 07, 2013, 01:57:39 pm
Hi ,
 please , i'm stack here for a week :/
So i want to save the informations executed by the ATND command.
I have a network of 8 nodes , i wrote an arduino code to read the result of ATND command executed by each node,
then i'll use a data logger to save it into a file. 

So my proble , the code is good for 4 nodes, but any extensino of number of nodes , i can't get enough informations in the serial :/ :/

Please Has anyone any idea how to resolve it.
I'm guessing maybe it's a problem of time, cause when i write the command manually in the terminal , there's no problem,
And cause when i change the delay time , i get always a different result smiley-sad

help!!
Thanks smiley-cry
5  Using Arduino / Networking, Protocols, and Devices / Re: Localisation in Star topology on: July 04, 2013, 11:20:10 am
First of, thank you smiley
And yes , i meant upload to Arduino ,(just confused).

And here it is my Ardunio Code execution ATNI and ATND command, and then using processing , i save the resukt into files. So here my questionis if I could add to this code how to filter the result of the commands to take what i really want, Hope that u understand me.

-------------------------
// code coordinateur

  /* Moniteur-série
lit un message et annonce qu'il l'a reçu
*/
char recu[100];
//String response="";
int i;

void setup(){
      Serial.begin(9600);
     
      delay(1000);
      command_mode();
      }

void loop()   {
     
      i = 0 ;
      while ( Serial.available()==0 ){}
      while ( Serial.available()>0 )      {
            recu = Serial.read();
           char octet = recu;
           i++;
            //delay(300);
           
           if (i>0)   {
             
                  Serial.print(octet);
                  delay(300);
            }
      }
        
}

void command_mode(){

delay(1200);
  Serial.print("+++");
  delay(1200);
  bool bOK = false;
  while (Serial.available() > 0) {
    Serial.write(Serial.read());
     bOK = true;
  }
 
  if(bOK)
  {
   
    Serial.println();
    Serial.println("ATNI");
    delay(1000);
    read_data();
    delay(500);
   
    Serial.println("ATND");
   
   
}
}
void read_data(){
  byte data;
  while(Serial.available()){
    data=Serial.read();
    delay(1000);
    Serial.print(char(data));
    delay(500);
  }
Serial.flush();

}
------------------------------
6  Using Arduino / Networking, Protocols, and Devices / Localisation in Star topology on: July 04, 2013, 09:07:36 am
Hi ,

Plesae I need some help here:

So i'm working on localisation in star topology with 8 sensor nodes (Arduino + XBEE Serie 1 with USB cables not batteries)
I implemented an arduino code to execute the ATND command, then with processing i save the result in files.
Finally , I used java code to implement the positioning.

Now i'm wondering , Is it a good solution, or , i can't do it that way. And instead i should implement the positioning algorithm with Arduino and upload it on the XBEE's ( I tried this solution but I couldn't go on cause i couldn't filter the incoming bytes with Arduino for example to save the NI, RSSI....with Java it was easy using files and the arraylists).

Please Any idea to help me!

Thank you so much.
7  Using Arduino / Networking, Protocols, and Devices / Re: point to multipoint topology on: May 29, 2013, 03:56:33 am
yeah i have another explanation , i meant can I modify (this is what i meant by access ) properties of the MAC layer for example (i'm not as expert as you think).

And i'm not asking exactly for the permission (sorry about it) , but i'm asking if i could implement other applications (besides localisation) with xbee serie 1 , cause i'm limited with star topology for those xbee's.

Thnak you  smiley-zipper
8  Using Arduino / Networking, Protocols, and Devices / point to multipoint topology on: May 28, 2013, 10:16:45 am
Good evening smiley

First of, I want to konw If i  have access to layers of xbee serie 1? and if yes , which layers?

And please could anyone list me applications where i can use XBEE's serie 1 (802.15.4).
In fact , i'm working on my graduation project , and i don't have only those ones (with arduino and xbee shields)
i'm working now on localisation problem but i want to to know if i can add other applications to my work?

Thank you so much for your time.
9  Using Arduino / Networking, Protocols, and Devices / ATND command for xbee (serie 1) point to multipoint communication on: May 26, 2013, 07:23:06 am
Hi ,

please can anyone explain me how works the command ATDN
I mean sin a network with a coordinator and 4 end device (my example) ,
how a node (end device) execute the ATND command,
Exactly i'm wondering about the value Of RSSI returned , how it get it ??

Thank you so much.
10  Using Arduino / Networking, Protocols, and Devices / trilateration in star topology on: May 23, 2013, 10:57:42 am
HI ,
please , i want an explanation.

I'm working on  implementing a platform for localisation in wireless sensor networks.
I have only xbee 802.15.4 serie 1 , can't upgrade them (cause of the arduino xbee shield i have) so can't support mesh toplogy.

So i 'm wondering for a very long time how can i implement the trilateration with star topology, any ideas please??
11  Using Arduino / Networking, Protocols, and Devices / problem with xbee-api (xbee 802.15.4) on: May 20, 2013, 12:19:05 pm
HI ,
please i'm trying to use the xbee-api library  (run on eclipse )getting always this exception.
(I'm using xbee 802.15.4 s1 attached to arduino xbee shield attached to arduino)

Exception in thread "main" com.rapplogic.xbee.api.XBeeTimeoutException
   at com.rapplogic.xbee.api.XBee.sendSynchronous(XBee.java:236)
   at com.rapplogic.xbee.api.XBee.sendAtCommand(XBee.java:159)
   at com.rapplogic.xbee.examples.ApiAtTest.<init>(ApiAtTest.java:74)
   at com.rapplogic.xbee.examples.ApiAtTest.main(ApiAtTest.java:108)
[2013-05-18 14:36:06,723] [XBee Packet Parser Thread] [WARN] [com.rapplogic.xbee.api.XBeePacketParser] Packet parser thread was interrupted
[2013-05-18 14:36:06,724] [XBee Packet Parser Thread] [WARN] [com.rapplogic.xbee.api.XBeePacketParser] Packet parser thread is exiting

Could anyone help me please with a solution
Thank you !
12  Using Arduino / Networking, Protocols, and Devices / problem with xbee-api for XBEE SERIE 1 on: May 18, 2013, 08:48:53 am
HI ,
please i'm trying to use the xbee-api library to run my codes, but i tried version O.9 , version 0.5.5 and  0.5.1 (run on eclipse )getting always this exception.
(I'm using xbee 802.15.4 s1 attached to arduino xbee shield attached to arduino)

Exception in thread "main" com.rapplogic.xbee.api.XBeeTimeoutException
   at com.rapplogic.xbee.api.XBee.sendSynchronous(XBee.java:236)
   at com.rapplogic.xbee.api.XBee.sendAtCommand(XBee.java:159)
   at com.rapplogic.xbee.examples.ApiAtTest.<init>(ApiAtTest.java:74)
   at com.rapplogic.xbee.examples.ApiAtTest.main(ApiAtTest.java:108)
[2013-05-18 14:36:06,723] [XBee Packet Parser Thread] [WARN] [com.rapplogic.xbee.api.XBeePacketParser] Packet parser thread was interrupted
[2013-05-18 14:36:06,724] [XBee Packet Parser Thread] [WARN] [com.rapplogic.xbee.api.XBeePacketParser] Packet parser thread is exiting

Could anyone help me please with a solution smiley-sad
Thank you !
13  Using Arduino / Project Guidance / Re: upgrading xbee serie 1 on: May 01, 2013, 01:51:25 pm
euuu xbee pro (designed by arduino and libellium).
https://www.google.tn/search?q=xbee+shield+pro&source=lnms&tbm=isch&sa=X&ei=lWOBUc2EM8TMhAfRiIHACQ&ved=0CAoQ_AUoAQ&biw=1366&bih=643#imgrc=SdZ3r5lWqsoM5M%3A%3BFuYlvej-fZ2nOM%3Bhttp%253A%252F%252Fwww.matlog.com%252F181-818-thickbox%252Fxbee-shield-arduino.jpg%3Bhttp%253A%252F%252Fwww.matlog.com%252Fcalculateurs-microcontroleurs%252Fmicrocontroleurs-arduino%252Fxbee-shield-arduino.html%3B600%3B600
14  Development / Other Hardware Development / Re: upgrading xbee serie1 on: May 01, 2013, 09:39:25 am
PS : i'm using arduino uno + arduino xbee shield +xb24.
15  Using Arduino / Project Guidance / upgrading xbee serie 1 on: May 01, 2013, 09:38:55 am
Hi everyone ,
please after a long discussion with DIGI about the problem i have with my xbee's serie 1 802.15.5 version 10EC, they answered e as above:

--------------------
In order to perform a firmware upgrade, you need to have VCC, GND, DI, DO, RTS and DTR connected. I believe the Arduino Shields do not connect these lines from the PC to the XBee module. However you will want to verify that with the manufacture of the board in question.  I think you will find that most 3rd party board will generally only connect Data in and Data out in addition to VCC and GND.
-------------------

So anyone could help me with that o.O I didn't understand wthat should i do ?
(i'm using arduino uno+xbee shield +xbee)

Thank you.
Pages: [1] 2