Post a new topicPost a reply Page 2 of 2   [ 14 posts ]
Go to page Previous  1, 2
Author Message
 Post subject: Re: Need suggestion "the communication between PC and waspmote"
PostPosted: Tue Jan 24, 2012 6:33 pm 

Joined: Mon Nov 21, 2011 3:24 pm
Posts: 16
Dear libelium-dev,

Good afternoon. Thank you for your kind reply.

Now it is succussed, both "waspmote to gateway" and "waspmote to waspmote", the reason is that one of the Xbee(digi international) can't create network, so I tried to use X-CTU, updating its version same as the good Xbee, then change the API=2, Channel and PANID are same as the good one too. Broadcast and Unicast are both ok. Thank you so much!

Now, my next objective(under 802.15.4): A send data to B, A is Waspmote, B is Waspmote or Gateway, B is connected to the PC, I want to use PC to manage the B, like sending back the ACK, sending a command from B to A.

From A to B, we can achieve, but from B(gateway) to A, I used java to write some codes, and we follow the guide "waspmote-802.15.4-networking_guide.pdf" to organize the data structure, A received nothing. I do not know why?

For achieve the communication from B to A, using Waspmote as B or using Gateway as B, which one is better for my project, any suggestion?

Java code
Code:
byte[] packet= new byte[30];      
InputStream is;   
OutputStream os;
SerialPort serialPort;
serialPort = (SerialPort) portId.open("MYPort", 2000);
serialPort.setSerialPortParams(38400,//BaudRate
                    SerialPort.DATABITS_8,//Databits
                    SerialPort.STOPBITS_1,// Stopbits
                    SerialPort.PARITY_NONE);// Parity

 os = new BufferedOutputStream(serialPort.getOutputStream());
is = new BufferedInputStream(serialPort.getInputStream());

//prepare data
int macGW[] = {0x00, 0x13, 0xA2, 0x00, 0x40,0x4A,0x38,0xA0};
int macMote[] = {0x00, 0x13, 0xA2, 0x00, 0x40, 0x69, 0x18,0xA7};     

int i = 0;
int j = 0;         
//start Byte
packet[i++] = 0x7E;
//lenght
packet[i++] = 0x00;
packet[i++] = 0x18;
//API ID
packet[i++] = 0x10;
//FRAME ID
packet[i++] = 0x01;
 //MAC Destination
 for (j=0; j < 8 ; j++) {
    packet[i++] = (byte) macMote[j];
 }
 //Options
 packet[i++] =0x00;
 //Application ID
 packet[i++] = 0x52;
 //Fragment Numer
 packet[i++] = 0x01;
 //First Number
 packet[i++] = 0x23;
 //Source type ID
 packet[i++] = 0x01;
 //Mac Source
 for (j=0; j < 8 ; j++) {
    packet[i++] = (byte) macGW[j];
 }
 //data
 packet[i++] = 0x01;
 packet[i++] = checksum(packet);
os.write(packet);


Thanks again.

Best Regards,
cyyss


Top
 Profile  
 
 Post subject: Re: Need suggestion "the communication between PC and waspmote"
PostPosted: Wed Jan 25, 2012 5:46 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
cyyss,

We can not support you because this parts goes beyond Waspmote.

You can choose for PC side a gateway or a Waspmote depending of what you are going to do.

Sorry about that.

Regards!


Top
 Profile  
 
 Post subject: Re: Need suggestion "the communication between PC and waspmote"
PostPosted: Tue Mar 27, 2012 9:59 am 

Joined: Thu Mar 01, 2012 10:33 am
Posts: 3
Did you manage to send data through the Waspmote Gateway?
I'm trying to do the same as you and I achive to blink the gateway leds as it was sending, but the frame is not well construct I suppose.
Have you tried with "AT Commands"?

Wishing to here about you cyyss..


Top
 Profile  
 
 Post subject: Re: Need suggestion "the communication between PC and waspmote"
PostPosted: Tue Apr 17, 2012 9:23 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7455
Arojo,

Your post was missed. We apologize.

What are you trying to do exactly? Can you describe your purposes?

You probably know that but you have Xbee AT command description available into Digi's Website.

Regards.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post a new topicPost a reply Page 2 of 2   [ 14 posts ]
Go to page Previous  1, 2


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:


Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Libelium theme based on 610nm Style by Daniel St. Jules of http://www.gamexe.net


© Libelium Comunicaciones Distribuidas S.L. | Terms of use