-
Notifications
You must be signed in to change notification settings - Fork 4
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
Compiler error when using Xenon #10
Comments
I don't have a Xenon device, but anyway, more information is needed. |
There is not much more to say...Plug a Xenon into an ethernet wing, claim it on particle, open web IDE and search for Papertrail library and select the example given. Use the example and compile - shows error unsupported platform. I edited the library .cpp file in my ignorance and removed the check and tried again. This resulted in a semi-bricked Xenon that took some time to recover. I subsequently loaded the Loggly example from your sister company and it worked. It is a pity since particle refer to your library in their documentation yet it clearly doesn't work. |
If you could point me to the exact line that failed to compile, I might be able to help you. |
OK, the problem is here https://github.com/barakwei/ParticlePapertrail/blob/master/src/papertrail.cpp#L13-L21 Notice that the library doesn't support anything other than WiFi or Cellular. I have no problem supporting ethernet as well, but I couldn't find an official API to resolve addresses (https://docs.particle.io/reference/device-os/firmware/xenon/#ethernet). When I look in the FW code it seems that Can you please check in a sample app if Ethernet.resolve("www.google.com") actually complies and return a valid address? If so, you can take the header file and the cpp file of this library and change the above method so it would work by adding
If this works, I'll update the library with the change. |
So if I use Ethernet.resolve("www.google.com") in a new app - it resolves
If I change the .cpp to :
and compile and flash - it bricks the Xenon - (green light fast flashing) and will not connect to cloud - I then have to put into DFU mode, and use CLI to "particle flash --usb tinker" and restore tinker app and only then will it reconnect back to the cloud Shared link to the web IDE app example |
OK, it's good to see it can resolve. I'm willing to release a new version just for this change. The reason for the device getting bricked will be hard to detect without a device, so I would start by trying to sending logs manually by using If you're manually sending logs and still getting stuck then you might need to debug more using serial and see when the device gets bricked. |
So I am using the example in the the library and after it is flashed to the device, the device normally restarts and connects to local ethernet and then to the particle cloud (colour sequence being slow green flash, fast green flash and then cyan flash and the cyan breathing) - in this instance when using the example, it goes from slow green flash to fast green flash and then will not continue - so user level app is not even being loaded as its still in the DeviceOS connection phase - only way out is a DFU refresh. I will experiment more this week end und let you know what I can find. |
The problem with the example is that it sends messages very early in the boot phase and this might be a problem. Try declaring and initializing the logger later (say in the |
The issue appears when the class is instantiated - with an empty Setup() and Loop() `#include "papertrail.h" // TODO: Change the host and ports to match yours. int i = 0; void setup() { void loop() { |
If the initialization is in |
This does not brick now - the serial messages are sent out ok. No events appear in my papertrail event log though. ` int i = 0; void setup() { void loop() { |
You're not using it right. Move the init line to the |
Then it lock up and the serial output stops - it doesn't brick though, but you have to put xenon in safe mode to re-flash again (even though its breathing cyan) ` int i = 0; void setup() { void loop() {
} ` |
I recently ran into this issue. The Xenon devices do not support direct TCP/UDP so options like logging via PaperTrail or connecting to an MQTT server are not possible. The Xenon should use Mesh.publish to push the request to the router which can send the data out to the wider world. |
Except when the xenon is plugged into an ethernet wing it does have TCP and can publish to MQTT, but paper trail is still broken.
Regards Shane
+27826010499
… On 06 Dec 2019, at 3:59 PM, Kevin Cooper ***@***.***> wrote:
I recently ran into this issue. The Xenon devices do not support direct TCP/UDP so options like logging via PaperTrail or connecting to an MQTT server are not possible.
The Xenon should use Mesh.publish to push the request to the router which can send the data out to the wider world.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Error unsupported with Xenon and Ethernet Wing
The text was updated successfully, but these errors were encountered: