Show Posts
Pages: 1 ... 179 180 [181] 182 183 ... 361
2701  Community / Website and Forum / Re: ***** SurferTim has been banned? ***** on: February 03, 2013, 05:20:23 am
I presume it must have been a glitch in the database. I tried last night with no luck, but this morning I thought I would try it again, and it worked. ??

edit: This is the message I kept getting until this morning:
Quote
An Error Has Occurred!
Sorry SurferTim, you are banned from using this forum!

2702  Community / Website and Forum / Re: ***** SurferTim has been banned? ***** on: February 03, 2013, 05:04:47 am
Thanks, rockwallaby! I have IE on my Windows box working again after clearing cache, cookies, etc. Chrome is still malfunctioning, but I think if I clear out its cache and cookies, it may be ok now too. I don't know what happened, but it is good to be free!!  smiley-grin

edit: I bumped your Karma for the help getting me free.
2703  Community / Website and Forum / Re: ***** SurferTim has been banned? ***** on: February 03, 2013, 04:58:44 am
Hooray!! I'm not banned any more, at least on my Linux box. My Windows box will not login with the banned message, but that may be a cache issue.
2704  Using Arduino / Networking, Protocols, and Devices / Re: EthernetClient.connect() blocking issue on: January 31, 2013, 09:36:02 am
No problem. I figured it would be best to start you at the lowest level of the library code. If you look at the source, you should be able to find a function you can modify so you can put a hook in to check and break if not ready, rather than wait.

edit: I'd be interested in seeing that when you finish it.  smiley
2705  Using Arduino / Networking, Protocols, and Devices / Re: WIFI shield TCP connection problem on: January 31, 2013, 09:04:42 am
If you want to use TCP, then one must be a server. Even UDP requires one to be a "server" (listen for UDP packets.
2706  Using Arduino / Networking, Protocols, and Devices / Re: WIFI shield TCP connection problem on: January 31, 2013, 08:29:31 am
This is probably not going to work. If the WiFi shield is the client, the variable server should be set to the localnet ip of the other unit (MAX MSP?). Something like this:
Code:
IPAddress server( 192,168,0,2); //MAX MSP IP address
The ports do not need to match, and normally do not. Insure your wireless settings in the router allow clients access to other localnet clients. This is "default-forwarding=yes" in my router.
2707  Development / Other Software Development / Re: State of Arduino Ethernet Library on: January 31, 2013, 07:57:39 am
@pisayjames: AFAIK, there is not a library that will work with the ENC28J60 using the w5100 code. It seems like it should be possible by changing the include file, but nobody has developed one. At this time, I have only the w5100 shield.
2708  Using Arduino / Networking, Protocols, and Devices / Re: Disconnect client from Server/EthernetServer. on: January 31, 2013, 06:44:14 am
You should be using the client functions after the server.available() call. Take a look at my server code.
http://playground.arduino.cc/Code/WebServerST

This gets the client.
Code:
EthernetClient client = server.available();
After that, use the client calls.
Code:
client.print();
client.println();
client.write();
//and when you are finished sending packets
client.stop();
edit: client.stop() is the "disconnect".
2709  Using Arduino / Networking, Protocols, and Devices / Re: EthernetClient.connect() blocking issue on: January 30, 2013, 02:03:45 pm
Here is the datasheet for the w5100.
http://www.sparkfun.com/datasheets/DevTools/Arduino/W5100_Datasheet_v1_1_6.pdf
There are a couple registers you may be interested in modifying. Take a look at the bottom of page 22 and top of page 23. Registers RTR (Retry Time Register) and RCR (Retry Count Register).

Then look at the /libraries/Ethernet/utility/w5100.h file at the bottom. Those are the functions you use to change them.

I think I would start with the RCR register. According to the docs, it will attempt to connect 8 times before returning fail. Maybe you want just one attempt per call.
2710  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield + DHCP on: January 30, 2013, 06:02:11 am
Quote
Anyone tried the Ethernet shield connecting using DHCP?
Yes, and it works good!  smiley
2711  Using Arduino / Networking, Protocols, and Devices / Re: EchoServer based on ChatServer, appending strings to output on: January 29, 2013, 05:49:57 am
Glad I could help. You could do it with either print or println like this:
Code:
server.println(" +OK");
// equals
server.print(" +OK\r\n");
2712  Using Arduino / Networking, Protocols, and Devices / Re: EchoServer based on ChatServer, appending strings to output on: January 29, 2013, 05:12:00 am
Quote
I don't really understand why
Code:
      if(thisChar == '\n') server.print(" +OK");
      if(thisChar != '\r') server.print(thisChar);

puts the " +OK" after thisChar, since one comes after the other...
It only prints " +OK" if thisChar is a newline. If thisChar is anything but a carriage return, it prints the character. Actually, it probably should have been like this:
Code:
      if(thisChar == '\n') server.println(" +OK");
      else if(thisChar != '\r') server.print(thisChar);
This way it doesn't print the "\n" either.
2713  Using Arduino / Networking, Protocols, and Devices / Re: EchoServer based on ChatServer, appending strings to output on: January 29, 2013, 04:44:52 am
You should probably check for the return key also. They are normally sent as a pair.
Code:
if(thisChar == '\n') server.println(" +OK");
if(thisChar != '\r') server.print(thisChar);
This way the CR/LF is sent by the server.println() command.
2714  Using Arduino / Networking, Protocols, and Devices / Re: EchoServer based on ChatServer, appending strings to output on: January 29, 2013, 04:30:51 am
Try something like this. It waits for a newline character to print the +OK.
Code:
if(thisChar == '\n') Serial.print(" +OK");
Serial.write(thisChar);
2715  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet Shield + DHCP on: January 29, 2013, 04:16:56 am
This works for me with w5100 and IDE v1.0.1 or later.
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };

void setup() {
  Serial.begin(9600);

  // disable SD SPI if one in the slot
  pinMode(4,OUTPUT);
  digitalWrite(4,HIGH);

  Serial.print("Starting ethernet...");
  if(!Ethernet.begin(mac)) Serial.println("failed");
  else Serial.println(Ethernet.localIP());
}

void loop() {
}
Pages: 1 ... 179 180 [181] 182 183 ... 361