[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: USB via ethernet



Jody wrote:

Hi,

This command allow to connect to an "ISPbox" (modem/router + phone + tv) and surely for most of ethernet over USB connection:

sudo modprobe usbnet && sudo pump -i `dmesg | grep CDC | awk -F: ‘{ print $1; }’`

Hope you could use it in netcardconfig, usbnet seems not loaded automatically to bring up ethernet interface.

This doesn't handle the case where you have multiple interfaces (it will simply fail)
May I suggest:

sudo modprobe usbnet && sudo pump -i `dmesg | grep CDC | awk -F: ‘{ print $1; }' | tail -1`
Actually, the most robust approach would be:
sudo modprobe usbnet && for face in `dmesg | grep CDC | awk -F: ‘{ print $1; }’ | sort -u` ; do sudo pump -i $face done

If you want to do this without /usr (which is not loaded during parts of the boot process), then you can use:

` dmesg | sed -n '/CDC/s/:.*//p' `
(a bit more cryptic, but more efficient -- althought it doesn't filter out dups)

so you end up with:
sudo modprobe usbnet && for iface in `dmesg | sed -n '/CDC/s/:.*//p' ` ; do sudo pump -i $iface ; done

--
Stephen Samuel +1(604)450-0066             samnospam@bcgreen.com
		   http://www.bcgreen.com/
  Powerful committed communication. Transformation touching
    the jewel within each person and bringing it to light.



Reply to: