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

Cannot flash electron OTA if MQTT clinet is connected. #67

Open
kostbill opened this issue Oct 25, 2017 · 5 comments
Open

Cannot flash electron OTA if MQTT clinet is connected. #67

kostbill opened this issue Oct 25, 2017 · 5 comments

Comments

@kostbill
Copy link

If I run the mqtttest I cannot OTA my electron.
If I don't connect to MQTT broker then I can program it.

This is in the electron. In the photon it is working fine.

@hirotakaster
Copy link
Owner

@kostbill
Please tell me the details or source code. I don't have your problem.

@kostbill
Copy link
Author

kostbill commented Nov 6, 2017

Hi, thanks for answering me.

Later today I will bring up the example and paste the code here.

@CameronTurner
Copy link

I have found a similar issue. The workaround was to use client.disconnect() triggered via the cloud, then to run the OTA update.

But this is a poor workaround and implies something is wrong elsewhere. I'm not sure, but some assumptions (given I'm running in threaded mode).

Some possibilities could be:

  1. Code is blocking the network stack to the OTA function can not connect (or can't fully complete a full load of data) (I have noticed other cloud API calls are slower then the MQTT library is running)
  2. The ping time is too short that when it runs, it is using up too many resources for the device to be able to run a OTA update and MQTT transmission at the same time. Either memory or shared resource related?
  3. The MQTT comms coming back from the broker hold up something in the TCP/comms stack that results in the Particle connection being lost or timing out because it is sharing too much throughput?

Not sure!

@CameronTurner
Copy link

@kostbill

Did you find a resolution? or cause?

@hirotakaster
Copy link
Owner

Hi @CameronTurner ,

1-3 that maybe firmware & tcpclient api problem. this library network stack is using tcpclient on particle. check the tcpclient&OTA or firmware source code with your non-blocking simple source code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants