Post a new topicPost a reply Page 1 of 3   [ 22 posts ]
Go to page 1, 2, 3  Next
Author Message
 Post subject: Problem WIFI comunication
PostPosted: Wed Dec 14, 2011 5:33 pm 

Joined: Wed Oct 12, 2011 1:20 pm
Posts: 7
Hi

I have a problem wifi comunicaction. The wifi example doesn't work to me...I have uploaded the example of wifi that I found in waspmote software. As you can see in the image, I have received symbols

http://imageshack.us/photo/my-images/847/com30.jpg/


Thank you


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Wed Dec 14, 2011 6:18 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Dear HBY,

What example do you mean? Can you post the link?

Anyhow, it could be a confusion in the Waspmote configuration. Have you tried the basic examples before going to the communications?

I can see from your desktop that you are using Windows 98 or 95. Please note Waspmote is not prepared for such old OSs.

Best regards


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Sat Dec 17, 2011 8:50 pm 

Joined: Wed Oct 12, 2011 1:20 pm
Posts: 7
I am using Windows Vista but with a simple configuration in order to work better. Waspmote work fine, it's not the first application that I have done, maybe Xbee doesn't work properly, I don't know. This is the code I'm using:

Quote:
/*
 *  ------Waspmote XBee 802.15.4 Sending & Receiving Example------
 *
 *  Explanation: This example shows how to send and receive packets
 *  using Waspmote XBee 802.15.4 API
 *
 *  This code sends a packet to another node and waits for an answer from
 *  it. When the answer is received it is shown.
 *
 *  Copyright (C) 2009 Libelium Comunicaciones Distribuidas S.L.
 *  http://www.libelium.com
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 2 of the License, or
 *  (at your option) any later version.
 * 
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 * 
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  Version:                0.2
 *  Design:                 David Gascón
 *  Implementation:    Alberto Bielsa
 */
 
 packetXBee* paq_sent;
 int8_t state=0;
 long previous=0;
 char* data="Test message!";
 int g=0;
   uint8_t  PANID[2]={0x12,0x34};
 
void setup()
{
  // Inits the XBee 802.15.4 library
  xbee802.init(XBEE_802_15_4,FREQ2_4G,NORMAL);
  
  // Powers XBee
  xbee802.ON();
}

void loop()
{
  // Set params to send
  paq_sent=(packetXBee*) calloc(1,sizeof(packetXBee)); 
  paq_sent->mode=BROADCAST;
  paq_sent->MY_known=0;
  paq_sent->packetID=0x52;
  paq_sent->opt=0; 
  xbee802.hops=0;
  xbee802.setOriginParams(paq_sent, "5678", MY_TYPE);
  xbee802.setDestinationParams(paq_sent, "0013A2004052414B", data, MAC_TYPE, DATA_ABSOLUTE);
  xbee802.sendXBee(paq_sent);
  if( !xbee802.error_TX )
  {
    XBee.println("ok");
  }
  free(paq_sent);
  paq_sent=NULL;
  
  // Waiting the answer
  previous=millis();
  while( (millis()-previous) < 20000 )
  {
    if( XBee.available() )
    {
      xbee802.treatData();
      if( !xbee802.error_RX )
      {
        // Writing the parameters of the packet received
        while(xbee802.pos>0)
        {
          XBee.print("Network Address Source: ");
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->naS[0],HEX);
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->naS[1],HEX);
          XBee.println("");
          XBee.print("MAC Address Source: ");
          for(int b=0;b<4;b++)
          {
            XBee.print(xbee802.packet_finished[xbee802.pos-1]->macSH[b],HEX);
          }
          for(int c=0;c<4;c++)
          {
            XBee.print(xbee802.packet_finished[xbee802.pos-1]->macSL[c],HEX);
          }
          XBee.println("");
          XBee.print("Network Address Origin: ");
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->naO[0],HEX);
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->naO[1],HEX);
          XBee.println("");
          XBee.print("MAC Address Origin: ");
          for(int d=0;d<4;d++)
          {
            XBee.print(xbee802.packet_finished[xbee802.pos-1]->macOH[d],HEX);
          }
          for(int e=0;e<4;e++)
          {
            XBee.print(xbee802.packet_finished[xbee802.pos-1]->macOL[e],HEX);
          }
          XBee.println("");
          XBee.print("RSSI: ");
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->RSSI,HEX);
          XBee.println("");
          XBee.print("16B(0) or 64B(1): ");
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->mode,HEX);
          XBee.println("");
          XBee.print("Data: ");
          for(int f=0;f<xbee802.packet_finished[xbee802.pos-1]->data_length;f++)
          {
            XBee.print(xbee802.packet_finished[xbee802.pos-1]->data[f],BYTE);
          }
          XBee.println("");
          XBee.print("PacketID: ");
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->packetID,HEX);
          XBee.println("");
          XBee.print("Type Source ID: ");
          XBee.print(xbee802.packet_finished[xbee802.pos-1]->typeSourceID,HEX);
          XBee.println("");
          XBee.print("Network Identifier Origin: ");
          while( xbee802.packet_finished[xbee802.pos-1]->niO[g]!='#' )
          {
            XBee.print(xbee802.packet_finished[xbee802.pos-1]->niO[g],BYTE);
            g++;
          }
          g=0;
          XBee.println("");
          free(xbee802.packet_finished[xbee802.pos-1]);
          xbee802.packet_finished[xbee802.pos-1]=NULL;
          xbee802.pos--;
        }
        previous=millis();
      }
    }
  }

  delay(1000);
}





Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Mon Dec 19, 2011 11:16 am 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Dear HBY,

