Using computer's wifi capability to get internet connection

Hello there,

I would like my arduino to connect to my computer using a serial port, so it can access the internet instead of using a WiFi shield. The idea is so that I can use an IPad or such to navigate to a web page and connect through port 80 using a web browser to the arduino, so it can send commands. How would I go about doing this?

-Rixterz

The first thing you need to do is to write a program to run on your computer that translates between a serial input and the TCP/IP protocol you need for the internet. It is not easy and it is not an Arduino problem.

The most sensible approach is to host the web server on the PC and have the web app communicate with the Arduino via the USB serial connection as required to exchange commands and status information.

Would I need to look into making a "COM port redirector"?

There are several related sourceforge projects that provide a COM port redirector to another com port and/or to a TCP socket. I think com0com was the virtual null modem project and that will link you to the other projects. You could also use a serial port application to do this for you - I seem to remember seeing options for that sort of thing in RealTerm and PuTTY, although I haven't used those features. Of course, how this would work depends completely on what OS your computer is running, but for Windows I think it ought to be quite straight forward.

However, the more sensible approach IMO is to put the web server on the PC, and have it communicate over the Arduino's serial port to exchange command and status messages. That will be easier to get working, quicker to develop and give you a much better solution at the end of the day.

I tried to make a HttpListener in Visual Basic and that ran fine with local requests using ip address 127.0.0.1. But no response comes up when I use my public ip... no sites seem to have the answer :(

I don't know what you mean by HTTP Listener.

This is the documentation... http://msdn.microsoft.com/en-us/library/vstudio/system.net.httplistener It just listens for http requests and can send a response web page.

That's the protocol handling part of a web server. If you wanted to write your own COM port redirector using .NET that might be useful but I would have thought you would want to do this at the TCP level - also if the goal is to enable the Arduino to act as an HTTP client, the thing you'd be creating on the PC would be a network client, not a server/'listener'. If that's the approach you're taking, and you're having trouble with it, a .NET forum would be the place to ask for help. I would have thought that using an existing COM port redirector would make more sense though, and moving the web server onto the PC and avoiding the problem altogether would be even better.

I have actually been trying a different project in VB.Net which is a remote control program, which uses TCP, but the problem again is that it doesn't work remotely (over networks, not in LAN). I've tried adding exceptions to the firewall and nothing works, but it seems to work for everyone else... :C