-
Notifications
You must be signed in to change notification settings - Fork 239
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
ESP32 to ESP32 using SoftwareBitBang and cable connection, no packets arrive #404
Comments
Here are both projects to try out: https://we.tl/t-lFjg2oIFPK |
btw., the issue number is 404 🙈 |
Ciao @SunboX I am sorry for answering you so late. I do not have the hardware to replicate your setup now, but I suspect there may be a wrong timing configuration in the esp8266. Please try to tweak SWBB_READ_DELAY and SWBB_BIT_WIDTH on the ESP8266 side (the right value may be shorter or longer, start with SWBB_READ_DELAY, if you don't see packets after tweaking it you may need to go back to its original value and try to tweak SWBB_BIT_WIDTH). Here to edit those values: https://github.com/gioblu/PJON/blob/master/src/strategies/SoftwareBitBang/Timing.h#L198-L201 |
@gioblu Thanks for your reply! Both were ESP32, not ESP8266. But thanks, I will try this and let you know the result! |
Sorry @SunboX in this case you should modify the constants here: https://github.com/gioblu/PJON/blob/master/src/strategies/SoftwareBitBang/Timing.h#L207 |
@gioblu Great! Seems I have success using this configuration on both ESP32 using pin 25: /* Heltech WiFi LoRa ESP32, generic ESP32 --------------------------------- */
#if defined(ESP32)
#if SWBB_MODE == 1
/* Added full support to MODE 1 - 28/06/2018
Working on pin: 12 and 25 */
#define SWBB_BIT_WIDTH 46
#define SWBB_BIT_SPACER 112
#define SWBB_ACCEPTANCE 40
#define SWBB_READ_DELAY -10
#endif
#endif I was using this example: and uncommented for both (sender and receiver) #define SWBB_MODE 1 and changed the pin for both to: bus.strategy.set_pin(25); Output:
|
@SunboX I don't have a way to test it now, but your test result shows it is working perfectly. |
@SunboX can I ask you to execute a test that would help me to verify your config? |
Hey, yes. That's no problem. I should have some Arduino in one of my boxes. I can have a look in some hours which ones I have and can tell you. |
Thank you very much @SunboX |
@gioblu Yesterday I tested the UNO (for some reason I could not flash my Duemilanove with macOS Monterey) together with the ESP32. It did not work. ;) I will investigate when I have a bit more time. |
try to remove the delay(1) from the main loop, put the send() to a counter to trigger it, and move all the serial output onto an event or counter to trigger it. you have alot happening in the main loop that might impact update() from running freely as bitbang requires. you are using send() very frequently which is non-blocking and has its own repeats, you might be maxing out a buffer or the bandwidth available on the wire. |
Hi,
I'm running a simple test, two ESP32 connected with one cable (GPIO 25 <-> GPIO 25), GND and 5V are also connected directly.
This is the code running on ESP32 "A":
And this is the code running on ESP32 "B":
Both are compiled and uploaded using PlatformIO with this ini file:
The Oszilloskope is showing some communication:
But no packet is arriving at any of both ESP32. Console log:
What's wrong? Why does no packet arrive?
The text was updated successfully, but these errors were encountered: