Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
ssergeievich
PostPosted: Apr 09, 2012 - 10:44 AM
Newbie


Joined: Nov 24, 2008
Posts: 17


Ok than, is the PeerToPeer source code similar to the, let's say SerialNet_ZigBit_Rf230.hex and what are basic differences, in short?

And what about limitation of SerialNet_ZigBit_Rf230.hex firmware concerning number of nodes in network like in P2P example?

Thanks alexru!
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 09, 2012 - 03:55 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

Perr2Peer is just simple application that is limited to 8 nodes and only pairs of nodes can send data to each other.

SerialNet has a complete command-line serial interface; there are limitations in SerialNet but they will be a problem after 50-70 devices in the network.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
barjaktar
PostPosted: Apr 09, 2012 - 04:56 PM
Rookie


Joined: Apr 20, 2011
Posts: 40


Question moved to:

http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=944481#944481


Last edited by barjaktar on Apr 09, 2012 - 06:16 PM; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
ssergeievich
PostPosted: Apr 09, 2012 - 05:44 PM
Newbie


Joined: Nov 24, 2008
Posts: 17


Thank you alexru once again!

I am facing a new problem with my network. When I set up a network with 1 Coordinator, 1 Router and 1 End node (which has +wpwr=100,100) everything works just fine. But, if I change the sleep/active ratio to 60s/1s, after a while my End node gets lost. Is there any technique to reset it?(The +wautonet property is set to 1, so I guess it should hook up to the network after restart). The same problem appears when coordinator node is powered after powering up other nodes.

So, my question is how to reset other nodes and enforce them to connect to the just formed network - upon booting up of the coordinator node?

Best regards,
Sergei
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 09, 2012 - 05:48 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

1. You should have the same setting for +wpwr on all devices in the network.
2. What do you mean by "gets lost"?
3. With autonet=1 node should resolve such problems by itself, without restarting.


barjaktar, please separate your question to another topic.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
barjaktar
PostPosted: Apr 09, 2012 - 06:12 PM
Rookie


Joined: Apr 20, 2011
Posts: 40


All right, I am sorry. I just thought that the generality of the topic title encloses my problem also.
 
 View user's profile Send private message  
Reply with quote Back to top
ssergeievich
PostPosted: Apr 09, 2012 - 07:00 PM
Newbie


Joined: Nov 24, 2008
Posts: 17


Is it mandatory for all of them to have the same +wpwr settings? Let's say that Coordinator node is connected to the PC, and it doesn't have to go to sleep mode.

By gets lost I mean it's lost from the net and never gets back on to it even with +wautonet=1 parameter.

BR,
Sergei
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 09, 2012 - 07:01 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

Yes, it is mandatory, parents keep track of their children, so they need to know how often children will be awake.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
ssergeievich
PostPosted: Apr 09, 2012 - 07:20 PM
Newbie


Joined: Nov 24, 2008
Posts: 17


Sorry alexru if I bother you, but I have another question.

May I ask why this application is not available as free and is it available for buying?

How hard would it be to implement such firmware like SerialNet using BitCloud SDK or just a part of it with basic functionality? The main reason for this is that the MCU that this module uses is powerful enough to run some simple additional routines,
without need for engaging other MCU and UART communication to module.

Thank you alexru for all your help, time and patience answering my questions!

Best regards,
Sergei

P.S. Maybe I sound silly like one kid who asked how hard would it be for him as a beginner in C programming to make his own Windows OS. Laughing
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 09, 2012 - 08:31 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

ssergeievich wrote:
May I ask why this application is not available as free and is it available for buying?
It is not my decision, but I assume it will create more load on a support side of things. It can be obtained under NDA.

ssergeievich wrote:
How hard would it be to implement such firmware like SerialNet using BitCloud SDK or just a part of it with basic functionality?
That depends on your skills, but in general it is not hard at all. And it will be easier for you instead of implementing complex application that takes into account all possible scenarios, implement simple application that does exactly want you need.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
ssergeievich
PostPosted: Apr 09, 2012 - 09:21 PM
Newbie


