PC connected to Arduino via USB should recognize it as network card

I want to build web page that connect over http to Arduino (without php), but using USB PC port. So local web browser immediately after cable connection may communicate with app in Arduino. Is it possible? Do you know any module that I need to buy?

I imagine that after plugging in USB to PC, Arduino will be recognized as network card with defined IP address.

Please help...

Good luck with that! An Arduino is NOT a network adaptor, so unless you're going to write your own custom Windows device driver to trick Windows into thinking that it is, what you describe cannot be done. You can put an Ethernet shield on some Arduinos (Uno, Mega, Due and perhaps others), to they DO become network devices.

Regards,
Ray L.

@kdarme, do you mean that you want an Arduino to host a web server?

That can be done, but it is soooo much easier on a PC.
I don't believe it would be possible (certainly not easy) for the PC to communicate with an Arduino hosted web server over a USB connection.

On the other hand, if the web server is hosted on the PC it is a simple matter to include code in the server to communicate with an Arduino using Serial comms via the USB connection.

And in case of doubt, a browser on a PC can easily communicate with a webserver on the same PC. I like the Python Bottle web framework. You can have a simple server working in a few minutes.

It would be a big help if you could describe what your project is intended to do rather than how you think it might be implemented.

...R

Hi, thanks for replies.

Business goal is to build proof of concept device for authorizing entered data by the end user. Nowadays our PCs, smartphones are not fully secured, independent, black box devices that will in 100% confirm that smth was done by end user, not by virus, malware, smb who spied login & password.

The device will have small screen 20x4, simple numeric keypad, and should be connected to PC via USB and works with no other software except simple installation of Ethernet drivers.

So when the end user will login to secure area:

  • web browser will call by AJAX/Angular http request to Arduino via above network card that should install with predefined IP address e.g. 172.16.x.x.
  • C app will take message and using Arduino WiFi (#WiFi is needless here) Shield 101 perform some signature process
  • user will see some simple data on screen and will add some own data + PIN and process of authorization will be done.
  • the clue is challenge-response data to be entered on secure device by end user.

Most important thing is that end user will reach the device and just like plug & play will start using the device.

I would love to do this proof-of-concept using Arduino concept.

kdarme:
The device will have small screen 20x4, simple numeric keypad, and should be connected to PC via USB and works with no other software except simple installation of Ethernet drivers.

I can understand the screen, keypad and USB but then I get lost.

If there is a USB connection why is there a need for any Ethernet stuff in the communication between the PC and the Arduino.

Your user will be logging in to a webserver? Where will the webserver be hosted?

I don't know if it is possible to run Javascript in a browser that can access a Serial Port on the PC running the browser.

Maybe you could write a PC program that is run on the PC with the browser and which could communicate with the Arduino and then connect to the server with the authentication info - but I'm not sure that would achieve the security you want.

...R

Hi, thanks for post

Robin2:
Your user will be logging in to a webserver? Where will the webserver be hosted?

Arduino will have software that will be mini web server, custom made just to interpret request on a certain port. PC using only Ajax call (JS) will talk with Arduino.

Robin2:
I don't know if it is possible to run Javascript in a browser that can access a Serial Port on the PC running the browser.

I need Arduino to seen as network adapter with certain IP.

Robin2:
Maybe you could write a PC program that is run on the PC with the browser and which could communicate with the Arduino and then connect to the server with the authentication info - but I'm not sure that would achieve the security you want.

I cannot install anything on end user PC. It is not secured and for certain amount of users unenforceable.

kdarme:
Arduino will have software that will be mini web server, custom made just to interpret request on a certain port. PC using only Ajax call (JS) will talk with Arduino.

From Reply #2

I don't believe it would be possible (certainly not easy) for the PC to communicate with an Arduino hosted web server over a USB connection.

Is there any reason why you would not connect to the Arduino using an Ethernet Shield and an Ethernet cable rather than a USB cable?

Or use an Arduino Yun which has Ethernet included?

...R

Hi

I cannot oblidge end user to do anything with configuration apart from connecting usb cable. It should be plug & play.

I think of YUn plus USB network card with predefined IP and port forwarding but it is going to be much complicated.

I need Arduino will be usb network adapter from PC perspective and will immediately may response to http requests without any software apart from network card driver (hope so use standard Windows drivers)

Regards Krzysztof

I often wonder if people on these forums even bother to READ the responses to their questions. You've already been told, several times, that what you're asking for CANNOT be done, without writing your own Windows device driver. There is NO "standard Windows driver" that will make an Arduino look like a network device, unless it IS a network device, which means it HAS an ETHERNET shield on it. It doesn't matter how much you want a different answer, or how many times you ask the same question, the answer will always be the same. You might as well be looking for a "standard Windows driver" that will make your LCD monitor work like a printer.

Regards,
Ray L.

Thanks Ray for your patience. I know it is a hudge challange.

RayLivingston:
that what you're asking for CANNOT be done, without writing your own Windows device driver. There is NO "standard Windows driver" that will make an Arduino look like a network device

We will still work on the way how to call requests to Arduino via http without install any custom drivers. This device must be plug & play. I will let you know how we cope with it. Hope so in the meantime maybe some other ideas will appear?

Regards,
Krzysztof

Hi

It is possible to meet the requirements using

  • RNDIS protocol

Regards
Krzysztof

kdarme:
It is possible to meet the requirements using

  • RNDIS protocol

Please provide a link. Your learning may be useful to others.

...R

Hi

There is no link as far as now, but will post everything how to make "Hello World App" by connecting Arduino to USB and just open web browser with device IP.

Regards
Krzysztof

There are USB network adapters available for the tablets and netpads that now don't have ethernet ports built in. Perhaps you can include these adapters with an arduino with an ethernet shield connected to it. Like pc > USB network adapter > arduino ethernet shield > arduino.

@kdarme, I think RNDIS protocol is your best choice, but unfortunately Arduino don't have the RNDIS lib. I think it's very useful if it is implemented, in another words, I think ethernet over USB is quite useful and will be more and more useful in IoT world.

ethernet over USB on leonardo

this is another mail thread discussing this.