Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zstack 3.x.0 support for TI CC2652 chip #1352

Open
wants to merge 36 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ad8cc87
Initial Z-Stack driver
cdjackson Mar 9, 2019
62a61c1
Update to use separate serializer/deserialzer classes
cdjackson Apr 22, 2019
367a18a
Update CLI commands to get more visibility of stack
cdjackson Apr 22, 2019
6c584f9
Initialisation update
cdjackson Apr 28, 2019
82c02ae
Handle HA1.2 join
cdjackson May 7, 2019
a26892b
Refactored after 1.2 breaking changes
cdjackson May 18, 2019
2ebd3e9
Initialisation changes
cdjackson May 18, 2019
81922c0
Update for SeqNum bug
cdjackson May 29, 2019
b970744
Finalise initialisation
cdjackson Jun 1, 2019
5c38547
Remove APS Counter setting as this is now default
cdjackson Jun 15, 2019
42dab6d
Update POM version for zstack dongle
t-8ch Nov 27, 2021
54a4a03
console: mark baudrate as required
t-8ch Nov 27, 2021
83f5702
Use hardware bootloader reset if necessary
t-8ch Nov 27, 2021
43a25ad
Fixing Zstack branch
leonschenk Sep 10, 2022
eaf00fb
Bring version of zstack up to date
leonschenk Sep 10, 2022
739d149
Update pom versions automatically
leonschenk Sep 19, 2022
0c093ae
Fixes transaction issues
leonschenk Sep 26, 2022
8e040ae
Fixing some basic warnings
leonschenk Sep 27, 2022
d22fb76
Cleaning up TransactionWaiter and fixes stacktrace
leonschenk Sep 28, 2022
b56de40
Update README.md for Z-Stack 3 ZNP
Hedda Sep 28, 2022
5afeb82
New configuration system
leonschenk Oct 15, 2022
32fb3ca
New configuration system
leonschenk Oct 15, 2022
f487d98
Regenerated commands for Zstack
leonschenk Oct 27, 2022
b213075
When network comes online:
leonschenk Oct 28, 2022
c7fe4c8
Using UTF-8 as charset
leonschenk Oct 29, 2022
32ba22c
Tests updated
leonschenk Oct 30, 2022
5e4f77e
Merge branch 'master' into zstack/initial
leonschenk Nov 2, 2022
5a3c258
Fix interface issues
leonschenk Nov 2, 2022
c214f8e
Merge pull request #1 from Hedda/patch-2
leonschenk Nov 2, 2022
0bacccd
Update parent version
leonschenk Nov 2, 2022
0fc54f8
Update parent version
leonschenk Nov 2, 2022
9973b1a
LGTM issue
leonschenk Nov 2, 2022
edc4af1
removed unnecessary dependencies
leonschenk Nov 2, 2022
b300372
Updated generator/generated files
leonschenk Mar 26, 2023
7d5086b
Remove gradle file
leonschenk Mar 26, 2023
6578239
Merge branch 'master' into zstack/initial
leonschenk Mar 26, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,23 +79,26 @@ The following clusters are currently supported -:

The framework implements a package structure that allows efficient use of re-usable components in a number of different applications.

| Package | Description |
| -------------------------------------------------- | ------------------------------------------------------ |
| com.zsmartsystems.zigbee | The main framework and cluster library implementation |
| com.zsmartsystems.zigbee.autocode | Code generator for the ZigBee cluster library classes |
| com.zsmartsystems.zigbee.dongle.cc2531 | Dongle driver for the Texas Instruments ZNP CC2531 |
| com.zsmartsystems.zigbee.dongle.conbee | Dongle driver for the Dresden Electronics Conbee |
| com.zsmartsystems.zigbee.dongle.ember | Dongle driver for the Silabs EZSP Network Co-Processor |
| com.zsmartsystems.zigbee.dongle.ember.autocode | Code generator for the Ember NCP dongle commands |
| com.zsmartsystems.zigbee.dongle.telegesis | Dongle driver for the Telegesis dongle |
| com.zsmartsystems.zigbee.dongle.telegesis.autocode | Code generator for the Telegesis dongle commands |
| com.zsmartsystems.zigbee.dongle.xbee | Dongle driver for the Digi XBee dongle |
| com.zsmartsystems.zigbee.dongle.xbee.autocode | Code generator for the XBee dongle commands |
| com.zsmartsystems.zigbee.console | Console commands for the general framework |
| com.zsmartsystems.zigbee.console.ember | Console commands for the Silabs Ember NCP |
| com.zsmartsystems.zigbee.console.main | Main CLI console application |
| com.zsmartsystems.zigbee.serial | Serial driver implementation |
| com.zsmartsystems.zigbee.test | Overall tests and code coverage |
| Package | Description |
| -------------------------------------------------- | ------------------------------------------------------- |
| com.zsmartsystems.zigbee | The main framework and cluster library implementation |
| com.zsmartsystems.zigbee.autocode | Code generator for the ZigBee cluster library classes |
| com.zsmartsystems.zigbee.dongle.cc2531 | Dongle driver for the Texas Instruments ZNP CC2531 |
| com.zsmartsystems.zigbee.dongle.conbee | Dongle driver for the Dresden Electronics Conbee |
| com.zsmartsystems.zigbee.dongle.ember | Dongle driver for the Silabs EZSP Network Co-Processor |
| com.zsmartsystems.zigbee.dongle.ember.autocode | Code generator for the Ember NCP dongle commands |
| com.zsmartsystems.zigbee.dongle.telegesis | Dongle driver for the Telegesis dongle |
| com.zsmartsystems.zigbee.dongle.telegesis.autocode | Code generator for the Telegesis dongle commands |
| com.zsmartsystems.zigbee.dongle.xbee | Dongle driver for the Digi XBee dongle |
| com.zsmartsystems.zigbee.dongle.xbee.autocode | Code generator for the XBee dongle commands |
| com.zsmartsystems.zigbee.dongle.zstack | Dongle driver for Texas Instruments Z-Stack 3 dongles |
| com.zsmartsystems.zigbee.dongle.zstack.autocode | Code generator for the TI Z-Stack 3 dongle commands |
| com.zsmartsystems.zigbee.console | Console commands for the general framework |
| com.zsmartsystems.zigbee.console.ember | Console commands for the Silabs Ember NCP |
| com.zsmartsystems.zigbee.console.main | Main CLI console application |
| com.zsmartsystems.zigbee.console.zstack | Console commands for Texas Instruments ZNP of Z-Stack 3 |
| com.zsmartsystems.zigbee.serial | Serial driver implementation |
| com.zsmartsystems.zigbee.test | Overall tests and code coverage |

## Testing

Expand Down Expand Up @@ -145,7 +148,11 @@ The [com.zsmartsystems.zigbee.sniffer](https://github.com/zsmartsystems/com.zsma

### Texas Instruments CC2531

The library supports the Texas Instruments ZNP protocol over a serial interface.
The library supports the Texas Instruments Z-Stack Home 1.2 ZNP protocol over a serial interface as used by Zigbee Coordinator NCP firmware on TI CC2530 and CC2531 series based dongles.

### Texas Instruments Z-Stack

The library supports the Texas Instruments Z-Stack 3.x ZNP protocol over a serial interface as used by Zigbee Coordinator NCP firmware on TI CC2652 and CC1352 series based dongles.

### Telegesis ETRX3

Expand Down Expand Up @@ -180,12 +187,17 @@ The following table provides a summary of some of the dongles / chipsets that ar
| EFR32 | Yes (EZSP) | | | |
| **EM358LR** | Yes (EZSP) | -103dBm | **+20.0dBm** | Internal |
| MGM111 | Yes (EZSP) | -99dBm | +10.0dBm | Internal |
| RaspBee | Yes (CONBEE) | **-105dBm** | +8.7dBm | Internal |
| ConBee | Yes (CONBEE) | **-105dBm** | +8.7dBm | Internal |
| RaspBee | Yes (CONBEE) | -105dBm | +8.7dBm | Internal |
| ConBee | Yes (CONBEE) | -105dBm | +8.7dBm | Internal |
| CC2530 | Yes (ZNP) | -97dBm | +4.5dBm | |
| CC2531 | Yes (ZNP) | -97dBm | +4.5dBm | |
| CC2538 | Yes (ZNP) | -97dBm | +7.0dBm | |
| CC2650 | Yes (ZNP) | -100dBm | +5.0dBm | |
| CC2652P | Yes (Z-Stack) | -105dBm | **+20.0dBm** | |
| CC2652R | Yes (Z-Stack) | -105dBm | +5.0dBm | |
| CC2652RB | Yes (Z-Stack) | -102dBm | +5.0dBm | |
| CC1352P | Yes (Z-Stack) | **-121dBm** | **+20.0dBm** | |
| CC1352R | Yes (Z-Stack) | **-121dBm** | +5.0dBm | |
| ATSAMR21 | No | -99dBm | +4.0dBm | |
| JN5169 | No | -96dBm | +10.0dBm | |
| HUSBZB-1 | Yes (EZSP) | | | Internal |
Expand Down
11 changes: 11 additions & 0 deletions com.zsmartsystems.zigbee.autocode/.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1664488665689</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 11 additions & 0 deletions com.zsmartsystems.zigbee.console.ember/.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1664488665734</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
11 changes: 11 additions & 0 deletions com.zsmartsystems.zigbee.console.main/.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1664488665757</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
32 changes: 22 additions & 10 deletions com.zsmartsystems.zigbee.console.main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,73 @@
<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.serial</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.cc2531</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.zstack</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.xbee</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.conbee</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.ember</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.telegesis</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.console</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.console.ember</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.console.telegesis</artifactId>
<version>1.4.11-SNAPSHOT</version>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.console.zstack</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,16 @@
import com.zsmartsystems.zigbee.console.ember.EmberConsoleSecurityStateCommand;
import com.zsmartsystems.zigbee.console.ember.EmberConsoleTransientKeyCommand;
import com.zsmartsystems.zigbee.console.telegesis.TelegesisConsoleSecurityStateCommand;
import com.zsmartsystems.zigbee.console.zstack.ZstackConsoleNcpSecurityCommand;
import com.zsmartsystems.zigbee.console.zstack.ZstackConsoleNcpStateCommand;
import com.zsmartsystems.zigbee.database.ZigBeeNetworkDataStore;
import com.zsmartsystems.zigbee.dongle.cc2531.ZigBeeDongleTiCc2531;
import com.zsmartsystems.zigbee.dongle.conbee.ZigBeeDongleConBee;
import com.zsmartsystems.zigbee.dongle.ember.ZigBeeDongleEzsp;
import com.zsmartsystems.zigbee.dongle.ember.ezsp.structure.EzspConfigId;
import com.zsmartsystems.zigbee.dongle.telegesis.ZigBeeDongleTelegesis;
import com.zsmartsystems.zigbee.dongle.xbee.ZigBeeDongleXBee;
import com.zsmartsystems.zigbee.dongle.zstack.ZigBeeDongleZstack;
import com.zsmartsystems.zigbee.security.ZigBeeKey;
import com.zsmartsystems.zigbee.serial.ZigBeeSerialPort;
import com.zsmartsystems.zigbee.serialization.DefaultDeserializer;
Expand Down Expand Up @@ -150,11 +153,12 @@ public static void main(final String[] args) {

Options options = new Options();
options.addOption(Option.builder("d").longOpt("dongle").hasArg().argName("dongle type")
.desc("Set the dongle type to use (EMBER | CC2531 | TELEGESIS | CONBEE | XBEE)").required().build());
.desc("Set the dongle type to use (EMBER | CC2531 | ZSTACK | TELEGESIS | CONBEE | XBEE)").required()
.build());
options.addOption(Option.builder("p").longOpt("port").argName("port name").hasArg().desc("Set the port")
.required().build());
options.addOption(
Option.builder("b").longOpt("baud").hasArg().argName("baud").desc("Set the port baud rate").build());
Option.builder("b").longOpt("baud").hasArg().argName("baud").desc("Set the port baud rate").required().build());
options.addOption(Option.builder("f").longOpt("flow").hasArg().argName("type")
.desc("Set the flow control (none | hardware | software)").build());
options.addOption(Option.builder("c").longOpt("channel").hasArg().argName("channel id")
Expand Down Expand Up @@ -250,6 +254,12 @@ public static void main(final String[] args) {
if (dongleName.toUpperCase().equals("CC2531")) {
dongle = new ZigBeeDongleTiCc2531(serialPort);
transportOptions.addOption(TransportConfigOption.RADIO_TX_POWER, 3);
} else if (dongleName.toUpperCase().equals("ZSTACK")) {
dongle = new ZigBeeDongleZstack(serialPort);
transportOptions.addOption(TransportConfigOption.RADIO_TX_POWER, 3);

commands.add(ZstackConsoleNcpStateCommand.class);
commands.add(ZstackConsoleNcpSecurityCommand.class);
} else if (dongleName.toUpperCase().equals("EMBER")) {
ZigBeeDongleEzsp emberDongle = new ZigBeeDongleEzsp(serialPort);
dongle = emberDongle;
Expand Down Expand Up @@ -384,7 +394,7 @@ public static void main(final String[] args) {
System.out.println(" * PAN ID = " + pan);
System.out.println(" * Extended PAN ID = " + extendedPan);
System.out.println(" * Link Key = " + linkKey);
if (nwkKey.hasOutgoingFrameCounter()) {
if (linkKey.hasOutgoingFrameCounter()) {
System.out.println(" * Link Key Frame Cnt = " + linkKey.getOutgoingFrameCounter());
}
System.out.println(" * Network Key = " + nwkKey);
Expand Down Expand Up @@ -431,7 +441,9 @@ public static void main(final String[] args) {
System.out.println("ZigBee console starting up ... [OK]");
}

if (dongleName.toUpperCase().equals("CC2531")) {
networkManager.addSupportedCluster(ZclIasZoneCluster.CLUSTER_ID);

if (dongleName.equalsIgnoreCase("CC2531")) {
ZigBeeDongleTiCc2531 tiDongle = (ZigBeeDongleTiCc2531) dongle;
tiDongle.setLedMode(1, false);
tiDongle.setLedMode(2, false);
Expand Down
11 changes: 11 additions & 0 deletions com.zsmartsystems.zigbee.console.telegesis/.project
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,15 @@
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1664488665778</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
34 changes: 34 additions & 0 deletions com.zsmartsystems.zigbee.console.zstack/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>com.zsmartsystems.zigbee.console.zstack</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
<filteredResources>
<filter>
<id>1664488665801</id>
<name></name>
<type>30</type>
<matcher>
<id>org.eclipse.core.resources.regexFilterMatcher</id>
<arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
</matcher>
</filter>
</filteredResources>
</projectDescription>
38 changes: 38 additions & 0 deletions com.zsmartsystems.zigbee.console.zstack/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.console.zstack</artifactId>
<packaging>jar</packaging>

<parent>
<groupId>com.zsmartsystems</groupId>
<artifactId>zigbee</artifactId>
<version>1.4.10-SNAPSHOT</version>
</parent>

<dependencies>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.console</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>com.zsmartsystems.zigbee</groupId>
<artifactId>com.zsmartsystems.zigbee.dongle.zstack</artifactId>
<version>${project.version}</version>
</dependency>

</dependencies>

</project>

Loading