-
Notifications
You must be signed in to change notification settings - Fork 157
Help! The library does not work for me! #92
Comments
Hello. thank you for the examples. Device you're using = ESP8266 WEMOS D1 MIN My Problem is:
With this line: netClient->setInsecure(); in the mqttConnect method I have a valid connection. Debug Output: SPIFFSImpl: allocating %zd+%z d+%z d=%z d bytes BSSL: Connection will fail, no authentication method is setup:wr 224 0 |
I don’t get why are u getting cheaper technology . Esp32 are so cheap , and working super good . Btw , can u post your source code ? |
@MauriceWallbott Make sure that you uploaded the root certificate using the ESP8266 FS upload tool. @BizNinja Good to see things worked smoothly on the ESP32, the sample code assumes there's FLASH on the board, which some of the barebones models don't include :) |
I'm trying to run the Esp8266-lwmqtt example with the following environment:
I compiled the sketch and enabled the logging in WiFiClientSecureBearSSL.cpp. I have uploaded the root certificate to SPIFFS. When I run the sketch, I get the following logging output:
This repeats forever. Note that the "connected!" message is misleading, as it appears although the connection actually failed. The following code does not check the return vaule of the call to
See also
This returns without setting As a workaround I can add a call |
Update about my attempts to run the Esp8266-lwmqtt example: After switching back to ESP8266 Arduino SDK version 2.4.2 the example works as expected without any further change. |
@smuehlst Thanks for the update! |
@gguuss Are there known problems with the ESP8266 SDK 2.5.1, or should the Esp8266-lwmqtt example work in general with this version? |
@smuehlst Good question, I'm seeing the same behavior as you're seeing with 2.5.1. There's a lot that was changed for the 2.5 releases including the switch to BEAR_SSL, unification of the file systems. There's probably some changes that are necessary to support this version. |
@gguuss Thanks, I'll stick to 2.4.2 then for the time being. |
It may be worth trying to update the certificate bytes and retrying with 2.5.x but I won't be able to look further into it today. |
@gguuss @smuehlst The payload get s created but it s never sent to cloud. What am I doing wrong? Can you help me fix this please? |
@MarcuCristian Are you calling the "sendTelemetry" function with the value you want to publish? Also, when you pull from the PubSub subscription you have created on the PubSub topic associated with your device registry are you seeing the built-in messages published to the topic, e.g.
|
@gguuss I don't know how to fix this, i'll just start from scratch, think i did something wrong on the way! |
@MarcuCristian It's very strange that you were seeing the configuration message get sent - you may want to double check the values in |
@gguuss If this is it (and i think this was the problem) it's actually laughable.. sooo this is the first time I'm using the google cloud platform, and I have a trial account with the 300$ credit from the start... all good just that the account was not activated in order to use that credit so the functionality of the platform was off. |
@MarcuCristian Glad to hear it started working, I can follow up with the product team to see if there's a way we can get a 'grace' quota for our APIs. Also will add a note to the README. |
Hi @gguuss, thank you for this library. I've been trying to set it up but I ran across some issues and I was hoping you could help me with some insight here. Device you're using: Adafruit Feather HUZZAH with ESP8266 Similar to issue #99, I'm still having token expiration issues at v1.1.6:
I'm waiting to see if when the JWT expires the connection will correct itself; but it hasn't happened yet. UPDATE:It's working now; after creating a new project and following the README instructions again. |
Hi Gus, where is the "sendTelemetry" function defined? I was looking around for it but the link in one of your articles is broken: |
@extracheez It should be linked here in the example and here in the library. |
Ah publishTelemetry isn't working for me: So far I can connect the device to iot and send messages and config to the device. I can also see every time publishTelemetry is called that stackdriver logs it. Unfortunately when I try to pull I get "Listed 0 items". Here is a screen shot of my stackdriver logs, serial monitor and terminal
`08:24:22.932 -> connected! 08:24:23.297 -> incoming: /devices/atest-dev/config - test config 08:24:23.297 -> incoming: /devices/atest-dev/config - test config 08:25:09.606 -> Wifi: -73db 08:26:09.588 -> Wifi: -74db 08:27:01.558 -> incoming: /devices/atest-dev/commands - test command 08:27:09.618 -> Wifi: -73db`
Sorry if I'm missing something basic. I'm very new to all this. |
@extracheez It looks to me like you're REALLY close! You need to both have a PubSub topic as well as a subscription to the PubSub topic. When you pull the subscription, you will see the messages appear. As an alternative to using PubSub, you can publish state messages and they will appear in the Google Cloud Console. I'll update the link in my blog. |
Success! Thank you! |
@Tarun1303 What version of the SDK and library are you using? A few things worth checking:
You may want to try regenerating your key, registering it again, then double-checking all the parameters in |
A few suggested resolutions in this thread for ESP8266:
|
There are countries where esp32 vs esp-01s difference for example is significant compared to your wages. Or you may need like 100 devices for your company pet project. In this country. :) With esp-01s you can make whole packed installable solution of the price of an Esp32-wroom module itself. |
I am trying to compile the bone stock example for the ESP8266 (sample Esp8266-lwmqtt) and I'm getting an error:
I've been playing around adding libraries etc (a couple of 'BearSSL' libraries and their dependency) however haven't had any luck. I even removed any related library I could see and started the process over to be sure I had all dependencies without any luck. What am I missing folks? I'm sure it's something stupid but I've been scratching my head for a while now. EDIT: Of course I come across a solution moments after asking for help... For those who come across a similar issue the solution is: Update your board libraries. I remember now I had rolled back to a specific version for a tutorial I was trying to follow some time ago; I needed something newer. |
Device you're using: Arduino UNO Wifi Rev 2 I have problem compiling jwt, especially the encryption, nn. I'm missing cstring. I can't find any reference to cstring on the arduino pages. Changing all #include to #include "string.h" looks to work.
|
Yeah, this is not a supported board but you might be able to get it to work. My understanding is that the 328p does not have very much memory. |
The UNO Wifi: It looks too weak, locks up calling, ecc_gen_pub_key. Same code (with WifiNINA) works on the MKR-WIFI1010. |
@balp Interestingly enough it's using the ESP8266 for its modem, which is a supported target for this library. Unless you have a compelling reason to use this board, I'd recommend just using another one (e.g. MKR1000, ESP32/8266). |
Device you're using - ESP32 I'm trying to get the example sketch working. However, it get's stuck on "checking wifi". Please see serial monitor below:
The only changes I have made is #154 as it wasn't building without this |
I am using latest as of 20210808 with MKR1000. I get the following: ClientId: projects/a-test-project/locations/us-central1/registries/MKR_GCP_Tutorial/devices/CESMKR1000 repeated over and over No changes to code other than ciotcl.h. Would a wireshark capture help? |
Adding this issue here for tracking specific configuration issues from users.
Thank you for taking the time to help us figure out what's going on.
To help us out with narrowing down what's going on with your setup, please include the following information:
If you include what you're trying to do, it may also help to isolate the issue. This thread is intended for tracking resolutions so hopefully we'll get you sorted.
The text was updated successfully, but these errors were encountered: