First of all my goal is this, have a computer as a peripheral device to connect it to anyone's computer with ssh protocol or web. The idea is doing this by using a plug and play USB cable .
Facts that I know:
- USB is designed as Master/Slave Architecture, so simple connection doesn't work beacuse both computer are acting as a host.
- Ethernet is the simplest solutions, I know but I don't want to loose that interface.
- There is a cable that makes a connection as USB PC to PC cable link. But I am not sure if we can get ssh work with this.
Searching I found the RNDIS protocol, I think this maybe has a solution to my problem but I don't what is this for exactly. Here it says:
RNDIS support allows a PC to talk to a Linux-based embedded system over USB by making the embedded system look like a USB attached Ethernet adapter.
This is pretty much what I need. Could somebody guide me on what I want? Maybe I am missing the point, I do not know.
I have compile a new kernel with the USB GADGET DRIVERS options and setup g_ether.ko module. When I tried to load the module
sudo modprobe g_ether FATAL: Error inserting g_ether (/lib/modules/3.13.2/kernel/drivers/usb/gadget/g_ether.ko): No such device`
ls /lib/modules/3.13.2/kernel/drivers/usb/gadget/ -rw-r--r-- 1 root root 25072 feb 14 15:04 gadgetfs.ko -rw-r--r-- 1 root root 9660 feb 14 15:04 g_cdc.ko -rw-r--r-- 1 root root 5888 feb 14 15:04 g_dbgp.ko -rw-r--r-- 1 root root 11676 feb 14 15:04 g_ether.ko -rw-r--r-- 1 root root 12072 feb 14 15:04 g_mass_storage.ko -rw-r--r-- 1 root root 22548 feb 14 15:04 g_printer.ko -rw-r--r-- 1 root root 9604 feb 14 15:04 g_serial.ko -rw-r--r-- 1 root root 29748 feb 14 15:04 g_webcam.ko -rw-r--r-- 1 root root 13576 feb 14 15:04 g_zero.ko