Updated Zigbee (markdown)

Michael Ingraham 2019-11-12 11:56:50 -05:00
parent 8e566894d0
commit dae4833ef8
1 changed files with 8 additions and 16 deletions

@ -38,7 +38,7 @@ Z2T requires a TI CC2530 based module flashed with [Z-Stack-firmware](https://gi
### A. Flash CCLib on an ESP82xx Device
Flashing the CC2530 normally requires a [CC_DEBUGGER](https://www.aliexpress.com/item/32869263224.html). Using an ESP82xx device like a [Wemos D1 Mini](https://www.aliexpress.com/item/32681374223.html) is a lower cost alternative.
If you are using a Wemos D1 Mini or NodeMCU, just plug the microUSB port. Vcc (3.3V), GND, Tx (GPIO1), and Rx (GPIO3) are connected via the microUSB port. Be sure that you are using a USB **_data_** cable (not a USB power cable).
If you are using a Wemos D1 Mini or NodeMCU, just plug the microUSB port. Vcc (3.3V), GND, Tx (GPIO1), and Rx (GPIO3) are connected via the microUSB port. Be sure that you are using a USB **_data_** cable.
For ESP devices that do not have a microUSB connector, make the following connections:
@ -76,13 +76,14 @@ Insert alternating male Dupont jumpers; one jumper on one side, the next one on
### C. Upload the firmware to the CC2530
The CC2530 requires `Z-Stack_Home_1.2`, of type `Default` (not `Source Routing`). For convenience, ready to use [firmware files](https://github.com/s-hadinger/CCLib/tree/master/Bin) are provided. Select the right one for your hardware: `CC2530`, `CC2530 + CC2591` or `CC2530 + CC2592`.
1. Ensure that you have Python 2.7 installed. Note that these instructions do not work for Python 3.x
_**These Python scripts require Python 2.7.**_
1. Ensure that you have Python 2.7 installed
2. Install pyserial 3.0.1:
`pip install pyserial==3.0.1`
3. Check for connectivity before flashing:
`python Python/cc_info.py -p <serial_port>`
where <serial_port> is the serial port for the ESP82xx device. e.g. /dev/cu.usbserial-xxxx or COM7
where \<serial_port> is the serial port for the ESP82xx device. e.g. `/dev/cu.usbserial-xxxx` or `COM7`
Example of result:
```
@ -116,24 +117,15 @@ The CC2530 requires `Z-Stack_Home_1.2`, of type `Default` (not `Source Routing`)
[ ] TIMER_SUSPEND
```
If your CC2530 is DEBUG_LOCKED, then the flash size will be incorrectly reported as 16kB, which is not big enough
to fit the Z-Stack firmware. To fix this you need to erase the chip, which can be done as part of flashing the chip.
So you will need a 16kb file to flash. The easiest way is to read the existing flash, then re-flash it, using the
erase option to erase the chip.
If your CC2530 is DEBUG_LOCKED, then the flash size will be incorrectly _reported_ as 16kB which is not big enough to fit the Z-Stack firmware. To fix this you need to erase the chip to reset the DEBUG_LOCKED flag. This can be accomplished by erasing the chip. The easiest method is to flash the chip and specifying the erase option. You will need any 16kb file to flash. Read the existing flash from the chip and then re-flash that file using the erase option.
```
python Python/cc_read_flash.py -p <serial_port> -o x.hex
python Python/cc_write_flash.py --erase -p <serial_port> -i x.hex
```
Check for connectivity again using:
Recheck for connectivity and the the correct flash size by repeating step #3.
`python Python/cc_info.py -p <serial_port>`
and you should see the correct flash size reported.
4. Flash the firmware using the following command:
4. Flash the Z-Stack firmware using the following command:
_Flashing the CC2530 **takes about 30 minutes**_
```
python Python/cc_write_flash.py -e -p <serial_port> -i Bin/CC2530_DEFAULT_20190608_CC2530ZNP-Prod.hex
```
@ -173,7 +165,7 @@ The CC2530 requires `Z-Stack_Home_1.2`, of type `Default` (not `Source Routing`)
Completed
```
_If you don't see any on screen activity within a couple minutes that flashing has begun (i.e., progress percentages increasing), then abort the command, cycle power on the ESP82xx, and start this step over._
_If you don't see any on screen activity that flashing has begun (i.e., progress percentages increasing) within a couple minutes, then abort the command, cycle power on the ESP82xx, and start this step over._
Additional References:
- Flashing with a Wemos D1 Mini or equivalent and `CCLib` is described in greater detail in [this blog post](https://www.zigbee2mqtt.io/information/alternative_flashing_methods.html).