Show Posts
Pages: 1 ... 156 157 [158] 159 160 ... 404
2356  Using Arduino / Networking, Protocols, and Devices / Re: UDP help for communication with pc on: July 17, 2013, 01:29:10 pm
Reply #3 is the Arduino end if the Windows box is not sending one back. Set the udpIP to the ip of the Windows server/listener.

2357  Using Arduino / Networking, Protocols, and Devices / Re: UDP help for communication with pc on: July 17, 2013, 01:15:28 pm
Actually, a WAMP (Windows Apache MySQL PHP)server means a TCP connection, not a UDP packet exchange. It will neither receive nor respond to udp packets without another service running to listen for udp packets on a specific port.
2358  Using Arduino / Project Guidance / Re: How much USABLE memory on UNO? on: July 17, 2013, 09:39:07 am
This should tell you how much SRAM you have available after all is ready to go.
Code:
int freeRam() {
  extern int __heap_start,*__brkval;
  int v;
  return (int)&v - (__brkval == 0 ? (int)&__heap_start : (int) __brkval); 
}

void setup() {
  Serial.begin(9600);
  Serial.print(F("SRAM = "));
  Serial.println(freeRam());
}

void loop() {
}
2359  Using Arduino / Networking, Protocols, and Devices / Re: UDP help for communication with pc on: July 17, 2013, 06:56:46 am
Code:
void loop()
{
    IPAddress udpIP(1,2,3,4);
    int udpPort = 8888;

    char msg[] = "blablabla";
    Udp.beginPacket(udpIP, udpPort);
    Udp.write(msg);
    Udp.endPacket();
    delay(1000);
}
2360  Using Arduino / Networking, Protocols, and Devices / Re: UDP help for communication with pc on: July 17, 2013, 05:41:34 am
Change udpIP to the ip of the listener (target for the packet) and udpPort to the listener's port.
Code:
IPAddress udpIP(1,2,3,4);
int udpPort = 8888;

Udp.beginPacket(udpIP, udpPort);

This code is used on the listener end to return a udp packet to the sender.
Code:
Udp.beginPacket(Udp.remoteIP(), Udp.remotePort());
2361  Using Arduino / Networking, Protocols, and Devices / Re: Sending Data to Xively through WiFi Shield - Constantly Returning -1 on: July 16, 2013, 10:20:30 am
Here is a chance to test the IDE versions if Bradeley still has v1.0.5 installed. Recompile the now known good code with v1.0.5. If it works, changing versions was a fluke. If it fails, then it is an IDE version problem.
2362  Using Arduino / Networking, Protocols, and Devices / Re: Sending Data to Xively through WiFi Shield - Constantly Returning -1 on: July 16, 2013, 07:08:53 am
What IDE version are you using? I hear versions later than v1.0.3 possibly have a bug that prevents a connection.

I have helped a few users here that have downgraded to IDE v1.0.2 and the Wifi shield started working. Like this one:
http://forum.arduino.cc/index.php?topic=176094.0

edit: I forgot to mention the SD card slot. If you have a SD card in the slot, remove it.
2363  Using Arduino / Programming Questions / Re: Ethernet Shield Connection Problem on: July 15, 2013, 08:59:09 pm
That indicates a couple things.

The first thing is your ISP is not blocking the request.

The second thing is your DMZ is not working. If it was, the router html setup page should not have responded. The DMZ normally forwards all ports to the target ip. The Arduino will not respond on port 80 with the setup you are using in it. ??

The active refusal is a reject from a router or firewall. The Arduino does not send a reject message. It either accepts or drops (ignores) the connection.
2364  Using Arduino / Programming Questions / Re: Ethernet Shield Connection Problem on: July 15, 2013, 08:40:03 pm
Does your router have a html setup function on port 80?
http://123.123.123.123
Can you reach that from the internet? Just as a test?
2365  Using Arduino / Programming Questions / Re: Ethernet Shield Connection Problem on: July 15, 2013, 08:31:37 pm
This must be a router firewall response.
Quote
No connection could be made because the target machine actively refused it 123.123.123.123:9012
The Arduino does not actively refuse any connection. It either accepts it, or ignores it.

edit: The three things a firewall can do is
1) accept
2) reject (active)
3) drop (passive)

The Arduino library doesn't support the reject. Only accept and drop.
2366  Using Arduino / Programming Questions / Re: Ethernet Shield Connection Problem on: July 15, 2013, 08:08:18 pm
Did you port forward that port to the private ip of the Arduino in your router? Or put it in the DMZ? Allowing the port through the firewall is just part of it.
2367  Using Arduino / Programming Questions / Re: Ethernet Shield Connection Problem on: July 15, 2013, 07:57:59 pm
Your Ethernet.begin() call is not correct. It should be this:
Code:
Ethernet.begin(mac, ip, gateway, gateway, subnet);
2368  Using Arduino / Networking, Protocols, and Devices / Re: WiFi Udp NTP client / firmware updates / Xively timestamp / Xively -1 error on: July 15, 2013, 05:49:26 pm
Do you have a SD card in the shield's slot? If you do, and it is not disabled or initialized, it could cause those types of errors.
2369  Using Arduino / Networking, Protocols, and Devices / Re: email using arduino on: July 15, 2013, 04:46:52 pm
Using my code above...
Code:
// change these
char server[] = "email.yourdomain.com";
client.println(F("helo 1.2.3.4"));
client.println(F("RCPT To: <you@yourdomain.com>"));
client.println(F("To: You <you@yourdomain.com>"));

// to these
char server[] = "mta6.am0.yahoodns.net";
client.println(F("helo 1.2.3.4")); // this should be your public ip
client.println(F("RCPT To: <me12345@yahoo.com>"));
client.println(F("To: Me <me12345@yahoo.com>"));
You'll need to change the from addresses also. The sender domain must resolve or it will be rejected. I checked this with my yahoo account.

edit: Mine ended up in my spam folder.
2370  Using Arduino / Networking, Protocols, and Devices / Re: email using arduino on: July 15, 2013, 04:04:52 pm
I send email to my gmail account this way. I can send text messages to my Verizon cellphone. The code I use sends email like an email server sends email to another email server (called a relay).
http://playground.arduino.cc/Code/Email

It depends on your public ip. I have a commercial account, so I can send that way. If you have a residential account (dhcp issued ip) then you might be blocked.

Sometimes, you can use your ISP's email server as a relay for your Arduino if the security is not TLS or SSL.

edit: If you want to send email to a yahoo account, you must use the email server that services the yahoo accounts. Currently, they are
Quote
C:\Documents and Settings\user>nslookup
Default Server:  ip68-105-28-16.at.at.cox.net
Address:  68.105.28.16

> set query=mx
> yahoo.com
Server:  ip68-105-28-16.at.at.cox.net
Address:  68.105.28.16

Non-authoritative answer:
yahoo.com       MX preference = 1, mail exchanger = mta6.am0.yahoodns.net
yahoo.com       MX preference = 1, mail exchanger = mta7.am0.yahoodns.net
yahoo.com       MX preference = 1, mail exchanger = mta5.am0.yahoodns.net

yahoo.com       nameserver = ns5.yahoo.com
yahoo.com       nameserver = ns6.yahoo.com
yahoo.com       nameserver = ns8.yahoo.com
yahoo.com       nameserver = ns1.yahoo.com
yahoo.com       nameserver = ns2.yahoo.com
yahoo.com       nameserver = ns3.yahoo.com
yahoo.com       nameserver = ns4.yahoo.com
mta5.am0.yahoodns.net   internet address = 98.138.112.37
mta5.am0.yahoodns.net   internet address = 63.250.192.45
mta5.am0.yahoodns.net   internet address = 66.196.118.33
mta5.am0.yahoodns.net   internet address = 66.196.118.240
mta5.am0.yahoodns.net   internet address = 98.136.217.202
mta5.am0.yahoodns.net   internet address = 98.136.217.203
mta5.am0.yahoodns.net   internet address = 98.138.112.33
mta5.am0.yahoodns.net   internet address = 98.138.112.34
mta6.am0.yahoodns.net   internet address = 66.196.118.35
mta6.am0.yahoodns.net   internet address = 66.196.118.37
mta6.am0.yahoodns.net   internet address = 66.196.118.240
mta6.am0.yahoodns.net   internet address = 98.136.217.202
mta6.am0.yahoodns.net   internet address = 98.138.112.35
mta6.am0.yahoodns.net   internet address = 98.138.112.37
mta6.am0.yahoodns.net   internet address = 66.196.118.33
mta6.am0.yahoodns.net   internet address = 66.196.118.34
>
Pages: 1 ... 156 157 [158] 159 160 ... 404