its been a long effort keeping at it! Check this out:
teensy host (T3.6) attached to an ESP8266, the code connects to a remote ESP not only to control the teensy, but, why stop there? let's control that teensy's ESP as well!
I created the dynamic ability to control both the ESP and TEENSY at the other end of the link. What does that mean? I can run UART data to teensy ports while running, ex, FASTLED stream on pin14 of the ESP attached to it.
This also entitles the user, to control the ESP in standalone mode, without the teensy attached to it, which, also frees up the endpoint communication uart protocol to allow controlling the esp's uart as well! I ran one of the uart display's off it yesturday! 
this is the video of the TEENSY attached to an ESP, controlling a standalone ESP with a led strip attached.
https://www.youtube.com/watch?v=qoj19DuCC90
Also! I didn't stop there! I decided to also write transparency code for the local master teensy!
here is a WifiScan.ino demo, slightly modified at the top, the rest code running as is, flashed to teensy!
Code:
/*
* This sketch demonstrates how to scan WiFi networks.
* The API is almost the same as with the WiFi Shield library,
* the most obvious difference being the different file you need to include:
*/
// #include "ESP8266WiFi.h" <<---- DELETED !!
////////////// ADDED ///////////////
#include <teensywifi_controller.h>
teensywifi_controller WiFi = teensywifi_controller("WiFi", &Serial1, "192.168.2.168:80");
/////////////////////////////////////
void setup() {
Serial.begin(115200);
Serial1.begin(1000000); ///// <---------------- ADDED
// Set WiFi to station mode and disconnect from an AP if it was previously connected
WiFi.mode(WIFI_STA);
WiFi.disconnect();
delay(100);
Serial.println("Setup done");
}
void loop() {
Serial.println("scan start");
// WiFi.scanNetworks will return the number of networks found
int n = WiFi.scanNetworks();
Serial.println("scan done");
if (n == 0)
Serial.println("no networks found");
else
{
Serial.print(n);
Serial.println(" networks found");
for (int i = 0; i < n; ++i)
{
// Print SSID and RSSI for each network found
Serial.print(i + 1);
Serial.print(": ");
Serial.print(WiFi.SSID(i));
Serial.print(" (");
Serial.print(WiFi.RSSI(i));
Serial.print(")");
Serial.println((WiFi.encryptionType(i) == ENC_TYPE_NONE)?" ":"*");
delay(10);
}
}
Serial.println("");
// Wait a bit before scanning again
delay(5000);
}
Now, we open up teensy Serial monitor! what do we see!???
Code:
scan done
16 networks found
1: BELL351 (-84)*
2: Bravo2 (-84)*
3: VIDEOTRON5907 (-89)*
4: CIK1000M_AC2.4G_9665 (-90)*
5: VIDEOTRON4858 (-81)*
6: Ma Connexion (-78)*
7: BELL649 (-77)*
8: Gemstelecom08945 (-85)*
9: DIRECT-16-HP OfficeJet 3830 (-86)*
10: BELL625 (-88)*
11: VIDEOTRON4729 (-89)*
12: SasoDei (-87)*
13: BELL171 (-91)*
14: 4D Systems (-57)*
15: Tony (-59)*
16: VIDEOTRON1438 (-86)*
scan start
scan done
15 networks found
1: BELL587 (-94)*
2: 4D Systems (-58)*
3: SasoDei (-87)*
4: VIDEOTRON4858 (-80)*
5: Tony (-57)*
6: VIDEOTRON5907 (-89)*
7: BELL351 (-83)*
8: Ma Connexion (-78)*
9: DIRECT-16-HP OfficeJet 3830 (-92)*
10: BELL649 (-80)*
11: Gemstelecom08945 (-90)*
12: VIDEOTRON1438 (-89)*
13: Primeconnect (-85)*
14: BELL171 (-86)*
15: Bravo2 (-85)*
scan start
scan done
18 networks found
1: BELL587 (-90)*
2: BELL065 (-90)*
3: BELL857 (-93)*
4: BELL678 (-89)*
5: VIDEOTRON1438 (-85)*
6: Bravo2 (-85)*
7: BELL171 (-90)*
8: Ma Connexion (-82)*
9: BELL649 (-80)*
10: DIRECT-16-HP OfficeJet 3830 (-91)*
11: BELL625 (-86)*
12: VIDEOTRON4729 (-92)*
13: BELL351 (-82)*
14: VIDEOTRON4858 (-80)*
15: Tony (-58)*
16: 4D Systems (-58)*
17: SasoDei (-86)*
18: VIDEOTRON5907 (-90)*
scan start
scan done
19 networks found
1: BELL678 (-90)*
2: BELL065 (-94)*
3: VIRGIN932 (-96)*
4: 4D Systems (-57)*
5: VIDEOTRON4858 (-80)*
6: VIDEOTRON1438 (-88)*
7: Tony (-57)*
8: Bravo2 (-86)*
9: SasoDei (-88)*
10: BELL625 (-86)*
11: BELL649 (-83)*
12: Gemstelecom08945 (-87)*
13: DIRECT-16-HP OfficeJet 3830 (-90)*
14: Ma Connexion (-80)*
15: VIDEOTRON4729 (-92)*
16: BELL171 (-90)*
17: Primeconnect (-88)*
18: VIDEOTRON5907 (-90)*
19: BELL351 (-85)*
scan start
scan done
17 networks found
1: BELL857 (-92)*
2: BELL678 (-89)*
3: Tony (-58)*
4: VIDEOTRON5907 (-88)*
5: BELL351 (-85)*
6: 4D Systems (-56)*
7: SasoDei (-85)*
8: BELL171 (-85)*
9: VIDEOTRON4858 (-80)*
10: BELL946 (-88)*
11: Ma Connexion (-80)*
12: BELL649 (-80)*
13: BELL625 (-87)*
14: VIDEOTRON4729 (-88)*
15: Primeconnect (-89)*
16: VIDEOTRON1438 (-84)*
17: Bravo2 (-87)*
scan start
scan done
17 networks found
1: VIRGIN932 (-93)*
2: 4D Systems (-57)*
3: SasoDei (-84)*
4: BELL171 (-86)*
5: VIDEOTRON4858 (-84)*
6: drahcir8 (-92)*
7: Tony (-58)*
8: VIDEOTRON5907 (-87)*
9: BELL351 (-82)*
10: CIK1000M_AC2.4G_9665 (-93)*
11: VIDEOTRON1438 (-87)*
12: Ma Connexion (-79)*
13: BELL649 (-81)*
14: Primeconnect (-85)*
15: Primeconnect-guest (-82)
16: BELL946 (-86)*
17: Bravo2 (-87)*
scan start
scan done
17 networks found
1: BELL678 (-89)*
2: Tony (-56)*
3: VIDEOTRON5907 (-90)*
4: BELL351 (-85)*
5: 4D Systems (-57)*
6: SasoDei (-87)*
7: VIDEOTRON4858 (-80)*
8: BELL171 (-86)*
9: VIDEOTRON1438 (-88)*
10: Ma Connexion (-80)*
11: BELL649 (-81)*
12: Gemstelecom08945 (-88)*
13: DIRECT-16-HP OfficeJet 3830 (-86)*
14: BELL625 (-85)*
15: BELL946 (-88)*
16: Primeconnect (-84)*
17: Bravo2 (-86)*
scan start
scan done
17 networks found
1: BELL678 (-88)*
2: Caesar (-94)*
3: 4D Systems (-59)*
4: SasoDei (-87)*
5: BELL171 (-88)*
6: VIDEOTRON4858 (-79)*
7: VIDEOTRON1438 (-87)*
8: Tony (-57)*
9: VIDEOTRON5907 (-88)*
10: BELL351 (-84)*
11: Ma Connexion (-77)*
12: BELL649 (-81)*
13: Gemstelecom08945 (-90)*
14: DIRECT-16-HP OfficeJet 3830 (-89)*
15: BELL625 (-87)*
16: VIDEOTRON4729 (-90)*
17: Bravo2 (-83)*
scan start
scan done
15 networks found
1: BELL678 (-90)*
2: VIDEOTRON1438 (-90)*
3: Tony (-62)*
4: 4D Systems (-59)*
5: BELL171 (-88)*
6: VIDEOTRON4858 (-81)*
7: VIDEOTRON5907 (-88)*
8: SasoDei (-83)*
9: Ma Connexion (-77)*
10: BELL649 (-80)*
11: VIDEOTRON4729 (-87)*
12: Bravo2 (-87)*
13: BELL846* (-85)*
14: Primeconnect (-89)*
15: BELL351 (-88)*
scan start
scan done
15 networks found
1: BELL678 (-87)*
2: BELL351 (-84)*
3: Bravo2 (-84)*
4: VIDEOTRON4858 (-81)*
5: VIDEOTRON5907 (-91)*
6: BELL171 (-89)*
7: BELL649 (-81)*
8: Ma Connexion (-79)*
9: Gemstelecom08945 (-90)*
10: DIRECT-16-HP OfficeJet 3830 (-86)*
11: 4D Systems (-57)*
12: SasoDei (-84)*
13: Primeconnect (-85)*
14: Tony (-56)*
15: VIDEOTRON1438 (-90)*
scan start
scan done
13 networks found
1: BELL678 (-92)*
2: 4D Systems (-59)*
3: VIDEOTRON4858 (-84)*
4: VIDEOTRON1438 (-89)*
5: Tony (-58)*
6: SasoDei (-92)*
7: CIK1000M_AC2.4G_9665 (-94)*
8: Bravo2 (-89)*
9: BELL430 (-93)*
10: Ma Connexion (-78)*
11: BELL649 (-80)*
12: Primeconnect (-87)*
13: BELL351 (-84)*
scan start
scan done
14 networks found
1: BELL678 (-90)*
2: 4D Systems (-57)*
3: SasoDei (-89)*
4: VIDEOTRON4858 (-81)*
5: VIDEOTRON1438 (-85)*
6: Tony (-57)*
7: BELL351 (-83)*
8: CIK1000M_AC2.4G_9665 (-92)*
9: Ma Connexion (-81)*
10: Gemstelecom08945 (-90)*
11: BELL649 (-83)*
12: VIDEOTRON4729 (-91)*
13: Primeconnect-guest (-86)
14: Bravo2 (-85)*
scan start
scan done
16 networks found
1: BELL678 (-90)*
2: VIDEOTRON4858 (-81)*
3: SasoDei (-89)*
4: VIDEOTRON5907 (-91)*
5: BELL351 (-91)*
6: 4D Systems (-63)*
7: Tony (-60)*
8: Gemstelecom08945 (-87)*
9: BELL649 (-85)*
10: DIRECT-16-HP OfficeJet 3830 (-89)*
11: BELL625 (-91)*
12: Primeconnect (-89)*
13: Primeconnect-guest (-85)
14: VIDEOTRON1438 (-90)*
15: Bravo2 (-89)*
16: BELL171 (-95)*
scan start
scan done
16 networks found
1: BELL678 (-90)*
2: Caesar (-92)*
3: Tony (-59)*
4: BELL351 (-84)*
5: 4D Systems (-59)*
6: BELL171 (-87)*
7: Ma Connexion (-80)*
8: BELL649 (-77)*
9: DIRECT-16-HP OfficeJet 3830 (-91)*
10: Gemstelecom08945 (-88)*
11: Bravo2 (-86)*
12: Primeconnect (-88)*
13: VIDEOTRON1438 (-89)*
14: VIDEOTRON4858 (-81)*
15: VIDEOTRON5907 (-91)*
16: SasoDei (-87)*
scan start
scan done
16 networks found
1: DIRECT-84-HP ENVY 4520 series (-92)*
2: BELL678 (-86)*
3: Bravo2 (-87)*
4: BELL171 (-87)*
5: 4D Systems (-61)*
6: VIDEOTRON1438 (-90)*
7: Tony (-63)*
8: Ma Connexion (-80)*
9: BELL649 (-82)*
10: DIRECT-16-HP OfficeJet 3830 (-87)*
11: Gemstelecom08945 (-90)*
12: SasoDei (-88)*
13: Primeconnect (-83)*
14: BELL351 (-81)*
15: VIDEOTRON4858 (-80)*
16: VIDEOTRON5907 (-92)*
scan start
scan done
14 networks found
1: SasoDei (-88)*
2: VIDEOTRON5907 (-88)*
3: BELL351 (-82)*
4: Bravo2 (-86)*
5: VIDEOTRON4858 (-82)*
6: 4D Systems (-57)*
7: Ma Connexion (-80)*
8: BELL649 (-78)*
9: Gemstelecom08945 (-88)*
10: Tony (-56)*
11: Primeconnect-guest (-86)
12: Primeconnect (-81)*
13: BELL171 (-89)*
14: VIDEOTRON1438 (-83)*
scan start
scan done
14 networks found
1: Tony (-58)*
2: Bravo2 (-86)*
3: SasoDei (-84)*
4: VIDEOTRON1438 (-79)*
5: CIK1000M_AC2.4G_9665 (-93)*
6: Ma Connexion (-86)*
7: DIRECT-16-HP OfficeJet 3830 (-93)*
8: Gemstelecom08945 (-87)*
9: BELL649 (-81)*
10: BELL625 (-86)*
11: BELL351 (-86)*
12: Primeconnect (-84)*
13: VIDEOTRON4858 (-81)*
14: 4D Systems (-57)*
scan start
scan done
17 networks found
1: VIDEOTRON1438 (-90)*
2: BELL351 (-85)*
3: BELL171 (-88)*
4: Tony (-58)*
5: CIK1000M_AC2.4G_9665 (-91)*
6: 4D Systems (-59)*
7: SasoDei (-83)*
8: Ma Connexion (-85)*
9: BELL649 (-79)*
10: DIRECT-16-HP OfficeJet 3830 (-90)*
11: Gemstelecom08945 (-89)*
12: BELL625 (-88)*
13: VIDEOTRON4729 (-92)*
14: Bravo2 (-87)*
15: Primeconnect (-84)*
16: VIDEOTRON5907 (-90)*
17: VIDEOTRON4858 (-83)*
scan start
scan done
14 networks found
1: BELL171 (-91)*
2: 4D Systems (-60)*
3: VIDEOTRON4858 (-83)*
4: VIDEOTRON1438 (-89)*
5: SasoDei (-88)*
6: CIK1000M_AC2.4G_9665 (-91)*
7: Bravo2 (-86)*
8: VIDEOTRON4729 (-92)*
9: Gemstelecom08945 (-86)*
10: BELL649 (-79)*
11: BELL625 (-90)*
12: Tony (-57)*
13: Primeconnect (-86)*
14: BELL351 (-87)*
scan start
scan done
20 networks found
1: BELL678 (-89)*
2: VIRGIN932 (-95)*
3: 4D Systems (-59)*
4: VIDEOTRON4858 (-81)*
5: Tony (-57)*
6: BELL351 (-85)*
7: BELL545 (-89)*
8: BELL171 (-89)*
9: CIK1000M_AC2.4G_9665 (-90)*
10: VIDEOTRON5907 (-91)*
11: SasoDei (-86)*
12: Ma Connexion (-84)*
13: BELL649 (-79)*
14: Gemstelecom08945 (-88)*
15: DIRECT-16-HP OfficeJet 3830 (-93)*
16: BELL625 (-88)*
17: VIDEOTRON1438 (-84)*
18: Primeconnect (-86)*
19: BELL846* (-87)*
20: Primeconnect-guest (-86)
scan start
scan done
18 networks found
1: Bravo2 (-88)*
2: 4D Systems (-59)*
3: SasoDei (-87)*
4: Tony (-61)*
5: VIDEOTRON1438 (-84)*
6: Ma Connexion (-84)*
7: BELL649 (-80)*
8: Gemstelecom08945 (-87)*
9: DIRECT-16-HP OfficeJet 3830 (-91)*
10: VIDEOTRON4729 (-94)*
11: BELL625 (-90)*
12: BELL351 (-89)*
13: BELL171 (-89)*
14: Primeconnect (-89)*
15: Primeconnect-guest (-83)
16: VIDEOTRON4858 (-84)*
17: BELL946 (-89)*
18: VIDEOTRON5907 (-93)*
scan start
scan done
15 networks found
1: VIDEOTRON1438 (-85)*
2: Tony (-59)*
3: VIDEOTRON5907 (-91)*
4: BELL171 (-87)*
5: 4D Systems (-56)*
6: SasoDei (-84)*
7: VIDEOTRON4858 (-79)*
8: Ma Connexion (-81)*
9: DIRECT-16-HP OfficeJet 3830 (-87)*
10: BELL649 (-80)*
11: BELL625 (-86)*
12: VIDEOTRON4729 (-92)*
13: Gemstelecom08945 (-87)*
14: Bravo2 (-84)*
15: BELL351 (-89)*
scan start
scan done
17 networks found
1: BELL678 (-92)*
2: BELL351 (-90)*
3: Bravo2 (-90)*
4: VIDEOTRON4858 (-81)*
5: VIDEOTRON5907 (-91)*
6: CIK1000M_AC2.4G_9665 (-88)*
7: BELL545 (-91)*
8: Ma Connexion (-81)*
9: BELL649 (-80)*
10: Gemstelecom08945 (-87)*
11: BELL946 (-88)*
12: 4D Systems (-57)*
13: SasoDei (-86)*
14: Primeconnect (-86)*
15: Tony (-58)*
16: VIDEOTRON1438 (-87)*
17: BELL171 (-90)*
scan start
scan done
18 networks found
1: BELL678 (-90)*
2: VIDEOTRON4858 (-83)*
3: VIDEOTRON5907 (-90)*
4: BELL351 (-88)*
5: Bravo2 (-87)*
6: SasoDei (-88)*
7: Ma Connexion (-80)*
8: DIRECT-16-HP OfficeJet 3830 (-90)*
9: BELL649 (-80)*
10: BELL625 (-87)*
11: VIDEOTRON4729 (-90)*
12: Gemstelecom08945 (-88)*
13: Tony (-58)*
14: 4D Systems (-59)*
15: Primeconnect-guest (-85)
16: Primeconnect (-86)*
17: VIDEOTRON1438 (-86)*
18: BELL171 (-92)*
scan start
scan done
14 networks found
1: BELL678 (-90)*
2: Bravo2 (-85)*
3: VIDEOTRON1438 (-90)*
4: BELL351 (-83)*
5: Ma Connexion (-80)*
6: BELL649 (-87)*
7: DIRECT-16-HP OfficeJet 3830 (-88)*
8: Gemstelecom08945 (-87)*
9: VIDEOTRON4858 (-83)*
10: Primeconnect-guest (-89)
11: VIDEOTRON5907 (-91)*
12: SasoDei (-90)*
13: Tony (-60)*
14: 4D Systems (-61)*
scan start
scan done
14 networks found
1: BELL678 (-89)*
2: Bravo2 (-85)*
3: 4D Systems (-62)*
4: SasoDei (-88)*
5: VIDEOTRON1438 (-93)*
6: Tony (-62)*
7: BELL649 (-85)*
8: Ma Connexion (-78)*
9: DIRECT-16-HP OfficeJet 3830 (-93)*
10: Gemstelecom08945 (-87)*
11: Primeconnect (-88)*
12: BELL171 (-93)*
13: VIDEOTRON4858 (-82)*
14: BELL351 (-82)*
scan start
scan done
15 networks found
1: BELL678 (-88)*
2: 4D Systems (-61)*
3: SasoDei (-92)*
4: VIDEOTRON4858 (-84)*
5: Tony (-60)*
6: CIK1000M_AC2.4G_9665 (-93)*
7: VIDEOTRON1438 (-85)*
8: VIDEOTRON5907 (-91)*
9: BELL351 (-82)*
10: BELL171 (-92)*
11: Ma Connexion (-79)*
12: BELL649 (-83)*
13: Gemstelecom08945 (-86)*
14: Primeconnect (-90)*
15: Bravo2 (-86)*
scan start
scan done
15 networks found
1: BELL678 (-92)*
2: VIDEOTRON1438 (-90)*
3: Bravo2 (-88)*
4: BELL171 (-92)*
5: CIK1000M_AC2.4G_9665 (-93)*
6: BELL351 (-81)*
7: Ma Connexion (-79)*
8: BELL649 (-80)*
9: BELL430 (-90)*
10: VIDEOTRON4858 (-79)*
11: Primeconnect (-86)*
12: Primeconnect-guest (-85)
13: Tony (-60)*
14: 4D Systems (-61)*
15: SasoDei (-93)*
scan start
scan done
13 networks found
1: BELL678 (-93)*
2: Tony (-54)*
3: BELL351 (-84)*
4: SasoDei (-86)*
5: 4D Systems (-55)*
6: VIDEOTRON4858 (-79)*
7: VIDEOTRON1438 (-84)*
8: Gemstelecom08945 (-88)*
9: BELL649 (-79)*
10: Ma Connexion (-78)*
11: Primeconnect-guest (-88)
12: Bravo2 (-87)*
13: VIDEOTRON5907 (-90)*
scan start
scan done
16 networks found
1: BELL678 (-92)*
2: Tony (-57)*
3: BELL351 (-84)*
4: 4D Systems (-56)*
5: VIDEOTRON4858 (-79)*
6: VIDEOTRON5907 (-92)*
7: VIDEOTRON1438 (-88)*
8: Ma Connexion (-79)*
9: BELL649 (-82)*
10: DIRECT-16-HP OfficeJet 3830 (-90)*
11: Gemstelecom08945 (-88)*
12: BELL171 (-88)*
13: SasoDei (-83)*
14: BELL946 (-89)*
15: Bravo2 (-86)*
16: BELL545 (-90)*
scan start
scan done
17 networks found
1: BELL678 (-88)*
2: BELL857 (-93)*
3: Caesar (-92)*
4: Bravo2 (-88)*
5: BELL171 (-91)*
6: 4D Systems (-58)*
7: SasoDei (-85)*
8: VIDEOTRON4858 (-83)*
9: VIDEOTRON1438 (-84)*
10: Tony (-58)*
11: BELL545 (-87)*
12: Gemstelecom08945 (-88)*
13: Ma Connexion (-79)*
14: BELL649 (-81)*
15: Primeconnect (-87)*
16: BELL351 (-86)*
17: VIDEOTRON5907 (-90)*
scan start
scan done
14 networks found
1: VIDEOTRON1438 (-91)*
2: Tony (-60)*
3: BELL545 (-94)*
4: Bravo2 (-91)*
5: 4D Systems (-59)*
6: CIK1000M_AC2.4G_9665 (-93)*
7: Ma Connexion (-83)*
8: BELL649 (-84)*
9: Gemstelecom08945 (-90)*
10: BELL171 (-93)*
11: BELL351 (-84)*
12: Primeconnect-guest (-90)
13: VIDEOTRON4858 (-82)*
14: VIDEOTRON5907 (-90)*
scan start
scan done
16 networks found
1: BELL857 (-91)*
2: BELL587 (-91)*
3: VIDEOTRON1438 (-88)*
4: Tony (-58)*
5: VIDEOTRON5907 (-88)*
6: BELL351 (-82)*
7: 4D Systems (-58)*
8: VIDEOTRON4858 (-77)*
9: SasoDei (-84)*
10: Ma Connexion (-81)*
11: DIRECT-16-HP OfficeJet 3830 (-91)*
12: Gemstelecom08945 (-87)*
13: BELL649 (-81)*
14: BELL171 (-91)*
15: Bravo2 (-89)*
16: BELL545 (-93)*
scan start
scan done
15 networks found
1: BELL678 (-89)*
2: Bravo2 (-86)*
3: BELL171 (-88)*
4: 4D Systems (-61)*
5: VIDEOTRON1438 (-83)*
6: CIK1000M_AC2.4G_9665 (-88)*
7: BELL649 (-78)*
8: DIRECT-16-HP OfficeJet 3830 (-86)*
9: Ma Connexion (-85)*
10: BELL625 (-87)*
11: BELL351 (-84)*
12: VIDEOTRON4858 (-79)*
13: Tony (-59)*
14: SasoDei (-83)*
15: VIDEOTRON5907 (-89)*
the video for the above code running on teensy is here: https://www.youtube.com/watch?v=oK2DiuyKvjA
Looks like a dual teensy&esp controller with transparency functions of the ESP on the Teensy!
But wait, theres more!
I've imported function control transparency to give the teensy additional use of the ESP.
Libraries I worked on and transferred control over to teensy:
ESP8266WiFiSTA.h
ESP8266WiFiScan.h
ESP8266WiFiMulti.h
ESP8266WiFiAP.h
ESP8266WiFiGeneric.h
ESP8266WiFiType.h
WiFiClient.h
WiFiUdp.h
Most of if not all of the functions can be ran as-is on teensy with the stock return values of the ESP. This gives the ability to connect to websites, send UDP packets (even listen for packets udp ex Udp.begin(8266) ).
using WifiMulti you have the addAP and run functions as well
heres quite a list of the functions i placed in the code to do all this!
Code:
// NATIVE ESP8266 TRANSPARENCY COMMANDS
virtual int availableForWrite();
virtual size_t peekBytes(uint8_t *buffer, size_t length);
size_t peekBytes(char *buffer, size_t length) {
return peekBytes((uint8_t *) buffer, length);
}
// STATUS AND LOCAL IP NEED SEPARATE SCOPE, 2 LIBRARIES USE THEM!
// ESP8266WIFISTA.H
// begin() --> shared with above functions
virtual uint8_t status();
virtual IPAddress subnetMask();
virtual IPAddress gatewayIP();
virtual IPAddress dnsIP(uint8_t dns_no = 0);
virtual String SSID();
virtual String psk();
virtual String BSSIDstr();
virtual int32_t RSSI();
virtual String macAddress();
virtual String hostname();
virtual bool hostname(char* aHostname);
virtual bool hostname(const char* aHostname);
virtual bool hostname(String aHostname);
virtual bool config(IPAddress local_ip, IPAddress gateway, IPAddress subnet, IPAddress dns1 = (uint32_t)0x00000000, IPAddress dns2 = (uint32_t)0x00000000);
virtual bool isConnected();
virtual uint8_t begin(const char* ssid, const char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
virtual uint8_t begin(char* ssid, char *passphrase = NULL, int32_t channel = 0, const uint8_t* bssid = NULL, bool connect = true);
virtual bool disconnect(bool wifioff = false);
virtual bool reconnect();
virtual bool setAutoConnect(bool autoConnect);
virtual bool getAutoConnect();
virtual bool setAutoReconnect(bool autoReconnect);
virtual uint8_t waitForConnectResult();
virtual IPAddress localIP();
// ESP8266WIFISCAN.H
virtual uint16_t scanNetworks();
virtual int32_t RSSI(uint8_t networkItem);
virtual String BSSIDstr(uint8_t networkItem);
virtual int32_t channel(uint8_t networkItem);
virtual bool isHidden(uint8_t networkItem);
virtual String SSID(uint8_t s);
virtual uint8_t encryptionType(uint8_t networkItem);
// ESP8266WIFIAP.H
virtual String softAPmacAddress(void);
virtual IPAddress softAPIP();
virtual uint8_t softAPgetStationNum();
virtual bool softAP(const char* ssid, const char* passphrase = NULL, int channel = 1, int ssid_hidden = 0, int max_connection = 4);
virtual bool softAPConfig(IPAddress local_ip, IPAddress gateway, IPAddress subnet);
virtual bool softAPdisconnect(bool wifioff = false);
// ESP8266WIFIGENERIC.H
virtual bool persistent(bool persistent);
virtual bool setOutputPower(float dBm);
virtual bool enableSTA(bool enable);
virtual bool enableAP(bool enable);
virtual bool forceSleepBegin(uint32_t sleepUs = 0);
virtual bool forceSleepWake();
virtual bool mode(uint8_t m);
virtual uint8_t getMode();
virtual bool getPersistent();
virtual int hostByName(const char* aHostname, IPAddress& aResult);
virtual int hostByName(const char* aHostname, IPAddress& aResult, uint32_t timeout_ms);
virtual bool setPhyMode(uint8_t mode);
virtual uint8_t getSleepMode();
virtual bool setSleepMode(uint8_t type);
virtual uint8_t getPhyMode();
virtual int32_t channel(void);
// WIFICLIENT.H
// Stream classes: flush, read, write, write buf, peek, available, peekbytes, read buf,availableForWrite
// virtual uint8_t status();
virtual int connect(IPAddress ip, uint16_t port);
virtual int connect(const char *host, uint16_t port);
virtual bool getNoDelay();
virtual bool setNoDelay(bool nodelay);
virtual uint8_t connected();
virtual bool stop();
virtual bool stopAll();
virtual IPAddress remoteIP();
virtual uint16_t remotePort();
virtual uint16_t localPort();
//virtual IPAddress localIP();
virtual int read(uint8_t *buf, size_t size);
// ESP8266WIFIMULTI.H
virtual bool addAP(const char* ssid, const char *passphrase = NULL);
virtual uint8_t run(void); // wl_status_t
// WIFIUDP.H
// virtual uint8_t begin(uint16_t port);
// STOP, STOPALL, BEGIN, REMOTEIP, REMOTEPORT ARE SHARED FUNCTIONS!
virtual uint8_t beginMulticast(IPAddress interfaceAddr, IPAddress multicast, uint16_t port);
virtual int beginPacket(IPAddress ip, uint16_t port);
virtual int beginPacket(const char *host, uint16_t port);
virtual int beginPacketMulticast(IPAddress multicastAddress, uint16_t port, IPAddress interfaceAddress, int ttl = 1);
virtual int endPacket();
virtual int parsePacket();
virtual IPAddress destinationIP();
// PEEK, WRITE BUF, WRITE, AVAILABLE, READ, READ BUF, FLUSH
there may be more implemented or not listed as sometimes i loose track, but the ones posted above definately run well.
Here is the compilation info for Teensy 3.6 for the library project im working on of WifiScan.ino demo that comes from ESP branch:
Code:
Sketch uses 148012 bytes (14%) of program storage space. Maximum is 1048576 bytes.
Global variables use 13184 bytes (5%) of dynamic memory, leaving 248960 bytes for local variables. Maximum is 262144 bytes.
Here is the current ESP compilation of the 2-way communication link i worked on, with both ends running at 1Megabaud uart rates for teensy <-> esp links:
Code:
Sketch uses 368807 bytes (35%) of program storage space. Maximum is 1044464 bytes.
Global variables use 39756 bytes (48%) of dynamic memory, leaving 42164 bytes for local variables. Maximum is 81920 bytes.
heres the video of the esp as standalone running the uart display controlled from a teensy 3.6 over IP, library supports serial writes and buffered writes, Ive demo'd the buffered writes to send the 6 byte payload including crc to the display which is fast
https://www.youtube.com/watch?v=cWpr6U_bRX8
here is the demo using single byte transmission over IP
https://www.youtube.com/watch?v=H0WUIRmC868
What I'd like to implement is, currently, it supports sending dynamic payloads to the teensy handler at other end of the link, I'd like to change that behaviour, or perhaps, overload the call with a reference instead. It's simple really, you could send a 400 byte payload buffer to your teensy at the other end of the link as a reference, the user can edit the array (perhaps with sensor values) and when the function exits, the array is returned back to the main teensy. single packet to send, single to receive, very efficient. storing sensor data in the buffer would be handy for remote monitoring purposes as the updated contents are returned.
current handler:
Code:
void hndl(const uint8_t *buf, size_t size) {
for ( uint16_t i = 0; i < size; i++ ) Serial.print((char)buf[i]); Serial.println();
}
when scope exits, library sends back an ACK to main teensy immediately.
but don't let this idea discourage you. Remember I said it was multi master? You can send your own payload from the OTHER end of the link to the IP of the intended master.
as per previously referenced video, shows both teensies connecting to each other and controlling each others leds using the same identical libraries on teensy, and identical code on both esps:
https://www.youtube.com/watch?v=RuPVjO1DDnY
YOU decide where your data goes, no need to reflash a location if you need to change data paths 
Tony