Joined: Nov 24, 2008
Posts: 17


Just tell me what is a got place to start and are all necessary functions in BitCloud SDK? Some basic project would help me - is it the P2P example, or some other?

Because I'm new in AVR (have used other Atmel and PIC MCUs), what compiler and IDE for Windows do you recommend me?

That's all! I won't bother you again. Smile Thank you very much, or should I say спасибо

Regards,
Sergei
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 09, 2012 - 09:25 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

ssergeievich wrote:
Just tell me what is a got place to start and are all necessary functions in BitCloud SDK?
Start by getting familiar with BitCloud applications. All functions are available in the SDK, SerialNet is just an application like any other application.

ssergeievich wrote:
It would help me some basic project - is it the P2P example, or some other?
Different sample applications show different scenarios, start with whatever is closer to yours.

ssergeievich wrote:
Because I'm new in AVR (have used other Atmel and PIC MCUs), what compiler IDE for Windows do you recommend me?
Totally depends on your preferences, I use text editor, WinAVR and Makefiles.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
ssergeievich
PostPosted: Apr 19, 2012 - 06:29 PM
Newbie


Joined: Nov 24, 2008
Posts: 17


Hello alexru, guys,

I can not find information about ATZB AD Convertor resolution when using SerialNet Application. Is it just 8bit or else?

For a correct ADC readouts via AT commands, correct me if I am wrong, I need to connect A_Vref (pin 34) to the D_Vcc (3.3V), set ADC ATS100=F (all 4 channels) and read it with ATS10x? where x = [1,2,3,4]

When no voltage is applied to A_Vref pin and AD pins also float, is it correct if readouts are equal to 255 for all ADC S registers?

BR,
Sergei
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 19, 2012 - 09:04 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

Yes, it is 8-bit sample.

I have no idea what happens when pins are floating.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
ssergeievich
PostPosted: Apr 20, 2012 - 09:38 AM
Newbie


Joined: Nov 24, 2008
Posts: 17


And what about a proper connection of A_Vref pin?
Quote:
For a correct ADC readouts via AT commands, correct me if I am wrong, I need to connect A_Vref (pin 34) to the D_Vcc (3.3V), set ADC ATS100=F (all 4 channels) and read it with ATS10x? where x = [1,2,3,4]

Is this procedure correct?

BR,
Sergei
 
 View user's profile Send private message  
Reply with quote Back to top
ssergeievich
PostPosted: Apr 20, 2012 - 10:32 AM
Newbie


Joined: Nov 24, 2008
Posts: 17


I've just found the correct manual which states that ADC Reference voltage should be in range from 1V to Vcc-3!? This is a little bit awkward, because with voltage supply with max. rating of 3.6V, range would be 1V to 0.6V.

I don't want to damage my ZigBit modules, so please advise me regarding this issue.

Also, the manual says that the ADC Resolution is 10bits. This is probably the MCU ADC resolution, where the SerialNet App. disregards higher byte of the sample (upper 2 bits). Please, comment...

Regards,
Sergei
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 20, 2012 - 04:23 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

Which manual is "correct"? ZigBit has ATmega1281 inside, and datasheet says:

Reference Voltage
Single Ended Conversion min=1.0 max=AVCC
Differential Conversion min=1.0 max=AVCC - 0.5V

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
ssergeievich
PostPosted: Apr 23, 2012 - 09:59 AM
Newbie


Joined: Nov 24, 2008
Posts: 17


Quote:
Which manual is "correct"?

This topic is about ATZB, so the manual is appropriate datasheet - related to ATZB-24-A2. This datasheet states:
Quote:
... ADC Reference voltage should be in range from 1V to Vcc-3!?

Is it a type mismatch in ATZB-24-A2/B0 datasheet or what? (It might be Vcc-0.3V)
I think that my questions/comments are clear enough to be answered/commented...
Anyway, thank you for your help so far.
 
 View user's profile Send private message  
Reply with quote Back to top
alexru
PostPosted: Apr 23, 2012 - 03:52 PM
Raving lunatic


Joined: Apr 15, 2009
Posts: 4869
Location: San Jose, CA