Did you check the Waspmote checklist? Maybe your Xbee module has not the right parameters. Check them using the X-CTU tool from digi. viewtopic.php?f=14&t=7700

Apart of that, when you talk about wifi modules, We guess that your are talking about Xbee modules which are WSN 802.15.4.

Let us know if you are success.

Kind regards.


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Tue Dec 20, 2011 6:12 pm 

Joined: Wed Oct 12, 2011 1:20 pm
Posts: 7
I have done the checking but it doesn't work. What can I do?


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Tue Dec 20, 2011 6:15 pm 

Joined: Wed Oct 12, 2011 1:20 pm
Posts: 7
I'm working with Xbee module(WSN 802.15.4) sorry


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Wed Dec 21, 2011 1:44 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi,

Please, start uploading the 'WaspXBee802_1_creatingNetwork' example and run it with all your XBee modules. This way you will set the same network configuration in all your XBee modules.
Secondly, You can run the sending receiving examples in two Waspmotes. Or you can develop your own code in order to send data to your gateway.
Anyway, please check the networking guides before developing any code with your XBee modules: http://www.libelium.com/documentation/waspmote/waspmote-802.15.4-networking_guide.pdf

Best regards


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Mon Jan 02, 2012 7:17 pm 

Joined: Wed Oct 12, 2011 1:20 pm
Posts: 7
I am going to describe the steps that I have followed:

- I have uploaded "WaspXBEE802_creatingnetwork" to my Waspmote without XBEE
- I have conected the XBEE module
- I have run the code in waspmote with XBEE
- I have repeated the opetarion with the other one XBEE module.
- I have uploaded the code "WaspmXBEE802_2_sending_receiving" to my Waspmote
- I have connected the XBEE to Waspmote
- I have connected another XBEE to the USB comunication card

I have the same result...What am I doing wrong?


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Tue Jan 03, 2012 7:21 pm 

Joined: Mon Sep 28, 2009 1:06 pm
Posts: 7440
Hi,

HBY wrote:
I am going to describe the steps that I have followed:

- I have uploaded "WaspXBEE802_creatingnetwork" to my Waspmote without XBEE
- I have conected the XBEE module
- I have run the code in waspmote with XBEE
- I have repeated the opetarion with the other one XBEE module.
- I have uploaded the code "WaspmXBEE802_2_sending_receiving" to my Waspmote
- I have connected the XBEE to Waspmote
Everything ok until here
HBY wrote:
- I have connected another XBEE to the USB comunication card
I guess you mean the gateway, right?

The "WaspXBEE802_2_sending_receiving" example you say you uploaded to Waspmote will broadcast every 20 seconds a new XBee packet to all nodes in the network. So there shouldn't be any problem. What tool do you use in order to show the data received in your gateway? Posibilities: Hyperterminal? Cutecom? WaspmoteIDE?

Best regards


Top
 Profile  
 
 Post subject: Re: Problem WIFI comunication
PostPosted: Tue Jan 17, 2012 4:12 pm 

Joined: Tue Jan 17, 2012 1:53 pm
Posts: 41
Hi,

I´m also trying to build a wireless comunication between the XBee 802.15.4 PRO modules.

I´ve follow the steps as HBY does but I have a different problem. When compiling the "WaspmXBEE802_2_sending_receiving" exaple, I get the following compilation error:

Code:
C:\Users\ASIERS~1\AppData\Local\Temp\build5180997031691236094.tmp\core.a(WaspUtils.cpp.o): In function `WaspUtils::writeEEPROM(int, unsigned char)':

C:\Libelium\waspmote-ide-v.01-windows\hardware\cores\waspmote-api-v.022/WaspUtils.cpp:387: undefined reference to `__eewr_byte_m1281'

C:\Users\ASIERS~1\AppData\Local\Temp\build5180997031691236094.tmp\core.a(WaspUtils.cpp.o): In function `WaspUtils::readEEPROM(int)':

C:\Libelium\waspmote-ide-v.01-windows\hardware\cores\waspmote-api-v.022/WaspUtils.cpp:375: undefined reference to `__eerd_byte_m1281'


I've also notice that the exaple that uses the EEPROM "WaspUtils_1_EEPROM" doesn't work either.
What could be the problem?

Regards,

Aitor


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


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