-
Notifications
You must be signed in to change notification settings - Fork 124
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
Arduino UNO R4 WiFi support #232
Comments
I was refered to the SDK repository by a member of the thingsboard forum kindly see the link for previous discussions : Discussion) |
What exactly is the issue with Are you sure you can't simply use one of the premade examples for ESP32 on Arduino and then switch the WiFi include to WiFiS3 and change the WiFi initalization. |
Hi Matthew, I face similar issues such as the following forum post: Post |
Are you facing similair issues or the exact same? If it is this exact issue then please install this library. If this doesn't help then please post the exact issue messages you encountered, without them it is not possible to help further. |
I added the library and also made changes to the WifiS3.h but I still run into errors, Please see my code and errors below installed Librarties are Thingsboard 0.14.0 and TBsub 2.10.0: #include <ThingsBoard.h> constexpr char CURRENT_FIRMWARE_TITLE[] = "TEST"; WiFiClient wifiClient; ThingsBoard tb(mqttClient, MAX_MESSAGE_SIZE); void InitWiFi() { bool reconnect() { void setup() { } void loop() { if (!reconnect()) { if (!tb.connected()) { tb.loop(); Error: `/Users/nieljoubert/Desktop/Work/new/bare_bone_OTA_TB/bare_bone_OTA_TB.ino:20:44: error: no matching function for call to 'ThingsBoardSized<>::ThingsBoardSized(MqttClient&, const uint16_t&)' Compilation error: no matching function for call to 'ThingsBoardSized<>::ThingsBoardSized(MqttClient&, const uint16_t&)'` |
Yu are including You have to include the mqtt clients from the library itself the correct include would be |
Thanks for the feedback, I changed it and made sure only TBPubsub is installed otherwise it classes with other Pubsub libraries and ends in a failed state. I am now successfully seeing my device online on TB dashboard. Libraries used was the Thingsboard 0.14.0 and TBPubsubClient 2.10.0 (latest). Just for other people struggling with the same I am going to add the code used, it is a bare minimum code unencrypted :
|
Please don't close it as yet since I still want to see if I can proper modify one of your full examples to work with Arduino UNO Wifi R4 , I can then post the code here and you can maybe add it to the examples folder of Thingsboard Library for future Arduino UNO R4 Wifi users. or you can add it? Please let me know Kind regards |
From what I can see this is exactly the same as all examples in the library made for ESP32 or ESP8266 on Arduino, besides that the WiFi include is now WiFiS3. I don't think there is a real advantage of copying the examples in the folder completly simply because of one include. Especially because the Arduino UNO Wifi R4 uses the ESP32 under the hood anyway. So using the ESP32 examples would make sense to most people. |
Hi, yes, although there is some changes like : WiFiClient wifiClient; The main thing is to be able to receive OTA to arduino UNO, that is what I am struggling with currently, any suggestions? Here is the example from Arduino library, how would one intergate this to work with TB: This sketch demonstrates how to make an OTA Update on the UNO R4 WiFi.
|
From the code you showed me I don't know the exact methods the from Arduino implemented But you would need to write your own Once that is done simply create an instance of it and pass that to the To help you further I would need the link to the GitHub, where the The part we require to be implemented is one that receive a binary payload and then writes that somewhere, where it will then be used as firmware after we have finished writing it completely. For now if the binary on your device is simply contained on an SD card you can use the |
I also had to add |
There was no special library installed this was part of the examples of the Arduino UNO R4 Wifi (only installed board on board manager) Thanks for opening feature request . |
What I meant is the Source Code to the OTAUpdate file, but I found it myself. But as the board simply uses an ESP32 as the actual chip, I assume you could simply use any of the 2 ESP32 Updater Implementations. So either Arduino or Espressif Updater. And I'm realtively sure they should simply work. And how to use those implementation can be seen in the OTA Update examples for ESP32 in the examples folder of this library. |
The Arduino UNO R4 WiFi has an ESP32 chip onboard that is correct, but it also has a RA4M1 microprocessor from Renesas which actually handles all your code and then just speaks to the ESP32 via the WifiS3 library. Quoted from website "The Arduino UNO R4 WiFi merges the RA4M1 microprocessor from Renesas with the ESP32-S3 from Espressif" Therefore one cannot use simply the OTA code from TB written purely for the ESP32 ... there is however examples that shows how to do OTA on these boards. It is just a question on how to merge TB and that example to have a TB OTA for Arduino UNO. |
Yeah not 100% sure either but the code can be seen in the link I've commented above and it seems it is using the modem. In the end it is pretty simply, if you want to get OTA updates working you need to somehow write the binary data of the RA4M1. Not sure how that works, but once you know how to do that you can implment your own As I do not own an RA4M1, I'm not really able to test or write the Updater myself, and usages like these are exactly the reason that the |
Hi all I was wondering whether the Arduino UNO R4 WiFi will be supported in future updates?
The text was updated successfully, but these errors were encountered: