WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Enable USBNET in Tinycore (all versions?)  (Read 4510 times)

Offline Fat Jedi

  • Newbie
  • *
  • Posts: 5
Enable USBNET in Tinycore (all versions?)
« on: February 24, 2014, 07:53:48 PM »
How do I enable USBNET in Tinycore?  I would like to be able to use the computer's USB port as an ethernet port.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Enable USBNET in Tinycore (all versions?)
« Reply #2 on: February 25, 2014, 01:43:03 PM »
http://www.linux-usb.org/usbnet/


Article from 2005. Good old times. Guess there are some changes since.
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Enable USBNET in Tinycore (all versions?)
« Reply #3 on: February 25, 2014, 01:51:49 PM »
Very likely so, but OP was not specific at all, and article provides an introduction to basics ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Fat Jedi

  • Newbie
  • *
  • Posts: 5
Re: Enable USBNET in Tinycore (all versions?)
« Reply #4 on: February 25, 2014, 05:20:55 PM »
I can't be any more specific than I was.  I want to enable USBNET in Tinycore so I can use the computer's USB port as an ethernet port.  The computer has a USB port, the router has a USB OUT port, and I would like to link the two via a regular USB A-B cable.  This works with ease in distributions like Mint; I want to replicate that functionality on Tinycore. 

Though fascinating, the articles linked in your replies do not provide a step-by-step solution to my problem.

I now have two additional questions.
Although LSMOD says that USBNET is installed, and System lists all of the USB ports as being present and usable, I cannot get Tinycore to recognize that it is connected to the internet via the USB port. 

Brownell says:
 
"When you connect a usbnet device to a Linux host, it normally issues a USB hotplug event, which will ensure that the usbnet driver is active. In most GNU/Linux distributions you shouldn't even notice whether the driver needed loading. It should just initialize, so that you can immediately use the device as a network interface. If it doesn't, then you probably didn't configure this driver (or its modular form) into your kernel build. To fix that, rebuild and reinstall as appropriate; at this time you might also want to upgrade to a recent kernel."


Since that did not work, must the kernel that "ships" with TinyCore be recompiled with USBNET functionality enabled? 

*If the kernel does not need to be recompiled, what *specific commands* must I issue to TC to make USBNET work as I described? 

I appreciate any replies to this enquiry, but specific answers to my question are most welcome.
« Last Edit: February 25, 2014, 06:35:02 PM by Fat Jedi »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Enable USBNET in Tinycore (all versions?)
« Reply #5 on: February 25, 2014, 05:34:34 PM »
You cannot use USBNET to turn a USB port into an ethernet port.  It is a driver for IP over USB.
You cannot use a USB A-B cable to connect USB to an ethernet RJ45 connector.

Offline Fat Jedi

  • Newbie
  • *
  • Posts: 5
Re: Enable USBNET in Tinycore (all versions?)
« Reply #6 on: February 25, 2014, 06:20:28 PM »
You cannot use USBNET to turn a USB port into an ethernet port.  It is a driver for IP over USB.
You cannot use a USB A-B cable to connect USB to an ethernet RJ45 connector.

I understand that USBNET is a driver for IP over USB.  I also understand your second comment, which implies that I'm stupid enough to think I can plug a USB cable into an ethernet port.  I'm not asking about either of those things.  The question that remains unanswered is this:

In other distributions of Linux, and in particular Mint, a person who has a router that is equipped with a USB OUT (and for specificity's sake, this is simply a USB B) port can connect a regular USB AB cable from the router to any USB port on the computer.  Mint will automatically configure itself to accept this physical connection as a fully functional alternative to using an ethernet cable.  All I want to do, and it seems incredibly simple if Mint can do it, is replicate this exact functionality on Tinycore. Is there someone on this forum that can describe a solution to this problem that does not involve a four hour trek through Linux networking theory?

« Last Edit: February 25, 2014, 06:27:17 PM by Fat Jedi »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Enable USBNET in Tinycore (all versions?)
« Reply #7 on: February 26, 2014, 04:31:31 AM »
You say that usbnet was automatically loaded, so please post the last 10 lines of dmesg and the output of "ifconfig -a".
The only barriers that can stop you are the ones you create yourself.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: Enable USBNET in Tinycore (all versions?)
« Reply #8 on: February 26, 2014, 04:52:27 PM »
Lucky me that my 10+ year old cable modem works on TC just "out of the box" via its USB interface. I've pretty much never used this USBNET connection (even its name was unknown to me). Nevertheless it might now put me into a position to provide some pointers:

(1) In my case (with the USB A-B cable plugged into both devices) I can find evidence of the additional ethernet interface (e.g. eth1) in the 'dmesg' log:
Code: [Select]
tc@box:~$ dmesg | grep eth1
[    1.946970] cdc_ether 2-2:1.0: eth1: register 'cdc_ether' at usb-0000:00:1d.0-2, CDC Ethernet Device, 00:0e:5c:57:2c:75
This is then also reflected in the loaded kernel modules:
Code: [Select]
tc@box:~$ lsmod | grep cdc_ether
cdc_ether              12288  0
usbnet                 16384  1 cdc_ether
And (after installation of the 'usb-utils' extension) I can clearly identify the additional USB device (in my case a Motorola cable modem):
Code: [Select]
tc@box:~$ lsusb | grep Motorola
Bus 002 Device 003: ID 07b2:5100 Motorola BCS, Inc. SurfBoard SB5100 Cable Modem
I'd therefore suggest you carefully compare (along the lines of the three commands from above) the Mint vs. TC situation. I'm convinced it should be rather obvious from the output of 'lsusb' and 'lsmod' in which way the two distributions differ from each other.

(2) As TC is not really prepared to handle more than one NIC "automagically" I had to manually adjust the routing, etc. My cable modem does not provide a DHCP service for any attached device, so I had to configure it accordingly (e.g. via 'ifconfig eth1 ...' and 'route add default gw ...', etc.). Instead of using such commands one could try to achieve the same outcome via the 'network' GUI tool. In my case I had to furthermore disable the default route for the "automagically" configured eth0 NIC (e.g. via 'route del ...'). This NIC was still connected to my router and got set up using DHCP.
But I guess my advantage is that I understand enough of the networking requirements to come up with an appropriate set of commands, which kind of brings as back to the old mantra (i.e. "TC is a toolkit and not a turn-key solution").

NOTE: My testing was done with a TC 4.x system as that was what I had on the old USB stick I could grab first. I have no reason to believe that the situation would be vastly different on a TC 5.2 system

Offline Fat Jedi

  • Newbie
  • *
  • Posts: 5
Re: Enable USBNET in Tinycore (all versions?)
« Reply #9 on: February 27, 2014, 05:04:17 PM »
Maro, the commands you suggested along with a slight modification to the network settings (manually inputting addresses, etc.) solved my problem.  Thank you for your help!