harlequin-tech / WiFlyHQ

WiFly RN-XV Arduino Library
Other
110 stars 68 forks source link

wifly.open to localhost ( or local ip ) #31

Closed leninanduin closed 10 years ago

leninanduin commented 10 years ago

Hi!

for some extrange reason when i tried to make a wifly.open( 'localhost' , 80) or wifly.open( '127.0.0.1' , 80) the serial monitor sends me a Failed to connect: Connect FAILED Failed to connect to host. but if i put any other ip/domain combination it works. wifly1 wifly2 wifly3

i don't know if the reason is that my laptop and the wifly module are on the same network.

by the way on my laptop i have a express server ( with the musicparty-server app running ) and if i go direct to the endpoint that im traying to call with the arduino it works properly.

any idea?

harlequin-tech commented 10 years ago

The local host address, 127.0.0.1, refers to the local device. When you use your laptop it's your laptops address, and when you use the WiFly it's the WiFly's address.

So because the wifly is not running a server on port 80, it fails to connect to itself.