It looks like a typo in the datasheet, just look at atmega1281 datasheet.

Anyway it is extremely hard to kill ZigBit by applying voltages within 3.5V to any pins in any combinations.

_________________
The opinions and views expressed by me on this forum are my own and do not represent my employer or anyone else that I’m affiliated with.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
gatebit
PostPosted: Jul 17, 2012 - 11:13 AM
Newbie


Joined: Jul 17, 2012
Posts: 6


Hi everyone!

I just started working with ATMEL ZigBit modules and I am having problem with the testing of the sample programs supplied with the latest (1.14) BitCloud stack.

I would like to run the ThrougputTest demo. If I compile to code for acting as a Coordinator everything is fine. The ZigBit module works as expected, I can see the messages in the Hyperterminal.
However, if I complie the code for acting as a Router something is wrong with the Network joining procedure. The code is running on the module (Network joining indicator LED is flashing), but it can not connect to the network of the Coordinator. It stays in "Network finding" state.
I have already tried to investigate what is going on and I find a very strange thing:
I have modified the ZDO_StartNetworkConf function in the following way to find out the problem:

Code:

static void ZDO_StartNetworkConf(ZDO_StartNetworkConf_t *confirmInfo)
{
  if (ZDO_SUCCESS_STATUS == confirmInfo->status)
  {
       static uint8_t msgBuf[] = "CONNECTED!!!!\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);

     HAL_StopAppTimer(&startingNetworkTimer);
      BSP_OnLed(NETWORK_LED); // Indicate successful network join by turning LED on

      appState = APP_IN_NETWORK_STATE; // Switch state

      // Register endpoint
      APS_RegisterEndpointReq(&endpointParams);

     // Configure and start delay timer
     delayTimer.interval = APP_TIMER_DELAY_PERIOD;
     delayTimer.mode     = TIMER_ONE_SHOT_MODE;
     delayTimer.callback = delayTimerFired;
     HAL_StartAppTimer(&delayTimer);
  } else if(confirmInfo->status == ZDO_INVALID_PARAMETERS_STATUS) {
   //  Wrong parameters were put into the primitive.
     static uint8_t msgBuf[] = "Error: 1\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
  } else if(confirmInfo->status == ZDO_BUSY_STATUS) {
   //  ZDO layer is busy and cannot execute the primitive.
     static uint8_t msgBuf[] = "Error: 2\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
  } else if(confirmInfo->status == ZDO_NO_NETWORKS_STATUS) {
   //  No network was found.
     static uint8_t msgBuf[] = "Error: 3\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
  } else if(confirmInfo->status == ZDO_EXTPANID_ALREADY_EXIST_STATUS) {
   //  There is a network with the same extended PANID.
     static uint8_t msgBuf[] = "Error: 4\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
  } else if(confirmInfo->status == ZDO_FAIL_STATUS) {
   //  Unknown error.
     static uint8_t msgBuf[] = "Error: 5\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
  } else if(confirmInfo->status == ZDO_CMD_COMPLETED_STATUS) {    
     static uint8_t msgBuf[] = "Error: 6\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);

  } else if(confirmInfo->status == ZDO_NO_KEY_PAIR_DESCRIPTOR_STATUS) {
   //  Trust center could not find key pair descriptor to authenticate device.
     static uint8_t msgBuf[] = "Error: 7\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_UPDATE_LINK_KEY_STATUS) {
   //  Link key for device was updated.
     static uint8_t msgBuf[] = "Error: 8\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_UPDATE_MASTER_KEY_STATUS) {
   //  Master key for device was updated.
     static uint8_t msgBuf[] = "Error: 9\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_DELETE_KEY_PAIR_STATUS) {
   //  Key pair descriptor was deleted.
     static uint8_t msgBuf[] = "Error: 10\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_DELETE_LINK_KEY_STATUS) {
   //  Link key for device was deleted.
     static uint8_t msgBuf[] = "Error: 11\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_TC_NOT_AVAILABLE_STATUS) {
   //  TC is not responding to keep-alive requests.
     static uint8_t msgBuf[] = "Error: 12\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_INVALID_REQUEST_STATUS) {
   //  ZDP request is invalid.
     static uint8_t msgBuf[] = "Error: 13\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_DEVICE_NOT_FOUND_STATUS) {
   //  Requested device was not found.
     static uint8_t msgBuf[] = "Error: 14\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_INVALID_EP_STATUS) {
   //  Unsupported endpoint of 0x00 or between 0xF1 and 0xFF was requested.
     static uint8_t msgBuf[] = "Error: 15\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NOT_ACTIVE_STATUS) {
   //  Requested endpoint has not been registered.
     static uint8_t msgBuf[] = "Error: 16\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NOT_SUPPORTED_STATUS) {
   //  Requested optional feature is not supported.
     static uint8_t msgBuf[] = "Error: 17\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_TIMEOUT_STATUS) {
   //  Timeout occured during the requested operation.
     static uint8_t msgBuf[] = "Error: 18\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NO_MATCH_STATUS) {
   //  End device bind request is unsuccessful due to a failure to match any suitable clusters.
     static uint8_t msgBuf[] = "Error: 19\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NO_ENTRY_STATUS) {
   //  Unbind request is unsuccessful.
     static uint8_t msgBuf[] = "Error: 20\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NO_DESCRIPTOR_STATUS) {
   //  Child descriptor is not available.
     static uint8_t msgBuf[] = "Error: 21\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_INSUFFICIENT_SPACE_STATUS) {
   //  Device does not have enough storage space.
     static uint8_t msgBuf[] = "Error: 22\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NOT_PERMITTED_STATUS) {
   //  The device does not have storage space to support the requested operation.
     static uint8_t msgBuf[] = "Error: 23\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_TABLE_FULL_STATUS) {
   //  Device does not have enough table space.
     static uint8_t msgBuf[] = "Error: 24\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NOT_AUTHORIZED_STATUS) {
   //  Request is not authorized from this device.
     static uint8_t msgBuf[] = "Error: 25\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NWK_UPDATE_STATUS) {
   //  Network parameters have been updated (channel, PanId, shortAddr...)
     static uint8_t msgBuf[] = "Error: 26\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NETWORK_STARTED_STATUS) {
   //  Device has joined/rejoined a network and data can be transmitted.
     static uint8_t msgBuf[] = "Error: 27\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NETWORK_LOST_STATUS) {
   //  Device has lost connection with a parent and the stack tries rejoin by itself. In this case transmission should be stopped.
     static uint8_t msgBuf[] = "Error: 28\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_NETWORK_LEFT_STATUS) {
   //  Device has left a network. If autonetwork option is on, the stack will rejoin a network. Otherwise, an application should rejoin.
     static uint8_t msgBuf[] = "Error: 29\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_CHILD_JOINED_STATUS) {
   //  New device has joined a network as a child of this device.
     static uint8_t msgBuf[] = "Error: 30\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_CHILD_REMOVED_STATUS) {
   //  Child has been removed from children list.
     static uint8_t msgBuf[] = "Error: 31\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_USER_DESCRIPTOR_UPDATE_STATUS) {
   //  User descriptor is changed event.
     static uint8_t msgBuf[] = "Error: 32\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
 
  } else if(confirmInfo->status == ZDO_STATIC_ADDRESS_CONFLICT_STATUS) {
   //  On the device with static addressing the conflict of network addresses has been detected.
     static uint8_t msgBuf[] = "Error: 33\r\n"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
  }   
  else
  {
     static uint8_t msgBuf[] = "Strange ERROR!"; // Buffer UART message
     appWriteDataToUart(msgBuf, sizeof(msgBuf)-1);
       BSP_ToggleLed(DATA_TX_LED);

    SYS_PostTask(APL_TASK_ID);
  }
}


(Sorry for the long code)
So I basically test every possible status state, but always the last(!) else block is executed.

Has anyone had similar problem? Any idea what can cause this behavior?

I am using the makefile for the MESHBEAN board, however I have just a simple ZigBit module with some LEDs and a FTDI UART (so no development board).
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits