|
|
@ -193,6 +193,13 @@ void sendBanner(uint8_t *buffer, int ledState) { // {Socket targetSocket, ) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint8_t readByte() {
|
|
|
|
|
|
|
|
uint8_t theByte;
|
|
|
|
|
|
|
|
recv(testSocket, &theByte, 1);
|
|
|
|
|
|
|
|
return theByte;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void loop() {
|
|
|
|
void loop() {
|
|
|
|
Serial.println("Test W5100 socket...");
|
|
|
|
Serial.println("Test W5100 socket...");
|
|
|
|
|
|
|
|
|
|
|
@ -256,8 +263,7 @@ void loop() {
|
|
|
|
|
|
|
|
|
|
|
|
while (getSn_SR(testSocket) == SOCK_ESTABLISHED) {
|
|
|
|
while (getSn_SR(testSocket) == SOCK_ESTABLISHED) {
|
|
|
|
while (getSn_RX_RSR(testSocket) > 0) {
|
|
|
|
while (getSn_RX_RSR(testSocket) > 0) {
|
|
|
|
recv(testSocket, bytesReceived, 1);
|
|
|
|
theByte = readByte();
|
|
|
|
theByte = bytesReceived[0];
|
|
|
|
|
|
|
|
//Serial.print(bytesReceived[0], BYTE);
|
|
|
|
//Serial.print(bytesReceived[0], BYTE);
|
|
|
|
Serial.print(theByte, BYTE);
|
|
|
|
Serial.print(theByte, BYTE);
|
|
|
|
if ((state == STATE_G) && (theByte == 'G')) {
|
|
|
|
if ((state == STATE_G) && (theByte == 'G')) {
|
|
|
|