-
Notifications
You must be signed in to change notification settings - Fork 47
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
Comments
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. |
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 |
Closed due to inactivity. Does not break programm |
Hello Markus, would you mind to reopen this Issue ? Just as a reminder. Regards, |
Avoid while (true) { .. } during TI CC2531 startup
see:
https://github.com/zigbeenet/ZigbeeNet/blob/master/src/ZigBeeNet.Hardware.TI.CC2531/ZigBeeDongleTiCc2531.cs#L234
The text was updated successfully, but these errors were encountered: