WSN monitor not showing router.It only shows coordinator - Page 1
Forum section: electronics / beginners

author: Unknown
author_rank: Unknown
timestamp: May 26, 2016, 06:22:06 am
content: I have downloaded the bitcloud SDK for avr-atmega256rfr2 MCU fromhttp://www.atmel.com/tools/BITCLOUD-ZIGBEEPRO.aspx.Istarted 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.

author: ataradov
author_rank: Super Contributor
timestamp: May 26, 2016, 07:34:49 am
content: 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).

author: Unknown
author_rank: Unknown
timestamp: May 26, 2016, 09:29:27 am
content: 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_COORDINATORCS_UID 0x3333LLAPP_DEVICE_TYPE DEVICE_TYPE_COORDINATORfor Router:CS_DEVICE_TYPE DEVICE_TYPE_ROUTERCS_UID 0x3344LLAPP_DEVICE_TYPE DEVICE_TYPE_ROUTERSorry for my all mistakeone 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 codeCode: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?

author: ataradov
author_rank: Super Contributor
timestamp: May 26, 2016, 04:03:16 pm
content: Quote from: umamaheswary on May 26, 2016, 09:29:27 amI 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.

author: Unknown
author_rank: Unknown
timestamp: May 28, 2016, 04:05:27 am
content: I found in WSNSensorManager.c the statementappNwkInfo.boardInfo.meshbean.temperature = CPU_TO_LE32(temperature); in temperatureDataReady() function.Is this the data structure to assign temperature data??

author: ataradov
author_rank: Super Contributor
timestamp: May 28, 2016, 04:58:31 am
content: This is the assignment. What is your final goal for all of this?

author: Unknown
author_rank: Unknown
timestamp: May 28, 2016, 05:37:43 am
content: 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 callsBSP_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

author: ataradov
author_rank: Super Contributor
timestamp: May 28, 2016, 05:42:02 am
content: Quote from: umamaheswary on May 28, 2016, 05:37:43 amYes, 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.

author: Unknown
author_rank: Unknown
timestamp: May 28, 2016, 06:06:19 am
content: Yes.I tried with a constant value and I got the value in coordinator . Once again thanks for your support.

author: Unknown
author_rank: Unknown
timestamp: June 02, 2016, 08:27:28 am
content: 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 workingCode:for(;;){SYS_RunTask(); // control is not getting into this loop}In SYS_SysInit() function I have these functionsCode: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

author: ataradov
author_rank: Super Contributor
timestamp: June 02, 2016, 04:43:59 pm
content: 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.

author: Unknown
author_rank: Unknown
timestamp: June 03, 2016, 08:18:11 am
content: Thanks .It worked.As you said it was the problem of 16 MHz crystal .Now it works fine