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

Can't connect to cloud w/ electron #8

Open
slobglob opened this issue Nov 18, 2017 · 3 comments
Open

Can't connect to cloud w/ electron #8

slobglob opened this issue Nov 18, 2017 · 3 comments

Comments

@slobglob
Copy link

Hey,
I was trying to integrate this lib with my Particle Electron project with no luck.
Went through the example and my electron is stuck on connecting to the cloud (blinking cyan).

I tried to build and flash the example from this repo with the same result as well.
I even tried this https://community.particle.io/t/new-library-papertrail/28105/7 workaround with no luck.
No matter what, it stays blinking cyan.
Only when I comment out the (with my values)
PapertrailLogHandler papertailHandler("logsX.papertrailapp.com", 12345, "MyProject");

The particle cloud connects and moves to breathing cyan, am I doing something wrong?
Or it just doesn't really work well with electron running 0.6.2 firmware?

Thanks.

@barakwei
Copy link
Owner

This was already reported in #7. I don't have an electron, so I can't repro it.
It seems like an error in the electron FW. Others have tried to send UDP in log handler and reported the same problem.

I suggest to open an issue in the spark/firmware repo, with a good repro case and hope for the best.

@technobly
Copy link

technobly commented Apr 10, 2018

Hello Friends! Firmware 0.8.0-rc.3 Pre-release is out on the Web IDE for Core/Photon/P1/Electron. This release fixes the issue seen above where recursive logging would lock up the application thread on the Electron. It's still not advisable to log too much over UDP on the Electron. I'll suggest two that work well below. Please see the release notes on the Particle Firmware Updates Thread

// app level over papertrail
PapertrailLogHandler papertrailLogHandler1(PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT, "MyAppName", System.deviceID(),
    LOG_LEVEL_NONE, {
    { "app", LOG_LEVEL_ALL }
    // TOO MUCH!!! { "system", LOG_LEVEL_ALL },
    // TOO MUCH!!! { "comm", LOG_LEVEL_ALL }
});

// system info and app level over papertrail
PapertrailLogHandler papertrailLogHandler2(PAPERTRAIL_HOSTNAME, PAPERTRAIL_PORT, "MyAppName", System.deviceID(),
    LOG_LEVEL_NONE, {
    { "app", LOG_LEVEL_ALL },
    { "system", LOG_LEVEL_INFO }
    // MAYBE { "comm", LOG_LEVEL_INFO }
});

@geeksville
Copy link

Just a note: Many cellphone networks are very aggressive in deciding to drop UDP packets if a cell is congested. So that may be the root problem for some users.

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

4 participants