-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WifiClient.available() fails with errno 88 #85
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
Comments
Are you using it through Arduino IDE or through IDF as component? |
Through the Arduino IDE. I just fetched the latest esp32-arduino, and the issue is still present. |
Maybe regression in IDF... I'll have a look. I'm working on new faster client anyway :) |
Do you have an outlook for the release date? |
I have a few drivers to write first and there are things that need fixing in IDF before networking is stable anyway :) |
interesting... I do not see any change that would break it and nobody else have reported it. Are you sure you are connected to the remote side? |
I was just about to ask about this same error. Tried two different examples, one here https://developer.ibm.com/recipes/tutorials/connect-an-esp32-to-the-watson-iot-platform/ and one here https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/using-arduino-ide (changed the include to use just wifi.h Similar error: and Any help would be appreciated. [Edit] |
I run MQTT on mine. Let me download the latest and reflash. |
Okay, so I can confirm, I'm seeing the same thing now on the latest. [E][WiFiClient.cpp:196] available(): 88 I have been running mine using MQTT for a few weeks, with no issues. I'll do so digging as well. |
Okay, so I did some playing. I was running on this commit: Going to the latest it breaks. So I reverted back to the commit, that worked, and slowly moved forwards through the commits. The following commit, is the one that breaks it: So I now have moved mine to this commit (1 prior to the one above that breaks it): I'm going to take a look around, and see if anything sticks out. |
I haven't found anything yet. However, I do have a question. Is there a way to get more advanced/detailed debug output. |
Is there any solution to this problem? If we use the commit 58ac6fb it is possible to read the response from the server, but at the end of some connections, it is no longer possible to communicate getting: [E][WiFiClient.cpp:62] connect(): socket: 23 |
The one major change that I see in the commit that you report as breaking things is the addition of "ethernet". Will ask around |
I was also seeing this last night. Running Arduino as a component, trying to connect to MQTT server via WiFi. I originally was using PubSubClient, and was going to change to mongoose today, but if It's a problem with Client, sounds like I should busy myself elsewhere. |
I have the same problem |
I'm having same trouble it is connecting but it's not, I can see the esp32 on a wifi sniffer and arduino serial monitor shows it outputting. |
Same issue here I will try manually merging the aforementioned commits onto my machine, that were reported 'working' - as a fix for now.. |
So I've been focused on this issue this weekend. The issue is in the TCP stack. I'm narrowing down where. The error, is on initial TCP connection to the MQTT server, and ever 15 seconds (Keep Alive timer). I did some deep packet, packet captures late last night. Will review today, and see what info I get from that, then go back into looking through the code. I'm also going to try any reproduce, by trying something other than MQTT also. I also have noticed, that on the last code that does work, it seems if you are doing too much communication over MQTT, it will lock the ESP32 up. |
Just an update. I can recreate this on just a standard pull of data from a website. I used SparkFuns test example, for their ESP32 Thing device. It's when the data comes back to the ESP32, is when it throws the error 88. What I've noticed inside ESP32, is Error 88 means, Function not implemented. I'm hoping to get to spend a little more time today on this. |
@sorscode I appreciate you deep-diving into this, as I am sure others will as well. It certainty appears to be a problem even at the simplest implementations (such as the sparkfun's example) as you have mentioned. *Even though I consider myself a seasoned c /c++ /etc troubleshooter, I am new to Espressif's line, and to the ESP-IDF, and is taking me some time to navigate through all the source - this gives me an appreciation for the progress you have made already! I did perform a very simple test, by ignoring the error in WiFiClient.available(), and forcing it to still return a 'count' (it of course, is returning an invalid 'count') - to see if I could parse out a response from the server anyhow, and yes the server response is available (see below). Which, I guess means there is something going wrong much deeper past " int res = ioctl(sockfd, FIONREAD, &count);" .. this you already knew, I know, but just thought I'd mention the fact that parsing a response is somewhat possible - despite the garbage the error is also giving us..
WiFi connected
HTTP/1.1 200 OK
1 success
0
|
Okay so lots of progress today. I'm now able to make commit 48abb79 work. The issue doesn't seem to be code related at all, but an actual library. I haven't attempted yet to determine which one, but I might take a swing at that, after I post this. So this is how I got it to work, after going through the entire Arduino Core. Do the following: (Sorry in advance I'm a Mac user, so you will have to do the equivalent in other OS's.) That is it. It will compile, and TCP functionality is restored. Mine has been running now for about 2 hours, and I've been sending it random MQTT commands, to do stupid stuff (ex. turn leds on/off, PWM on LEDs, and turn on relays). Now time to see if I can determine which file(s), is causing the problem. |
İ confirm that the ersion 58ac6fb is running without problems on sparkfun ESP32 dev board. What is the big difference between this and the actual version??? |
MrSinan - what version of Arduino IDE are you running, and did you do this with or without my mod? |
58ac6fb is working here too, not sure how I overlooked it, I'm certain I tried it at least once.. EDIT: I'll do a bit more testing in the next few days to be certain b82d0e1 is the last place before I start getting WifiClient.available() Error 88's) |
Interesting. I'm going to blow my esp32 folder away, and try again, without modification. Then start working up the commit level again. |
Okay, So I messed with this before I leave for work. I had to only apply the fix for only one of the commits, after that everything works fine up to e77ec63 (December 2nd, 2016). After that all produce the 88 error. If you are getting a CPU Panic or Halt, make sure you are not running off USB Power. I'm using a stable 5v Power Supply with 2A of available current to this board (ESP32 Dev). So everyone is aware, I pulled down the IDF late last night, and going to work with that, to find this issue. I will focus on it tonight for a couple hours, when I get back from work. |
@sorscode: i use the last version arduino ide. |
So I wanted to give an update. @me-no-dev and I have messed with this, and think a solution has been found. I'm running in the latest code, and working with no issues. I'm going to continue to test, and keep @me-no-dev updated, and hopefully have the fix in his next release. |
Appreciate all your work on this - how is it going? |
Right now, I'm waiting on @me-no-dev to release the lastest revision with IDF to test. I have it working just fine use the IDF, with Arduino as a component. Once he pushes his change, I will test, and report back. |
If anyone would like help testing, let me know. I'm using the Arduino 1.8.0 IDE with the espressif esp32 core. I'm using wifi.begin, connect, status, localIP and also PubSubClient subscribe, publish, and callback. I can also test udp begin, read, write functions. |
currently working on the build process (something broke) and I'll test quickly the server/udp libs I have prepped. If they work, I'll merge them. |
Updates are pushed, client is fixed, Server and UDP are added. I'm finally closing this |
I can confirm that it is working with the mqtt based IBM IoT Platform. Thanks! |
Works great! Thanks for your efforts on this one @me-no-dev @sorscode |
Thank you! |
Working great on my Widora/eBox esp32 and running Blynk! Great work guys! |
I'm trying to connect to an MQTT broker via WiFi. I'm able to execute the connection (I see it logged on the server), but when my client tries to read the answer from the server it fails, with the following line:
[E][WiFiClient.cpp:201] available(): 88
(the line number is different than the one in the current source code, because of some additional traces I added).
If I understand correctly, errno 88 means NOTIMPLEMENTED.
The text was updated successfully, but these errors were encountered: