• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

ESP32 Software Serial library issue

Q&A Forum › Category: ESP32 › ESP32 Software Serial library issue
0 Vote Up Vote Down
Paul asked 3 years ago

Hello Rui /Sara
I was having a problem with building the software for this project in VScode/Platformio.  I have used this Platformio with Arduino extension many times in my various projects with the ESP32, and have not had any issues with the serial ports.
Creating the project in Platformio and entering the code from page 47/48 of the pdf, when building an error resulted: ” \SoftwareSerial.cpp:42:27: fatal error: avr/interrupt.h: No such file or directory”.    This was resolved (I think…) by finding an EspSoftwareSerial library in the Arduino libraries and copying (renaming it to SoftwareSerial) this to the .platformio/lib/SoftwareSerial folder.  After this, the build worked and downloading to the ESP32 resulted in a connection the Firebase db as per the pdf. (and the serial monitor worked).
Just wondering if you any idea why this happened?
Many thanks in advance, and I am enjoying your work on this project.
Best Regards,
Paul Smulders

Question Tags: Firebase DB
10 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi Paul.
I’m not sure.
Maybe your ESP32 boards’ installation is outdated?
That error never happened to me before…
I’m sorry that I can’t help much.
Regards,
Sara
 

0 Vote Up Vote Down
Paul answered 3 years ago

Thank you Sara for the quick response, much appreciated.
Best Regards, Paul
 

0 Vote Up Vote Down
Paul answered 3 years ago

Hello Sara, One step forward ….  I\’ve managed to connect to the data base, but \”Permissions denied\” results when trying to write data via the sendFloat() function.  I\’ve changed the db Rules to: \”read\” :  true and \”write\” : true   and all works properly.  (restoring the Rules results in Permission Denied again).   I\’ve verified the email and password (even changed the password) to no avail.  Any ideas on next steps for trouble-shooting this issue would be welcome. Best Regards, Paul

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
That may be because your user UID doesn’t match the UID you have on the database.
Check your database nodes and that you are trying to write to the nodes under the node with the user UID. See page 31 and 32.
Regards,
Sara
 

0 Vote Up Vote Down
Paul answered 3 years ago

Hi Sara,
The issue I’m having is when I set the DB Rules to “write”: true then all works well and values are written to the db. I imagine this means the User uid is correct (and also the s/w obtains (reads) the uid (line 132 of the code).  When I change the DB Rules to “write”: $uid === auth.id” then permission to write is denied.  I’ve changed the password to something simple and verified the e-mail address (no luck).  I’ve finally copied the entire code from the resources (inserting the appropriate API_KEY etc.) but no luck, same result.  Any ideas ??
Best Regards,
Paul
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
No, that doesn’t mean that. That means exactly the opposite.
Please double-check the user UID on the database and that the UID is the same written by the ESP board when you first run the sketch, and the same that is on the Users table on the Firebase Console.
 
Please, let me know if this is confusing, I can try to send some pictures.
Regards,
Sara

0 Vote Up Vote Down
Paul answered 3 years ago

Hi Sara,
I’ve checked (ie copied from the Console and pasted into sketch as a comment in order to verify) the UID on the database (Authentication/Users/User UID) and it matches with the ESP board when the sketch is first run.
 Any ideas ??
I’ve continued on with sec 3.4 Streaming DB, works as long as db Rules are set to true.
BR Paul

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
If all UIDs match, I don’t know what else could be the issue 😐
I’m sorry that I can’t help much.
Regards,
Sara

0 Vote Up Vote Down
Paul answered 3 years ago

Hi Sara,
After more checking, it appears using “$uid === auth.id” is not a good idea …
should be “$uid === auth.uid”.  All is working now with email/password authentication DB Rules.
Sorry for the trouble … just an old guy messing with stuff.
BR Paul

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Ahhh.
I didn’t notice that you were using an incorrect notation…
Everything is correct in the eBook.
Don’t worry, those things happen sometimes.
I’ll close this issue. If you need further help, you just need to open a new question in our forum.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.