Twitter library 1.3.0 connection failed.

I have a Arduino Uno R3 with ethernetshield(W5100), Arduino IDE 1.0.1. My program has a webserver and a fixed ip address (192.168.1.200) and I created some buttons on a website to execute some functions, that works fine. In one of the function I want to post a message to Twitter. I use the Twitter library 1.3.0 from here Arduino Playground - Twitter Library. I followed the instruction. When the arduino has a fixed ip (Ethernet.begin(mac,ip):wink: the connection fails. When it gets an IP from DHCP server(Ethernet.begin(mac);), connection is succesfull. Does anyone know why it fails when I use a fixed IP address? I want to use a fixed IP so I can forward an external incoming port to the fixed ip of the arduino.

Some DHCP servers will allow you to reserve a specific IP address for a device given it's MAC address.
That way your arduino Ethernet shield would get the same IP every time. Maybe your DHCP server can do that ?

Hi,

You may like to look at the answer I received to a similar problem.

It may help?

http://arduino.cc/forum/index.php/topic,132387.0.html

regards

Gary

Thanks Quest UK, it seems to work

good day! can I ask how did you do that? I'm having a problem in connecting to the internet. I followed all the instruction in this site http://arduino-tweet.appspot.com/. Unfortunately, I can't have any post on twitter. The serial monitor always say "connecting ..." . Thanks a lot!

I added : byte gateway[] = { 192, 168, 1, 254 };
and changed: Ethernet.begin(mac,ip); to Ethernet.begin(mac,ip, gateway, gateway);
I also found that sending same messages twice are blocked by twitter.

My shield unit is ENC28J60 Ethernet Shield. Does it work using that library? I read some posts and they said that there's something in this unit and it's not compatible with this library. thanks!