It is important to have multiple endpoint endpoint on a terminal.A node can have multiple endpoints, number No. 0 is an endpoint used by ZigBee device object (ZDO), and number No. 255 is used as a broadcast endpoint. What we can define ourselves is 1-240 of these endpoints. Each endpoint corresponds to a task TaskID. Therefore, we need to configure a new task for each additional endpoint TaskID cite a column sub-: example one: a wireless node (rad
This ZigBee project for a long time did not write, and now a little strange to this project, a lot of things do not understand. Today write a simple wireless send applet, has been a problem, the program calls Zstack in the Af_datarequest function, as followsAf_datarequest (Coor_Addr,App_epDesc, NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;NBSP;APP_CLUSTERID_ADC, sizeof (Adc_value), (uint8*) adc_value, AppTransID, AF_DISCV_R
Sophomore started contacting ZigBee Hardware development is really a challenge, especially for a computer professional.Recently began to write a project application, all kinds of information to see the head is big. In order to better develop later, this time recorded a number of nouns and explanationsUpper computer and lower slave machineUpper computer refers to the machine can be directly issued control commands, generally pc/host computer/master com
The first method is to use the special API defined in nlme. h
Obtain the IEEE address of the device./** This function will return a pointer to the device's IEEE 64 bit address** This function resides in nwk_util.c.*/Extern byte * nlme_getextaddr (void );
Obtain the network address of the device./** This function will return this device's 16 Bit short address** This function resides in nwk_util.c.*/Extern uint16 nlme_getincluaddr (void );
Obtain the network address of the parent device./** This f
Document directory
(1) experiment Overview
(2) program flowchart
(3) related computing
(4) experiment source code and Analysis
I. Connecting
In the previous article, we learned how to implement simple external interruptions. With the practical experience of interrupt, we will discuss the timer interrupt in this section. The cc2430 has four timers, which can be divided into three categories: timer 1, Timer 2, and timer 3/4 (3 and 4 are used in the same way ).
Since the author has just com
Recently, a company's project needs to use ZigBee, and has purchased an online ready-made module. The communication distance is very long, but the protocols are not public, and the price is very high, which is inconvenient to use, finally, I decided to use my own canvas. At first, I used the combination of and, and found that the effect was very poor. The main reason was that there were too many peripheral components and the parameter was not properly
ZigBee Tour (v): Several important CC2430 basic experiments--serial communication
first, the connecting link
In the wireless sensor network, the CC2430 needs to send the collected data to the host computer (ie pc), while the host computer needs to transmit the control information to the CC2430. All this is inseparable from the transmission of information between the two. In this section, we will learn how to realize the serial communication between
column of each row, forming the c*Arcs[t][t] The adjoint matrix of the original matrix, the series of n matrices, Ans[t][t]*/void Getastart (float arcs[t][t],int n,float ans[t][t]){int i,j,k,t;float temp[t][t];if (n==1){Ans[0][0] = 1;//guarantees the inverse of the matrix of an element to its reciprocalReturn}for (i=0;i{for (j=0;j{for (k=0;k{for (t=0;t{Temp[k][t] = arcs[k>=i?k+1:k][t>=j?t+1:t];}}Ans[j][i] = Geta (temp,n-1);if ((i+j)%2 = = 1){Ans[j][i] =-ans[j][i];}}}}Sensor.h#ifndef sensor_h_in
Recently, when the ZigBee protocol was simulated in NS2. after the energy model was added, it was found that all nodes were green, and the changes in node color in the program were ineffective, you cannot add tags to a node. After carefully observing the source code, we found that the following two lines of the void mac802_15_4mac.cc line 919th: Recv (packet * P, Handler * h) function are in the p802_15_4mac.cc file:
If (! Nam802_15_4: emstatus)Nam80
1. Io Configuration
Three registers are required for the configuration of the IOS port of the standard.
IO port register
P0
P1
P2
Address
0x80
0x90
0xa0
Pxsel
P0sel
P1sel
P2sel
Address
0xf3
0xf4
0xf5
Px [] function to set registers. The default is normal IO port (0: normal IO port 1: second function)
Pxdir
P0dir
P1dir
P2dir
Address
0xfd
0xfe
0xff
Px [] inpu
We need to configure three registers: p1sel, p1dir, and p16b. The functions of the I/O port are shown in the following table: (For details, refer to the datasheettings)
Link https://pan.baidu.com/s/1nLjYI8LgqxPH6WHd_n1Szw for the cpu30 datasheettings
* P1sel (0: Common IO port 1: second function)* P1dir (0: Input 1: Output)* P1indium (0: Pull up/pull down 1: three States)
1 # include
1 # include
This piece of code is the result of a streaming lamp. I just had three lights on this baseboard, A
The PIN mapping scheme of the timer 1 is a standby 2 scheme: P07 corresponds to Channel 3, p06-Channel 4, p12-Channel 0, p11-Channel 1, p10-channel 2~output comparison mode for timer 1: In output comparison mode, channel-dependent IO is set to output mode. (What is the output comparison mode, operating mechanism) after the timer starts, the content of the counter is compared with the content T1CCNH:T1CCNL in the channel comparison register. If the two contents (values) are equal, the output pin
informationThere must be some advantages to adding this macro definition. But the problem also comes, assuming that the terminal wants to add another network of coordinators, both Panid and channels are the same.No matter how many times you reboot, the new coordinator is not added. What should we do then?As a matter of fact ti takes this into account, here is the official noteApplication wants to delete the stored NV information It just needs to set the Zcd_nv_startup_option as explained below
Reference Post http://www.deyisupport.com/question_answer/wireless_connectivity/zigbee/f/104/t/61232.aspxFeel if it is in the same network, then all the Panid and extension Panid are the same, that Panid limited to 0x3fff, so we can use 64bit extension Panid as the designated address, specific methods refer to the above post, TI The engineer recommends the following:It is recommended to use Extendpanid node selection to join a specific network, genera
ZigBee Serial printing problem
When the endpoint sends data to the coordinator, it is accompanied by the network address of the node in the data stream, and sometimes cannot be printed by the PC side. 1. There may be a problem with the serial software:
Use several serial port software, sometimes appear stop, or garbled behavior, in after many Exchange software, found **securecrt** This software is good, solve most of the problem
2. The data sent
Environment Monitoring System Based on zigbee and tiny4412 Development Board, zigbeetiny4412
1. Build the Development Board Environment
1. layout of tiny4412 linux
Reference blog: http://www.cnblogs.com/luoxiang/p/4186391.html
2. boa Server Construction
Download boa Source package: http://www.boa.org/boa-0.94.14rc21.tar.gz
Boa-0.94.14rc21.tar.gz cd/home tar zxf
Cd boa-0.94.14rc21./configure cd/src modify Makefile file CC = arm-linux-gcc CPP = arm-
port.Three. Procedures#include #define UINT unsigned int #define UCHAR unsigned char#define LED1 P1_0//define P1_0 Port as LED1 control end #define LED2 p1_1//define P1_1 Port as LED2 control end#define LED3 p1_4//define P1_4 Port as LED3 control end/* Function Name: io_init function Description: led_io initialization function input parameter:None output parameter: None return value: None */void Io_init (void){P1dir |= 0xFF; P1 Port defined as outputLED1 = 0; Light LED1.LED2 = 0; Light LED2.LED
The data in the experiment is already done, so I downloaded a brand-new zstack-2.5.1a to do the experiment, follow the steps, found a lot of problems.The first step is to configure the serial port.Mt_uartinit in the mt_uart.c (); BaudRate is set to 115200 (default is 38400), FlowControl is set to false.
The second step, predefined macros.Mt_uartinit () There is a small 1, 2 lines select different data processing functions according to predefined ztool or Zapp. The rear P1 and P2 are serial 0
. When the transfer is complete, the Uxcsr.tx_byte bit is set to 1. When the USART receive/Send data buffer registers are ready for receiving new sending data, an interrupt request is generated. This interrupt occurs immediately after the start of the transfer, so that when the byte is being sent, the new byte can be loaded into the data buffer.Second, the UART data receiveclkconcmd=~0x40; Set the system clock source to 32MHZ Crystal oscillatorwhile (clkconsta0x40); Wait for crystal stabilityclk
a ZDO Unbind Request to the first device. The End Device Bind is toggle process and so the Unbindis sent first-to-remove an existing bind entry.2. Wait for the ZDO Unbind Response, if the Response status is Zdp_no_entry, send a ZDO BindRequest to make the binding entry in the source device. If The response status is Zdp_success,Move the cluster ID for the first device (the unbind removed the Entry–toggle).3. Wait for the ZDO Bind Response. When received, move on to the next cluster ID for the f
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.