Author Topic: WSN monitor not showing router.It only shows coordinator  (Read 1710 times)

0 Members and 1 Guest are viewing this topic.

umamaheswary

  • Guest
WSN monitor not showing router.It only shows coordinator
« on: May 26, 2016, 06:22:06 am »
I have downloaded the bitcloud SDK for avr-atmega256rfr2  MCU from http://www.atmel.com/tools/BITCLOUD-ZIGBEEPRO.aspx.I started with WSNdemo application.I am using custom board .As specified in the developers guide I changed the configuration file of the app.Then i compiled the application(make clean all).I am working with one coordiantor and one router.After programming the device I used WSN monitor to view the nodes.At this time I can see only the coordinator no  routers.The CS_UID has set different for each device.I am attaching the configutaion file for both coordinator and router.Let me know what iam missing.
« Last Edit: May 26, 2016, 06:29:25 am by umamaheswary »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6009
  • Country: us
    • Personal site
Re: WSN monitor not showing router.It only shows coordinator
« Reply #1 on: May 26, 2016, 07:34:49 am »
You made too many changes that don't make nay sense (CS_NWK_UNIQUE_ADDR, CS_SECURITY_ON, etc).

Start with a fresh config and make only minimally required changes (device type and CS_UID).
Alex
 

umamaheswary

  • Guest
Re: WSN monitor not showing router.It only shows coordinator
« Reply #2 on: May 26, 2016, 09:29:27 am »
Thank you So much ....It worked.As u said I start with fresh code.In configuration.h I added CS_DEVICE_TYPE and CS_UID and  APP_DEVICE_TYPE as follows:
for coordinator:

CS_DEVICE_TYPE DEVICE_TYPE_COORDINATOR
CS_UID 0x3333LL
APP_DEVICE_TYPE DEVICE_TYPE_COORDINATOR

for Router:
CS_DEVICE_TYPE DEVICE_TYPE_ROUTER
CS_UID 0x3344LL
APP_DEVICE_TYPE DEVICE_TYPE_ROUTER  :) :) :) Sorry for my all mistake

one more doubt if I need to connect some external sensor to my custom board which port to prefer??also where can I get this sensor data in the WSNdemo code

Code: [Select]
void BSP_ReadTempSensor(int16_t *value)
{
  /* Read measured temperature sensor */
  *value = (int16_t)rand();
}
shall I edit this line to read data from my external sensor?
« Last Edit: July 25, 2016, 04:35:11 am by umamaheswary »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6009
  • Country: us
    • Personal site
Re: WSN monitor not showing router.It only shows coordinator
« Reply #3 on: May 26, 2016, 04:03:16 pm »
one more doubt if I need to connect some external sensor to my custom board which port to prefer??also where can I get this sensor data in the WSNdemo code
I don't understand the question. Read the sensor however you like and put it into a data structure. You will have to study the code to understand how it is all working.
Alex
 

umamaheswary

  • Guest
Re: WSN monitor not showing router.It only shows coordinator
« Reply #4 on: May 28, 2016, 04:05:27 am »
I found in WSNSensorManager.c  the statement
 appNwkInfo.boardInfo.meshbean.temperature = CPU_TO_LE32(temperature); in temperatureDataReady() function.Is this  the data structure to assign temperature data??
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6009
  • Country: us
    • Personal site
Re: WSN monitor not showing router.It only shows coordinator
« Reply #5 on: May 28, 2016, 04:58:31 am »
This is the assignment. What is your final goal for all of this?
Alex
 

umamaheswary

  • Guest
Re: WSN monitor not showing router.It only shows coordinator
« Reply #6 on: May 28, 2016, 05:37:43 am »


I have one custom board.To which I have to connect external sensor(to one of the ADC channels) for reading temperature data .Then need to send this  temperature data to coordinator.In  WSNRouter.c I have seen that  the  function call of  appGetSensorData() inturn calls

BSP_ReadTemperatureData(temperatureDataReady), BSPRESDSENSORDATAASSERT_0);
finally the assignment in  temperatureDataReady().So I modified the temperatureDataReady function as follows:
 
 appNwkInfo.boardInfo.meshbean.temperature=CPU_TO_LE32(//Read data from ADC channel).Shall I get this ADC channel data from router  to coordinator.is this the place where I can insert code to read data from ADC channel.Please reply
« Last Edit: May 28, 2016, 09:10:17 am by umamaheswary »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6009
  • Country: us
    • Personal site
Re: WSN monitor not showing router.It only shows coordinator
« Reply #7 on: May 28, 2016, 05:42:02 am »
is this the place where I can insert code to read data from ADC channel.
Yes, this is the place. But here are two things:
1. Why don't just try? Insert a dummy constant value and see that it got sent to the coordinator for a test.
2. BitCloud (and ZigBee in general) is very hard to program. You are expected to have perfect knowledge of embedded C.
Alex
 

umamaheswary

  • Guest
Re: WSN monitor not showing router.It only shows coordinator
« Reply #8 on: May 28, 2016, 06:06:19 am »
Yes.I tried with a constant value  and I got the value in coordinator . Once again thanks for your support.
« Last Edit: May 28, 2016, 09:09:32 am by umamaheswary »
 

umamaheswary

  • Guest
Re: WSN monitor not showing router.It only shows coordinator
« Reply #9 on: June 02, 2016, 08:27:28 am »
I tried WSNDemo app in atmega256rfr2 custom board .It Worked.Now Am trying the same application in another custom board.The only difference between the previous board and new one is in uart.The previous one uses uart channel 0 and the new one uses uart channel 1.So in configuration.h file I set  #define APP_USART_CHANNEL USART_CHANNEL_1.Here I can see that the for loop in WSNDemo app.c  after the SYS_SysInit() function  is not working
Code: [Select]
for(;;)
  {
    SYS_RunTask(); // control is not getting into this loop
  }

 In SYS_SysInit() function I have  these functions
 
Code: [Select]
SYS_InitStatus_t SYS_SysInit(void){
           HAL_Init();   
           SYS_InitLog();
          #if defined(_SYS_MAC_PHY_HWD_TASK_) && !defined(ZAPPSI_HOST)
             if (!RF_Init())     // It must be after HAL_Init()
               {
                    return RF_NOT_RESPOND;
               }
          #endif // _SYS_MAC_PHY_HWD_TASK_

          SYS_PostTask(APL_TASK_ID);
          return INIT_SUCCES;
}
Here also I could see that it stuck in RF_Init() function.I cant  see anything in uart channel.What I am missing.Please suggest a solution
« Last Edit: June 03, 2016, 08:03:24 am by umamaheswary »
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 6009
  • Country: us
    • Personal site
Re: WSN monitor not showing router.It only shows coordinator
« Reply #10 on: June 02, 2016, 04:43:59 pm »
Typically RF initialization problems are due to absent/not working 16 MHz crystal. Show your custom board schematic and layout.

Please use [ code ] [ /code ] tags around your code. I will not respond further unless you edit and fix your previous message.
Alex
 

umamaheswary

  • Guest
Re: WSN monitor not showing router.It only shows coordinator
« Reply #11 on: June 03, 2016, 08:18:11 am »
Thanks .It worked.As you said it was the problem of 16 MHz crystal .Now it works fine
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf