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

Avoid while (true) { .. } during TI CC2531 startup #46

Open
nicolaiw opened this issue Apr 5, 2019 · 4 comments
Open

Avoid while (true) { .. } during TI CC2531 startup #46

nicolaiw opened this issue Apr 5, 2019 · 4 comments
Assignees
Labels
breaking-change enhancement New feature or request help wanted Extra attention is needed

Comments

@nicolaiw
Copy link
Contributor

nicolaiw commented Apr 5, 2019

Avoid while (true) { .. } during TI CC2531 startup

see:
https://github.com/zigbeenet/ZigbeeNet/blob/master/src/ZigBeeNet.Hardware.TI.CC2531/ZigBeeDongleTiCc2531.cs#L234

@nicolaiw
Copy link
Contributor Author

nicolaiw commented Apr 5, 2019

Because there is already a changed event for the network state (see: https://github.com/zigbeenet/ZigbeeNet/blob/master/src/ZigBeeNet.Hardware.TI.CC2531/Network/NetworkManager.cs#L102) it should not be too difficult to refactor the Startup() method of the ZigBeeDongleTiCc2531 class returning a Task. For this I would recommend a TaskCompletionSource where the result will be set in the event handler.

@nicolaiw nicolaiw added enhancement New feature or request breaking-change labels Apr 8, 2019
@Mr-Markus Mr-Markus assigned Mr-Markus and nicolaiw and unassigned Mr-Markus May 8, 2019
@nicolaiw nicolaiw removed their assignment May 24, 2019
Mr-Markus added a commit that referenced this issue Jun 3, 2019
@Mr-Markus Mr-Markus self-assigned this Jun 4, 2019
@Mr-Markus
Copy link
Owner

I began work on branch https://github.com/zigbeenet/ZigbeeNet/tree/feature/asyncStartup_issue46 and most code is implemented, but there is one thing which does not work.

When I start the sample application the hardware sends first requests sucessfully and gets responses, but while calling CreateEndpoint method and sending an AFRegister Request the response is null: https://github.com/zigbeenet/ZigbeeNet/blob/e005f2f4898742b486e577a7abc216ccd3403d15/libraries/ZigBeeNet.Hardware.TI.CC2531/ZigBeeDongleTiCc2531.cs#L321-L325

Does anyone have an idea?

I will fix this issue before creating the first release, because it is an breaking change for the caller of the library

@Mr-Markus Mr-Markus added the help wanted Extra attention is needed label Jun 11, 2019
@Mr-Markus Mr-Markus pinned this issue Jun 17, 2019
@Mr-Markus Mr-Markus unpinned this issue Oct 28, 2019
@Mr-Markus
Copy link
Owner

Closed due to inactivity. Does not break programm

@nicolaiw
Copy link
Contributor Author

nicolaiw commented Jan 23, 2020

Hello Markus,

would you mind to reopen this Issue ? Just as a reminder.

Regards,
Nicolai

@Mr-Markus Mr-Markus reopened this Jan 28, 2020
@Mr-Markus Mr-Markus assigned nicolaiw and unassigned Mr-Markus Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants