heshuzhe

    1. CC2530串口收发的问题 7/4611 无线连接 2015-06-11
      Hugo801122 发表于 2014-2-28 12:50 这个不好说,代码看不到没法分析。
      zigbee定位,让网关在一定时间内收不到数据包,就驱动网关的蜂鸣器响。 下面是网关主要程序: //系统上电后,执行ZMain.c的int main()函数实现硬件的初始化,包括osal_int_disable( INTS_ALL );初始化板上硬件设置。。。当完成上述初始化时,执行osal_start_system()开始运行OSAL系统。(如下) ZSEG int main( void ) {       // Turn off interrupts       osal_int_disable( INTS_ALL );       // Initialize HAL       HAL_BOARD_INIT();       // Make sure supply voltage is high enough to run       zmain_vdd_check();       // Initialize stack memory       zmain_ram_init();           // Initialize board I/O       InitBoard( OB_COLD );       // Initialze HAL drivers       HalDriverInit();       // Initialize NV System       osal_nv_init( NULL );       // Determine the extended address       zmain_ext_addr();       // Initialize basic NV items       zgInit();       // Initialize the MAC       ZMacInit();    #ifndef NONWK       // Since the AF isn't a task, call it's initialization routine       afInit();    #endif    #ifdef LCD_SUPPORTED       HalLcdInit();    #endif      // Initialize the operating system       osal_init_system();      // Allow interrupts       osal_int_enable( INTS_ALL );      // Final board initialization       InitBoard( OB_READY );      //HalLcdInit();      // Display information about this device       zmain_dev_info();      /* Display the device info on the LCD */    #ifdef LCD_SUPPORTED       zmain_lcd_init();    #endif       osal_start_system(); // No Return from here } // main() //osal_start_system()一旦执行,就不再返回上面的main()函数。 //之后就进入下面的uint SampleApp_ProcessEvent(uint8 task_id,uint16 events),判断收到的数据包,是什么事件,该函数如下: uint16 SampleApp_ProcessEvent( uint8 task_id, uint16 events ) {   if ( events & SYS_EVENT_MSG )   {       afIncomingMSGPacket_t *MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive(                                                              SampleApp_TaskID );       while ( MSGpkt != NULL )      {               switch ( MSGpkt->hdr.event )               {               case KEY_CHANGE:                 handleKeys( ((keyChange_t *)MSGpkt)->state, ((keyChange_t *)MSGpkt)->keys );                 break;              case AF_DATA_CONFIRM_CMD:              #if !defined( RTR_NWK )                 {                         // This message is received as a confirmation of a data packet sent.                         // The status is of ZStatus_t type [defined in ZComDef.h]                 afDataConfirm_t *afDataConfirm = (afDataConfirm_t *)MSGpkt;                         /* No ACK from the MAC layer implies that mobile device is out of                  * range of most recent parent. Therefore, begin an orphan scan                  * to try to find a former parent.                  * NOTE: To get the fastest action in the process of finding a new                  * parent, set the MAX_JOIN_ATTEMPTS in ZDApp.c to 1.                  */                         if ( afDataConfirm->hdr.status == ZMacNoACK )                 {                   SampleApp_NoACK();                  }                         // Some other error -- Do something.                         else                         {                          }                         }                #endif                  break;         case AF_INCOMING_MSG_CMD:                  processMSGCmd( MSGpkt );                 break;         case ZDO_STATE_CHANGE:          #if defined( POWER_SAVING )                      if ( rejoinPending )                      {                rejoinPending = FALSE;                 // Ok to resume power saving ops.                SampleApp_Sleep( TRUE );                }          #endif               break;          default:          break;         }        osal_msg_deallocate( (uint8 *)MSGpkt );        MSGpkt = (afIncomingMSGPacket_t *)osal_msg_receive( SampleApp_TaskID );      }     // Return unprocessed events.     return ( events ^ SYS_EVENT_MSG );   }   return 0;  // Discard unknown eve } 现在就是加上逻辑功能没实现,帮帮忙。
    2. CC2530串口收发的问题 7/4611 无线连接 2015-06-11
      Hugo801122 发表于 2014-2-28 12:50 这个不好说,代码看不到没法分析。
      楼主,怎么在zigbee定位里面,在一定时间收不到数据包,就驱动蜂鸣器响(刚入门,什么都不懂,尽量具体一点,谢谢)
    3. zigbee定位问题 10/3751 无线连接 2015-06-11
      wateras1 发表于 2015-6-11 22:07 设置一个定时器,搞个几分钟上报一次数据或者半个小时都行,而且你这个不能算作定位,希望你以后描述问题清晰些
      恩,可以加你QQ吗?
    4. zigbee定位精度 18/5572 无线连接 2015-06-11
      楼主,怎么在zigbee定位里面,在一定时间收不到数据包,就驱动蜂鸣器响(刚入门,什么都不懂)
    5. zigbee定位问题 10/3751 无线连接 2015-06-11
      wateras1 发表于 2015-6-11 12:58 设置一个心跳包就行
      该怎么设置,请多帮忙哦!
    6. zigbee定位问题 10/3751 无线连接 2015-06-11
      该怎么设置,请多帮忙哦
    7. zigbee定位问题 10/3751 无线连接 2015-06-11
      太阳上的骑士 发表于 2015-6-11 09:33 ZigBee不是通过信号强度定位吗
      是的,就是移动节点根据参考节点的位置信息和RSSI计算出自己的位置,然后发给网关

最近访客

< 1/1 >

统计信息

已有2人来访过

  • 芯积分:--
  • 好友:--
  • 主题:1
  • 回复:7

留言

你需要登录后才可以留言 登录 | 注册


现在还没有留言