Hey,
also hier der Code:
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
// gateway and subnet are optional:
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,2, 10);
IPAddress gateway(192,168,2, 1);
IPAddress subnet(255, 255, 0, 0);
// telnet defaults to port 23
EthernetServer server(25);
boolean alreadyConnected = false; // whether or not the client was connected previously
void setup() {
// initialize the ethernet device
Ethernet.begin(mac, ip, gateway, subnet);
// start listening for clients
server.begin();
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for Leonardo only
}
Serial.print("Chat server address:");
Serial.println(Ethernet.localIP());
}
void loop() {
// wait for a new client:
EthernetClient client = server.available();
// when the client sends the first byte, say hello:
if (client) {
if (!alreadyConnected) {
// clead out the input buffer:
client.flush();
Serial.println("We have a new client");
client.println("Hello, client!");
alreadyConnected = true;
}
if (client.available() > 0) {
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes back to the client:
server.write(thisChar);
// echo the bytes to the server as well:
Serial.write(thisChar);
}
}
}
Das einzige was ich geändert habe ist von "EthernetServer server(23);" auf "EthernetServer server(25);".
Das mit der Firewall hört sich gut an. Aber dann müsste ich doch eigendlich auch nicht auf meinen Stratoserver kommen.
Nen E-Mail Server habe ich schonmal mit BASCOM gemacht. Das geht wunderbar...
Und die SD-Karte hat auch immer ausgereicht. Der Server ist nur für meine Domain, also maximal 2-5 E-Mail Adressen.
Ich hatte nicht vor nen riesen Mailserver aufzubauen.
Ich habe die Domain jetzt nur noch für meine E-Mail und benutze dafür nen Relay Server. Aber naja....
lg