GithubHelp home page GithubHelp logo

xyzroe / zigstargw-mt Goto Github PK

View Code? Open in Web Editor NEW
263.0 9.0 19.0 42.67 MB

GUI wrapper designed for convenient service work with TI CC1352/CC2538/CC2652 based Zigbee sticks or gateways. Packed into single executable file

License: GNU General Public License v3.0

Python 99.69% Shell 0.31%
zigstar zigbee cc2652 cc2538 cc1352

zigstargw-mt's Introduction

ZigStar GW Multi tool

Build GitHub version GitHub download License

is GUI wrapper firtsly designed for convenient service work with Zig Star LAN GW,
but now supports any TI CC1352/CC2538/CC2652 based Zigbee sticks or gateways, regardless of the manufacturer.

Multi tool is packed into single executable file.
You can get started without installing Python and the required modules, and without using the terminal, - just download and run.

Possibilities:

  • Read / Write / Erase NVRAM memory of Zigbee module
  • Write / Verify / Erase firmware of Zigbee module
  • Backdoor Serial Loader turns on automatically
  • Manual restart of Zigbee module or ESP32 is available

Screenshots

Windows
OS X

Instructions:

1. Identify Port

Network gateways:

If you are using ZigStar LAN GW, the IP address will be detected automatically, otherwise enter the IP:PORT of your gateway.

USB sticks:

Click the update button to identify the USB drive and select your device from the dropdown list.

2.A Firmware update

  • Choose firmware *.hex file on your disk.
  • Choose required options. Usually is Erase, Write and Verify.
  • If you need to change the IEEE address, type it in and set checkbox Write IEEE.
  • Press the "Start" button to begin the selected processes.

If any action is performed on the right side of the Multi Tool, the primary IEEE address is placed in the corresponding field. (Replacing manual entered or previously read one)

For gateways or USB sticks other than ZigStar, you may need to manually enable BSL.
Also, if you are using a non ZigStar gateway, you need to uncheck the Auto-BSL checkbox.

2.B NVRAM Tools

If you have any troubles with Zigbee network NVRAM tool may help you.

  • Read button saves *.json file on your disk with current NVRAM state of your Zigbee module for future restore.
  • Write button reads *.json file from your disk with saved NVRAM state and write it to your Zigbee module.
  • Erase button cleans your Zigbee module NVRAM for a fresh install.

Like ♥️?

"Buy Me A Coffee"

Based on

zigpy/zigpy-znp
JelmerT/cc2538-bsl


xyzroe/ZigStarGW-MT is licensed under the

zigstargw-mt's People

Contributors

mercenaruss avatar xyzroe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zigstargw-mt's Issues

[REQUEST] SL Web Tools implementation of ZigStarGW-MT and/or cc2538-bsl for flashing TI firmware via a web browser?

@xyzroe @mercenaruss Home Assistant founders have now among other things announced "SL Web Tools" project (short for "Silicon Labs Web Tools") is available as open source, so wondering if you would consider forking that to make a project called "TI Web Tools" (short for "Texas Instruments Web Tools") or similar that is based on that in combination with ZigStarGW-MT and/or cc2538-bsl code for the TI flashing part?

https://www.home-assistant.io/blog/2023/02/08/state-of-matter-and-thread/#silabs-multi-flasher--sl-web-tools

(Note that this is only just one section from https://www.home-assistant.io/blog/2023/02/08/state-of-matter-and-thread/ )

SL Web Tools allows users to manage the firmware on Zigbee/Thread sticks directly from a web browser, with no terminals or compilation necessary. This allows any creator to offer easy firmware updates to their users and make experimental firmware updates available to test bug fixes quickly.

SL Web Tools runs in the browser using Pyodide and is currently powered by another new open-source Python project from them, “silabs-universal-flasher”, which is obviously for Silicon Labs based SoCs, so request/idea would be to replace that with ZigStarGW-MT and/or cc2538-bsl code in order to allow flashing of Texas Instruments based adapters instead, do you think that would be possible?

https://github.com/NabuCasa/sl-web-tools

(and currently powered by https://github.com/NabuCasa/universal-silabs-flasher for Silicon Labs based chips)

https://www.youtube.com/watch?v=-88K23e8XYw&t=2s&ab_channel=HomeAssistant

To see it in action, a demo of SL Web Tools for Silicon Labs chips has been added to the Home Assistant SkyConnect documentation.

https://skyconnect.home-assistant.io/firmware-update/ redirected from https://skyconnect.home-assistant.io/

image

Note! SL Web Tools is in turn a fork of their previous "ESP Web Tools" project which allow DIY firmware flashing of ESP32/ESP8266 SoC projecst to offer an easy web installer on their homepage, allowing users to get started directly from their browser. It has been adopted by all the great projects, including Tasmota, WLED, and ESPresense. Ever since the introduction of ESP Web Tools, they expanded this to more devices, and now they also introduced SL Web Tools for SiLabs based chips.

PS: For reference; the firmware build system for Silicon Labs was made by Home Assistant developer/engineer and Nabu Casa employee Stefan Agner (a.k.a. agners, who also developed the EFR32MG21-based Home Assistant SkyConnect USB stick/dongle as well as the EFR32MG21-based radio module integrated into the Home Assistant Yellow appliance for Rasberry Pi 4 Compute Module). And the "universal-silabs-flasher" firmware tool was made by puddly who is also one of the lead developers of zigpy and the radio libraries for zigpy that is used in Home Assistant's ZHA integration (among other projects).

can't read Zigbee configuration

when I restore configuration Zigbee module, in macOS version can't read Zigbee configuration. zigpy_znp.tools Unknown error. I open json file with configuration, zigstar program starting and ending with error

image

IEEE write not working with Sonoff dongle

With Sonoff Dongle Plus (ZbDongle-P), when I introduce the IEE from the other coordinator:

  • IEEE field filled with the address of another coordinador
  • Right side, with only "Write IEEE" and with nothing markes, in both cases after pressing "Write IEEE" no error reported, but the original IEEE it's refreshed in the field, not the one introduced.

Consider switching to Electrorama's llama-bsl fork of cc2538-bsl

@xyzroe @mercenaruss FYI, cc2538-bsl is quite stable but probably seen JelmerT is not so much longer actively developing it.

Might want to consider switching to Electrorama's llama-bsl fork of cc2538-bsl if @omerk will continue development on it:

https://github.com/electrolama/llama-bsl

Guess he does not have a lot of time either however he have great ideas on making it more user-friendly and easy to use:

https://github.com/electrolama/llama-bsl/issues

Personally, I especially like the idea he posted to Koenkk about adding index.json with a list of firmware updates to his Z-Stack-firmware repo so that it can be used by other software an index for or automatic firmware downloads for board types/roles:

Koenkk/Z-Stack-firmware#310

Running On Windows - Invalid Syntax

\ZigStarGW-MT-main\ZigStarGW-MT-main>ZigStarGW-MT.py
Traceback (most recent call last):
File "\ZigStarGW-MT-main\ZigStarGW-MT-main\ZigStarGW-MT.py", line 13, in
from ui import main, etc
File "\ZigStarGW-MT-main\ZigStarGW-MT-main\ui\etc.py", line 12, in
import cc2538_bsl
File "\ZigStarGW-MT-main\ZigStarGW-MT-main\cc2538_bsl.py", line 1
./cc2538-bsl/cc2538-bsl.py
^
SyntaxError: invalid syntax

Firmware flashing extremely slow

At least on my Windows 10 machine firmware flashing is extremely slow.
This is caused by Nagle algorithm, because of writing some bytes, waiting for ack, ....
As you have cc2538-bsl.py local anyway, you can add these lines to make flash upload really fast.
I tested it by running cc2538-bsl.py from command line:

import socket

...

# in function def open()
        self.sp.open()
        if hasattr(self.sp, '_socket'):
            self.sp._socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)

Thank you!

error: local variable 'chip' referenced before assignment

I'm trying to flash the ZigStar UZG device (version 0.3) with the CC1352P7 chip according to their instructions: https://uzg.zig-star.com/flashing-and-updating/#multi-tool-ethernet

Flashing CC1352P7_coordinator_20230507.hex I get the following command line output on Ubuntu:

$ python ZigStarGW-MT.py
Opening port socket://192.168.1.5:6638, baud 500000
Reading data from /home/stadicus/github/ZigStarGW-MT/CC1352P7_coordinator_20230507.hex
Firmware file: Intel Hex
Connecting to target...
local variable 'chip' referenced before assignment

The progress bar immediately shows 100%, with the same error message in the status row below.

Any thoughts how to get the flashing process working?

IEEE update

Hello
I did not update the IEEE. I change the current IEEE of the sonoff dongle P for the old one of my zigbee2mqtt network but it does not update it finishing without errors "All is OK. Restarting Zigbee

Thank you

Auto BSL reset not working with USB adapters using Silabs CP2102N like Sonoff USB Plus Dongle

FYI, automatic BSL reset not working on Windows OS (Microsoft Windows 10 operating system) with USB adapters based on Silicon Labs CP2102N USB-to-UART chip and TI CC2652P Zigbee chip like the new SONOFF Zigbee 3.0 USB Dongle Plus by ITead:

https://itead.cc/product/sonoff-zigbee-3-0-usb-dongle-plus/

Get error message:

Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'

Know issue in upstream cc2538-bsl by JelmerT but a workaround do exist by using boot reset code from Sonoff uartlog.py script:

JelmerT/cc2538-bsl#113

image

ZigStarGW-MT-x64.exe.zip doesn't work

  1. I ran ZigStarGW-MT.exe and nothing happened.
  2. I noticed the process took 100% of one core - in background - it didn't show GUI.
  3. I had to kill it.

Tested on Win 10 x64.

Windows version fails completely :(

I have this in Admin mode...

The Good News: launch works. Refresh to find port (COM4) works.

The bad news (Win10 Pro 22H2, 19045.3208 on HP Zbook nice i( laptop ;) )
Two repeatable issues:

  • Read IEEE gives: "Connecting to target" (delay) then"write timeout"
  • Read nvRAM gives "could not open port 'COM4': PermissionError(13, 'Access is denied', None, 5)

Plus one one-off Event Viewer event.
Faulting application name: ZigStarGW-MT.exe, version: 0.3.5.0, time stamp: 0x61689c3d
Faulting module name: Qt5Core.dll, version: 5.15.2.0, time stamp: 0x5fa4dd3b
Exception code: 0xc0000409
Fault offset: 0x00000000000204e8
Faulting process id: 0x7f24

"unknown error!" when trying to read/erase NVRAM

I'm getting this "unknown error!" message when attempting to erase or read the NVRAM from my CC2652R usb.
Is there a place where there would be logs or something to show why this would be happening? Thanks!

Screenshot 2022-11-11 093048

VirusTotal Scan - Potentially Malicious Score

https://www.virustotal.com/gui/file/535f9373170102ff33fb3b456cad5a63c47ca1da8447aee66f44e51e9b85b38c/detection

5 of 67 detect something
Antiy-AVL
Trojan/Generic.ASMalwS.34C668C
Gridinsoft
Trojan.Win64.Downloader.oa!s1
Jiangmin
TrojanDownloader.PsDownload.ww
SecureAge APEX
Malicious
Zillya
Trojan.Agent.Script.1640570

Further analysis on https://analyze.intezer.com hints its probably packed with an extremely suspicious activity noted:
Created a process from a suspicious location
High
File executed:C:\Users\mike\AppData\Local\Temp\535f9373170102ff33fb3b45.exe,Commandline executed:\C:\Users\mike\AppData\Local\Temp\535f9373170102ff33fb3b45.exe
File executed:C:\Users\mike\AppData\Local\Temp\535f9373170102ff33fb3b45.exe
Commandline executed:\C:\Users\mike\AppData\Local\Temp\535f9373170102ff33fb3b45.exe\

Intezer found various paths hinting possible evidence of Mimikatz malware during execution analysis. The results are inconclusive, but warrant a response and investigation.

UZG-01 CC2652P flashing error: local variable 'chip' referenced before assignment

Hello,

I'm follwing instruction https://uzg.zig-star.com/flashing-and-updating/#multi-tool-ethernet to flash UZG-01 based on the CC2652P chip with the following firmware: https://github.com/Koenkk/Z-Stack-firmware/blob/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20230507.zip

And getting similar issue as decribed here #22 with the only difference that it is CC2652P chip.

local variable 'chip' referenced before assignment

image
image

Could you please advise what is the problem here?

Thanks.

Adding Linux instructions

It took a few minutes to have it running on Linux (Fedora 35) - I'd share for others and maybe you can feature it in the main Readme.

First, setup your environment:

mkdir zigstar-flash
cd zigstar-flash

Second, download this repo:

git clone --recurse-submodules https://github.com/xyzroe/ZigStarGW-MT.git

Third, create a Virtual Environment:

python -m venv venv-zigbeeflash
source venv-zigbeeflash/bin/activate 
pip install --upgrade pip

Last, You (only) need to install a few Python modules, but for simplicity, install them using the requirements file:

pip install -r ZigStarGW-MT/requirements.txt

You can now execute the program:

python ZigStarGW-MT.py

For SONOFF Zigbee 3.0 USB Dongle Plus:
You have to open it, press the boot button and while this is pressed insert the dongle into your usb port.
If you don't do it, the error log is Timeout waiting for ACK/NACK after 'Synch (0x55 0x55)'.
image

Gallery:
image
image

[REQUEST] Silicon Labs EFR32 Flasher support in the ZigStar Multi Tool application?

@xyzroe any chance you consider adding Silicon Labs EFR32 Flasher support in the ZigStar Multi Tool application?

Could code from @mercenaruss ZigStar Silabs-Flasher (fork of Nabu Casa's universal-silabs-flasher) maybe be used base for that?

https://github.com/mercenaruss/zigstar_addons/tree/main/zigstar-silabs-flasher

or the upstream universal-silabs-flasher?

https://github.com/NabuCasa/universal-silabs-flasher

By the way, recommend also check out darkxst's fork which fixes some issues and adds better support for other adapters:

https://github.com/darkxst/multipan_flasher

cannot write IEEE address on Zigstar Stick V4

I cannot write my old stick address on a Zigstar stick V4.
The stick gets into BSL and the write shows as successful, but it resets it's value to the original IEEE.
Even after erase, firmware write.. I tried all possibilities.

Any idea why I cannot write the IEEE address ?

P.S. I used the latest version v0.3.5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.