chipKIT® Development Platform

Inspired by Arduino™

Max32 and Ethernet Shield connection Problem

Created Mon, 16 Jul 2012 09:08:22 +0000 by parasound


parasound

Mon, 16 Jul 2012 09:08:22 +0000

Hello to all, I´m using the Max32 and the Ethernetshield form Digilent. When I start a client my Max freezes at client.connect(). The Timeout of the Connect function don´t work....

Here is my Code:

#include <chipKITEthernet.h>

byte mac[] = {  
  0x90, 0xA2, 0xDA, 0x00, 0x41, 0x01 };
byte ip[] = { 
  172,26,5,74 };


byte server[] = { 
  172,26,10,143 }; 
  byte gateway[] = { 172,26,0, 1 };
byte subnet[] = { 255, 255, 0, 0 };
byte dns[] = { 172, 26, 1, 17 };



Client client(server, 2012);

void setup() {
  // start the Ethernet connection:
  Ethernet.begin(mac, ip); 
  // start the serial library:
  Serial.begin(9600);
  // give the Ethernet shield a second to initialize:
  delay(1000);
  Serial.println("connecting...");

  // if you get a connection, report back via serial:
  if (client.connect()) {      //The Max32 freezes here
    Serial.println("connected");
  } 
  else {
    // if you didn't get a connection to the server:
    Serial.println("connection failed");
  }
}

void loop()
{
....
}

Do anyone see the problem? I testet the Code with an Arduino Mega an Arduino Ethernet Shield and it works... I´m going crazy....

greetz form Germany Parasound


Jacob Christ

Sat, 11 Aug 2012 06:04:05 +0000

I don't know much about Arduino, but the start of the WebServer example looks like this:

Client client = server.available();
  if (client) {
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    boolean render = true;
    while (client.connected()) {
      if (client.available()) {

Differences in the libraries maybe keeping the chipKIT code from working "properly"

Jacob