Show Posts
Pages: 1 ... 179 180 [181] 182 183 ... 359
2701  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield DHCP/Static IP error on: January 18, 2013, 02:35:38 pm
Mine works with zoomkat's dhcp code if I remove the SD card, or disable the SD SPI. I use a Mikrotik RB433AH for the gateway/dhcp server.
2702  Using Arduino / Networking, Protocols, and Devices / Re: Ethernet shield DHCP/Static IP error on: January 18, 2013, 12:28:34 pm
Do you have a microSD card in the slot?

I use this to test the SPI connection. If the serial monitor shows 192.168.2.2, then it is ok. If it shows anything else, like 0.0.0.0, then it failed.
Code:
#include <SPI.h>
#include <Ethernet.h>

byte mac[] = {  0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,2,2);

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

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

  Serial.println("Starting w5100");
  Ethernet.begin(mac,ip);

  Serial.println(Ethernet.localIP());
}

void loop() {
}
2703  Using Arduino / Programming Questions / Re: plss help about ethernet shield on: January 18, 2013, 08:50:15 am
i just want to ask if there is a "auto refresh" function for the web browser of your ethernet shield? like i want it to autoamatically refresh it every 5 secs..
Yes. Web browser implies web client.
http://playground.arduino.cc/Code/WebClient
2704  Using Arduino / Networking, Protocols, and Devices / Re: Mega + wiz811mj + Arduino 1.x on: January 17, 2013, 10:06:40 am
The SPI library startup does that for you. It doesn't hurt if your code does that also, but is a bit redundant.
2705  Using Arduino / Networking, Protocols, and Devices / Re: Mega + wiz811mj + Arduino 1.x on: January 17, 2013, 08:33:37 am
The w5100 slave select is D10 in the ethernet library.

The default slave select for the SPI bus is D53 on the Mega, but that is not used for the w5100. D53 is set to OUTPUT in the SPI library startup so the SPI bus will be in master mode, but that is the only function in this case.
2706  Using Arduino / Networking, Protocols, and Devices / Re: EthernetServer (TCP) for more than one connection? on: January 17, 2013, 07:10:55 am
Is that protocol a persistent connection? It does not appear so. The w5100 will allow multiple connections (4), but the ethernet library services one at a time. It will service them pretty fast.

This is what your protocol specifies:
Open -> handshake -> data -> close
That looks like a standard web server
connect -> request -> response -> close

Very interesting application.  smiley
2707  Using Arduino / Networking, Protocols, and Devices / Re: Mega + wiz811mj + Arduino 1.x on: January 17, 2013, 06:31:50 am
Why did you modify spi.h for a Mega? How do you have the module connected to the Mega? It should be
MISO -> D50
MOSI -> D51
SCK -> D52
SS -> D10
2708  Using Arduino / Networking, Protocols, and Devices / Re: Connect Arduino and phpMyadmin on: January 16, 2013, 10:38:59 am
That part is really beyond the scope of this forum. It should be obvious by my sample code how to add additional stuff in the same row. It must be included in the same query.
2709  Using Arduino / Networking, Protocols, and Devices / Re: Connect Arduino and phpMyadmin on: January 16, 2013, 10:32:01 am
This usually will put both in the same row.
Code:
$result = mysql_query("INSERT INTO temperatures (temp1,temp2) VALUES ($temp1,$temp2)");
I haven't tried that, so no guarantee, only a SWAG*.

*SWAG = Scientific Wild A## Guess.
2710  Using Arduino / Networking, Protocols, and Devices / Re: Connect Arduino and phpMyadmin on: January 16, 2013, 10:23:15 am
That should have been obvious, but...
Code:
<?
$temp1 = $HTTP_GET_VARS['temp1'];
$temp2 = $HTTP_GET_VARS['temp2'];
?>
<html>
<body>
test server page<br>
<? echo('temp1 = ' . $temp1 . ' '); ?><br>
<? echo('temp2 = ' . $temp2 . ' '); ?><br>
</body>
</html>
2711  Development / Other Software Development / Re: State of Arduino Ethernet Library on: January 16, 2013, 09:55:23 am
Thanks for the input. Here is a link to that client code.
http://playground.arduino.cc/Code/WebClient

I forgot my best issue to create. I have a network available with over 300 clients on it, so it gets a bit busy. That generates delays with my code, but not a failure. Unless the server is localnet, and you control that server and localnet, there will be occasional delays. BTW, I have a couple of those localnet servers. One on a busy network, and one on my personal network.
2712  Development / Other Software Development / Re: State of Arduino Ethernet Library on: January 16, 2013, 09:02:15 am
Thanks, Jack. What are the issues? Does the code fail? I tested mine by creating issues, and insuring the condition did not crash the sketch. Three of my favorite issues to create:
  • Attempt to connect to a server that doesn't exist.
  • Attempt to get a dhcp ip address with no dhcp server.
  • Connect to a known large website and break the connection during the server response. Google home page is large, so I used that for my test.

That last one should work fine with the code I posted in the playground. It shows "Timeout" on the serial monitor when the transport connection fails, but goes back to downloading again when the transport connection is fixed. I broke the connection by unplugging my router CAT5 cable from the cablemodem.
2713  Development / Other Software Development / Re: State of Arduino Ethernet Library on: January 16, 2013, 08:42:02 am
Look for this in the code. The additions are between these:
Code:
//*************************************
There are two additions in each file. I have not checked the code changes for operation.
2714  Using Arduino / Programming Questions / Re: Arduino access page on: January 16, 2013, 08:32:58 am
This code will send a request and display the response every 30 seconds.
http://playground.arduino.cc/Code/WebClient
It should be easy enough to modify to your needs.
2715  Using Arduino / Programming Questions / Re: SPI mode question on: January 16, 2013, 07:07:37 am
I like this one:
http://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus
Pages: 1 ... 179 180 [181] 182 183 ... 359