Zigbee Kernel Driver

Zigbee kernel driver

You have a number of options here:

  1. The ZigBee Linux HA Gateway reference design (HW/SW):

http://www.ti.com/tool/CC2531EM-IOT-HOME-GATEWAY-RD

http://www.ti.com/tool/z-stack - Z-STACK-LINUX-GATEWAY

Out of the Box this connects to CC2531 via CDC USB. However by modifying the NPI_Gateway.cfg and the zigbeeHAgw script files you can reconfigure it to use UART or SPI. The CC2530 will need to by preogrammed with the ZNP FW available in http://www.ti.com/tool/z-stack - Z-STACK-HOME SDK under Z-Stack Home 1.2.2.42930\Projects\zstack\ZNP\CC253x, prebuilt binaries are in Z-Stack Home 1.2.2.42930\Projects\zstack\ZAP\ZNP-HexFiles\CC2530.

This option is specifically for Linux, it uses 4 application space servers to manage the Data Plane, Control Plan and Field Upgrade, offering a high level Home Automation API through protobuf over local sockets. It uses the existing CDC, UART or SPI kernel drivers. It would not lend its self to a kernel space driver.


  1. The open source ZNP Host framework reference design. This is cross platform framework and could be ported to a kernel space driver, however it does not support SPI, UART only. The CC2530 FW would be the same as above and does support SPI, so you would need to port the ZNP framework to use SPI.

http://www.ti.com/tool/TIDC-ZNP-HOST-SW3

https://git.ti.com/znp-host-framework/znp-host-framework

Regards,
TC.

Zigbee stack on Linux (mainline kernel)?

Yes, this is described at Documentation/networking/ieee802154.txt. What you are looking for is most likely this excerpt:

Socket API


int sd = socket(PF_IEEE802154, SOCK_DGRAM, 0);

.....

The address family, socket addresses etc. are defined in the
include/net/af_ieee802154.h header or in the special header
in the userspace package (see either http://wpan.cakelab.org/ or the
git tree at https://github.com/linux-wpan/wpan-tools).

One can use SOCK_RAW for passing raw data towards device xmit function. YMMV.

See also this question.

How to program an XBee ZigBee module?

  1. Use USB Explorer device (or similar) to enter a serial terminal session on the receiving XBee.
  2. Type ATMY to get the receiving XBee's address. Write it down.
  3. Put the sender in the USB Explorer and type ATDL plus the receiver's address, like "ATDL798A728"
  4. Type ATWR to save this setting.
  5. Attach sender XBee's UART (TX and RX pins) to microcontroller.
  6. Plug receiving XBee into USB Explorer attached to computer.
  7. Run Processing sketch or similar to read from the serial port.

The two XBees will run by default in 'transparent mode,' which pipes data coming into one UART out of the other UART, exactly like a wire. So when your microcontroller writes data into the sender XBee, it will come out of the receiving XBee and be read (and displayed or whatever you need) by your software.

Linux - Device node name ends with '?' What does this mean?

One possible cause are non-printable characters in the script. This often happens when the script is written using (or copied from) Windows, and executed in a Unix/Linux environment.

You could check your script with an editor that displays non-printable characters.



Related Topics



Leave a reply



Submit