-
Notifications
You must be signed in to change notification settings - Fork 13
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
Connect fail using BearSSL branch #32
Comments
Could the buffer be too small? << dc e0 11 2 f 61 74 65 72 6d 2d 64 35 61 34 65 65 2d 67 20 d 37 35 33 30 63 34 38 37 32 62 19 |
The buffer should be ok, the messages can be of (almost) any length. But 'Bad CRC' could show bad SPI connection. |
I'm sorry, I made a mistake on the UNO side. wrong: correct: But I can't connect.
|
I hope I understand the 'state' value well, then you are losing the connection.
Please try a sketch from Arduino/ESP8266 examples first in order to be sure there are no problems with your ESP8266 and it can connecti to the AP. |
I have changed some code in ConnectWithWAP:
It connected.
I pressed the UNO reset button several times. Since all GPIOs of ESP8266 are 5V tolerant, we don't need 5V/3V3 convertor.
|
Hi, I tested ConnectWithWPA sketch on my device (STM32F103 + ESP8266) and got correct results (run several times to be sure it gives the same result for each run).
|
I want to see your logs with _DEBUG_MESSAGES enabled. It’s mine: |
Edit: My SPI bus speed is 4 MHz.
|
Where is SPI SPEED defined in the header file? Maybe in my environment the last a0 message cannot be received by UNO.
So UNO demands a reconnection.
|
And I have one more question. Why are so many GET_CONN_STATUS_CMD issued?
This is UNO.
|
The function Edit: Connecting to my AP takes a time, so that more GET_CONN_STATUS_CMD commands are not unusual. The waiting loop for connecting is here:
|
If max_speed is not specified, UNO's SPI speed is probably 8Mhz. If max_speed is specified, SPI.beginTransaction is executed.
|
It's rather old code of mine, I can't remember all details, but AFAIK the endTransaction is not that important, try to slow down the bus.
|
For libraries that support SPI with transactions, SPI.begin() defines SPI_HAS_TRANSACTION.
Perhaps STM32's SPI LIBRARY may automatically issue endTransaction (). |
I believe, beginTransaction is for us useful only in the two lines (AVR):
The SPI transaction in an Arduino construction, there no such term in SPI bus definition. |
I don't know why don't work with 4Mhz. Thank you for your many support. |
@nopnop2002 , I have just checked out the newest Arduino/ESP8266 libraries Edit: and don't worry about SPI transactions, as long as we are the only one who uses the SPI bus (and we are), the beginTransaction is used only to setup the SPI bus clock. Yes, it is dirty in terms of Arduino transactions but totally irrelevant. |
Thank you for your help. EDIT) |
The problem is on ESP8266 side, described here: esp8266/Arduino#7432 |
The situation seems to be much easier :) Edit: to my big surprise, the change was introduced somewhere in 2020 in esp8266/Arduino repo, where they added a new item in enum in between the old values :( Edit: it is this commit: esp8266/Arduino#7652 |
I tried new branch.
This is my compile option using WeMos D1 Mini. |
Are you sure there is no issue with the SPI bus? My fix doesn't rely with the SPI bus at all. |
I am not sure we are heading the right way now. The latest release in esp8266/Arduino repo does not contain the changed |
I downgrade esp8266 core library from git version to release version.
But error don't fixed. I'm give up to use. |
Closing as the source of the problem lies outside this repo. I will update the library when the |
Thank you again. |
I flashed WiFiSpiESP BearSSL branch to WeMos D1 Mini(ESP12).
And I opened https://github.com/JiriBilek/WiFiSpi/tree/BearSSL/examples/ConnectWithWPA, edit ssid & pass, flashed to Arduino Uno.
And I connected D1 and UNO, Reset Uno.
But connection fail.
Do you have any help.
The text was updated successfully, but these errors were encountered: