[Solved] Android verify code button phone support + ESP8266 library hacking

Would love to be able to at least load the code editing window only to allow editing on the run, on an Android Mobile device and be able to just use the verify button to check the code. You could disable the upload button for now if that stuff is not available yet. PITA seeing the your screen is too small message when all you want to do is edit code, don't see why that would cause too much conflict with the UI, is there a hack I could do to get past that for now and continue editing code.

I tried to hack the esp8266 into it, via Library got as far as it complaining about uint8/32. Grabbed the esp8266wifi library folder from within the esp8266 board package and then dumped 2 of of it's higher include directories into it's main directory of the esp8266wifi library, seemed I was getting it closer and closer to a full verify. If anyone else get's this working let me know.

It will probably be a long time before the board manager is added, be nice to at least verify the esp8266 code on the webide.

Thank you.

They say Android is on the TO-DO list.

But if all you want to do is edit code there are a couple of apps already for that.

I feel your pain on the ESP's as that's something I would like to see too. I moved a lot of my thingspeak sensors to ESP8266 for sheer size and portability and love that the regular IDE handles them really well nowadays.

A board manager would be a great addition. You have my vote.

If you could do a step by step as to how you got it going on the android and how you got the ESPs to list I would appreciate it.

Yeah I was just hoping someone had some Chrome Developer Hack that would just make it work now for standard editing on the fly.

Yes I know about all those android IDE’s not a fan, Never got them to work properly with the esp8266 though I didn’t try very hard also wanted to share the code with “cloud” option which they wouldn’t help with.

Here is the steps for as far as I could take it, note I was just trying to get so I could verify the code with the verify button not actually upload the code ie it is just looking for missing header files.

So we just select any of the boards from the list say the uno etc (We don’t care were not uploading only verifying our code doesn’t have a silly syntax issue,etc).

If your on linux or whatever OS you should be able to find these same folders… After you add the esp8266 to your Local IDE, look in the folder /home/username/.arduino15/packages/

Here you will see the ESP8266 board package
Go in there until you find

Copy the folder ESP8266WiFi to a different location.

I first compressed this copy to a zip then uploaded it to the library manager on the webide then clicked the Libraries menu on the left of the webide click the customs tab, then click other boards link above that. Which it then showed up as a library with the esp8266 name on it(Image attached). I pressed the include button, which it then tossed a ton of includes at the top of the project:

#include <Arduino.h>
#include <Client.h>
#include <ESP8266WiFi.h>
#include <ESP8266WiFiAP.h>
#include <ESP8266WiFiGeneric.h>
#include <ESP8266WiFiMulti.h>
#include <ESP8266WiFiSTA.h>
#include <ESP8266WiFiScan.h>
#include <ESP8266WiFiType.h>
#include <Esp.h>
#include <FS.h>
#include <FSImpl.h>
#include <HardwareSerial.h>
#include <IPAddress.h>
#include <MD5Builder.h>
#include <Print.h>
#include <Printable.h>
#include <Schedule.h>
#include <Server.h>
#include <Stream.h>
#include <StreamString.h>
#include <Udp.h>
#include <Updater.h>
#include <WCharacter.h>
#include <WString.h>
#include <WiFiClient.h>
#include <WiFiClientSecure.h>
#include <WiFiServer.h>
#include <WiFiUdp.h>
#include <airkiss.h>
#include <at_custom.h>
#include <base64.h>
#include <binary.h>
#include <c_types.h>
#include <cbuf.h>
#include <cont.h>
#include <core_esp8266_features.h>
#include <core_version.h>
#include <debug.h>
#include <eagle_soc.h>
#include <eboot_command.h>
#include <esp8266_peri.h>
#include <espconn.h>
#include <espnow.h>
#include <ets_sys.h>
#include <flash_utils.h>
#include <gpio.h>
#include <i2s.h>
#include <i2s_reg.h>
#include <interrupts.h>
#include <ip_addr.h>
#include <md5.h>
#include <mem.h>
#include <mesh.h>
#include <os_type.h>
#include <osapi.h>
#include <pgmspace.h>
#include <ping.h>
#include <pwm.h>
#include <queue.h>
#include <sigma_delta.h>
#include <slc_register.h>
#include <smartconfig.h>
#include <sntp.h>
#include <spi_flash.h>
#include <spiffs_api.h>
#include <stdlib_noniso.h>
#include <twi.h>
#include <uart.h>
#include <uart_register.h>
#include <upgrade.h>
#include <user_config.h>
#include <user_interface.h>
#include <wiring_private.h>

Which I’m guessing is every file that I added to it’s main directory.

I could probably try commenting a bunch of them out to see if I get less warnings but eh never got that far.

The first file I had an issue on was <queue.h>
It was in: /home/username/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/tools/sdk/includes/
I just took this full folder and dumped it into the root directory of our ESP8266WiFi copy. Then tried to compile again it then gave me a <user_config.h> error which I found in: /home/username/.arduino15/packages/esp8266/hardware/esp8266/2.3.0/cores/esp8266/
so I did the same with that dumped that full directory in our ESP8266WiFi copy. So basically all those two specific files would be ESP8266WiFi/queue.h ESP8266WiFi/user_config.h etc…

After you add this stuff to the current zip package or compress another one then upload it to the webIDE library section again.

If it complains you have two libraries as I first had an issue with, as I was renaming the zip to different versions. Just hit the dropdown arrow beside the library text and hit remove library on everyone you see in there.

Then re-upload.

When you hit compile you will see a warning about wrong processor type

WARNING: library ESP8266WiFi1 claims to run on [esp8266] architecture(s) and may be incompatible with your current board which runs on [sam] architecture(s).

but it will carry on it’s marry way until it hits this error next in line:

In file included from /tmp/webide_tmp931199/libraries/ESP8266WiFi1/src/ESP8266WiFi.h:33:0,

from /tmp/webide_tmp931199/GDS7/GDS7.ino:3:

/tmp/webide_tmp931199/libraries/ESP8266WiFi1/src/ESP8266WiFiType.h:109:5: error: ‘uint8’ does not name a type

uint8 bssid[6];


Just to note I had to hit verify twice in order to see any debug text in the console not sure if this is just a bug with the WEBIDE currently or because we are forcing it to do something it doesn’t want to.

I looked up nfo on this error and found someone that said to include headers but that didn’t seem to fix it. Didn’t look into it further yet. Maybe I was just including those items in the wrong file or not uploading those files required.

Eventually I’m sure a verify would work with enough brute force effort.

Thank you for taking the time to post that up. Soon as I get some free time I will have a go here too.

We're working on making the verify button working without the agent running

That is good matteosuppo but just so you know it was already working, you just had to close the warning overlay. If you are going to make it better some how great!

Just to not not sure if they changed something but I got it working on my mobile device! Had to use Firefox and enable the accessability option to zooM any page, I also clicked give me desktop site as it would only give me the seafoam green create background that seemed to be overlaying the web editor as when it reloaded to the desktop version I quickly saw the editor behind the green.

After it loads hold the screen anyplace around the text editor box and drag your othet finger until you can see all that you want. Attached screenshot the white area is where the OSK is but it didn’t get properly captured.

@NonaSuomy thanks for your feedback!
Since it looks like many of you want to edit code on the fly on mobile we will make a simplified UI for it. We are currently working on the Library Manager and it may take a while but I will make the mockups for it and open an issue :slight_smile:

Thanks again!

00alis: @NonaSuomy thanks for your feedback! Since it looks like many of you want to edit code on the fly on mobile we will make a simplified UI for it. We are currently working on the Library Manager and it may take a while but I will make the mockups for it and open an issue :)

Thanks again!

Thank you, working awesome now on mobile! (Chrome/Firefox with Hacker Keyboard and 5 line portrait keyboard enabled in Input settings) Great work!