Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Issue regarding Dongle Reset #125

@Aimen-Hammou

Description

@Aimen-Hammou

Hi,

I've downloaded the repository and run the mvn clean install. It gives me zero errors, so far so good.

I've created a main class, with this source code.

`
public static void main(String[] args) {

    final byte[] networkKey = null; // Default network key
    final SerialPort port = new SerialPortImpl("COM3");
    final ZigBeeDongle dongle = new ZigBeeDongleTiCc2531Impl(port, 4951, 11, networkKey, false);
    final ZigBeeApiDongleImpl api = new ZigBeeApiDongleImpl(dongle, false);
    
    api.startup();

    //final ZigBeeDevice device = api.getDevices().get(3);


    api.shutdown();
    port.close();
   
}

`

When api.startup() is called it fails at the dongle reset.

15:36:02 339  INFO   Loading network state...
15:36:02 558  INFO   Loading network state done.
15:36:07 581  WARN   Dongle reset failed. Assuming bootloader is running and sending magic byte 0xef.
15:36:12 583  WARN   Attempt to get out from bootloader failed.
15:36:12 583  WARN   Discarded stream: expected start byte but received this 0x00
15:36:12 583  INFO   Serial portName 'COM3' closed.
15:36:12 583  INFO   ZigBeeApi saving network state...
15:36:12 583  INFO   ZigBeeApi saving network state done.

To see what was going on in the background I decided to sniff the serial port, and it shows that the SYS-RESET command is sent, but dongle gives no response.

I also decided to test ZSmartSystem repository and it seems like the dongle answer to the reset command and does what is needed to do.

Hardware: SonOff CC2562

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions