DSR Support
RE: TRACE_MSG(lm, fmt, args)
First of all, please, notice that debug serial trace messages are sent in binary packets and they contain two types of data:
1. Traffic data from the radio
2. Debug messages from the application trace (i.e. TRACE_MSG macro)
That's why you see this strange terminal output. If you save the captured data from your terminal to binary(not text) file and open it in a hex editor, you will see the repetition of the patterns 0xDE 0xAD 0xYY 0xYY 0xYY 0xYY ... . The first two bytes are signature, the next one is a type of data (0x), length, and payload. Payload for different types of packets is different too. For detailed information of how does this protocol works, please see source files.
The current implementation of ZBOSS doesn't support general terminal output, like printf() functions or some simular. So you are unable to see the debug information in real-time. To make this feature you have to implement your own trace system or change existing one in the HW device, or write PC application, which can parse incoming data on the fly from the serial port.
Also you can use WinComDump utility, which is distributed with ZBOSS stack. It is located in stack/devtools/win_com_dump and you can investigate its sorces. As I previously mentioned, the data flow from the device includes two types of data and you can run win_com_dump.exe file to see the trace in the readable form in the following way:
win_com_dump.exe \\.\COMx trace.log traffic.dump
where COMx is yor serial port
trace.log - output file for TRACE_MSG() calls
traffic.dump - binary traffic dump, which can be converted to .pcap file by using dump_converter
The runnig sequence is following:
1. Start win_com_dump
2. Start your HW
3. While HW is running, you CAN see the output messages by opening trace.log file. There is a little hack here: If you are using file manager, like FAR, you can select the file, open it by pressing F3 and see .log file in real-time.
4. Stop your HW.
5. Analyse .log and .dump(or .pcap) files.
RE: How to add my own applications?
Hello,
After source update in October 2013, the full example of how to send dummy user data is in zdo_startup. Please, examine carefully that code. To write your own more complex applications you may need the ZBOSS API documentation which is available http://zboss.dsr-wireless.com/api_doc/index.html
RE: how can I use the serial(UART) in the Zboss?which function should I call? thank you
Hello,
Possibly, you're looking for
void zb_8051_serial_put_bytes(zb_uint8_t *buf, zb_short_t len)
zb_ushort_t zb_8051_serial_get_bytes(zb_uint8_t *buf, zb_ushort_t size)
See stack/osif/8051/zb_8051_serial.c
Also don't forget to initialize uart before using it. Call
void zb_init_8051_serial()
See stack/osif/8051/zb_8051_serial_init.c
RE: how can I use the serial(UART) in the Zboss?which function should I call? thank you
There is know need to include zb_8051_serial.h directly. All the transport routines are already in zb_g_context. Please, send me the set of preprocessor directives of your project.
RE: How to receive the serial port data?
Hello,
You should implement serial rx interrupt handler by yourself.
RE: cc2530 gpio control
Hello,
gpio is not ZigBee stack concern, is it? You can examine TI CC2530 docs and examples here:
RE: How to receive the serial port data?
Look for UART in this document
RE: ZBOOS schematic diagram
Hello Denis
please refer this page to get more information about ZBOSS architecture:
http://zboss.dsr-wireless.com/projects/zboss/wiki/Architecture_key_moments
ZBOSS source file structure is intuitive-clear, the main folders are
osif - OS/platfrom dependent functions implementation
mac - MAC layer
nwk - Network layer
aps, zdo - APS and ZDO respectivly
secur - security features
common - some commonly used utilities
include - headers
To support new platform (MCU and transport in your case) you need to modify transport related API (ZB_TRANS_SEND_COMMAND for example) and peripheral-related functions (timer, serial, nvram, etc.)
Mainly all the modifications will be localized in osif and mac folders
RE: Required Help for netwrok simulator
Hello,
To start with download ZBOSS stack sources and compile with Options = Options-linux-debug and Platform = Platform-linux.
Network Simulator is included in the build and will be compiled too.
Now the example of how-to use it is located in every stack test (for example zdo_startup) in test launcher script (run.sh).
Please, try it and if you'll still have any questions let us know.
RE: Required Help for netwrok simulator
Sorry, but we don't have any other manual, except distributed with ns packets one. But we can help you with your tests.
First of all your "etags error" says that you don't have Emacs installed. We use etags for code navigation, so they're built with the debug configuration of the stack. You can install Emacs or edit Makefile not to build etags. Hope now, you'll be able to build the stack successfully.
After having built, examine test which requires more than two devices (zdo_mgmt_joining_time_duration with zc, zr & zed for example).
Second, if working with ZBOSS_ns_bin packet, could you please provide us with the results of addind zed to script? (any errors, logs, etc.) In addition, it will be very helpful for both of us, if you could send the script itself (with zed included).