megaTinyCore + wifi101: ATtiny3216SN

I have DUE R3 and module ATWINC1500 FW 19.4 Connect them together, load with example code, I can log data to xampp server and work as SimpleWebServerWiFi(control via webpage).
I follow the link below to Log data and it work OK. Link:

Then I use MCU ATtiny3216SN 20 pin and connect ATtiny3216 with second module ATWINC1500 FW 19.4.
I install megaTinyCore for ArduinoIDE, setting board megaTinyCore use for ATtiny3226/3216/1626/1616/1606/826/816/806/426/416/406, choose chip is ATtiny3216, clock is 20MHz then I choose programmer is ATMELICE

with the code work with DUE, I change a little at pin for WiFi.setPins(0,1,2);
Then I "upload using programmer" to ATtiny3216SN by ATMELICE.
output command show warning:


/home/scxxxxxa/Arduino/libraries/WiFi101/src/common/include/nm_debug.h:73:6: warning: "CONF_WINC_DEBUG" is not defined, evaluates to 0 [-Wundef]
 #if (CONF_WINC_DEBUG == 1)

Sketch uses 30386 bytes (92%) of program storage space. Maximum is 32768 bytes.
Global variables use 1127 bytes (55%) of dynamic memory, leaving 921 bytes for local variables. Maximum is 2048 bytes.

Writing | ################################################## | 100% 3.00s

avrdude: 31462 bytes of flash written

ATtiny3216 with ATWINC1500 can log data to server OK. But for SimpleWebServerWiFi, value always is 0 at this line
char c = bclient.read(); // read a byte, then

I surf in forum and found a link with similar problem at link below:

But it not help for my case because wifi101 only have two void for read below:


int WiFiClient::read()
{
	uint8_t b;

	if (read(&b, sizeof(b)) != 1) {
		return -1;
	}

	return b;
}

int WiFiClient::read(uint8_t* buf, size_t size)
{
	// sizeof(size_t) is architecture dependent
	// but we need a 16 bit data type here
	uint16_t size_tmp = available();
	
	if (size_tmp == 0) {
		return -1;
	}
	
	if (size < size_tmp) {
		size_tmp = size;
	}

	int result = WiFiSocket.read(_socket, buf, size);

	return result;
}

So, if anyone else can work with client.read(); for megaTinyCore, please add your comment and I very highly appreciate for your kind.
Or, if you have a driver library of ATWINC1500 with work for ATtiny3216 on microchipstudio7, please give me, I will try with it. I surf but I only found link for ATmega4808 and SAMD21, but I only need to on and off 3 output and log 5 value to server only, so, ATtiny3216 is best

so it can be tested with the WiFiWebServer example?

With WiFiWebServer example, the value of char c = bclient.read(); always is 0 ('\Z')
So, It only show the webpage and can not control the MCU via webpage due to value of client.read alway is 0.

it can log data via XAMPP OK, no problem.

To show the content of webpage of WiFiWebServer, I remove the if condition" if (c == '\n' && currentLineIsBlank)" and print c value on webpage with client.print(c);
the value of c is Z only

I use DUE to print value of c in command char c = bclient.read();
I use command Serial.write(c); on ATtiny3216 to send value to DUE
Every I start to connect IP address via firefox, serial1 port 1 on Due received value of c from ATtiny3216 . I copy and paste value below:
(I remove some 0 value for easier to read)

90
80
243
0
36
32
55
0
1
1
15
0
0
32
0
0
156
63
130
0
0
0
0
16
0
0
0
0
0
0
0
0
0
0
0
0
0
150
6
0
0
8
0
0
0
23
0
0
0
61
16
0
0
0
33
0
0
0
255
0
0
0
0
0

Why no value 10 is '\n' is received? and I can not connect it if I use '\n' value, I only connect to it if I set c = 0x0, that only show value and cannot control from webpage via command

SpenceKonde say to me that megatinycore library still not full support for WiFi. Currently, with my testing, I can log data to Xampp server, but can not read command from client.
megatinycore will be updated, later.