9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] question about nusb/ether
@ 2024-03-24  7:59 Jens Staal
  2024-03-24 18:26 ` Aidan K. Wiggins
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Staal @ 2024-03-24  7:59 UTC (permalink / raw)
  To: 9front

Hi

I have an issue with ethernet over usb. I am not sure if it is because
of an unsupported adapter of because I do not understand how to activate
it.

I did not get any wiser from the nusb man page unfortunately.

Are there any "for dummies" usgage examples for nusb/ether? How do I
know what "device" I should give as a command argument etc?

Thanks, 
Jens

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] question about nusb/ether
  2024-03-24  7:59 [9front] question about nusb/ether Jens Staal
@ 2024-03-24 18:26 ` Aidan K. Wiggins
  2024-04-01  5:03   ` Jens Staal
  0 siblings, 1 reply; 7+ messages in thread
From: Aidan K. Wiggins @ 2024-03-24 18:26 UTC (permalink / raw)
  To: staal1978, 9front

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

Hi Jens,

It's possible the card you are using is not supported; the supported
cards are listed in nusb(4).  Which device are you trying to
initialize?  You can check which card you have by investigating the
output of the usbtree command.  In the case it says it is supported,
we can troubleshoot.  Nevertheless, usage of nusb/ether looks
something like this:

	nusb/ether -t ethertype devid

where 'devid' can be drawn from the output of your usbtree as the N
value in 'epN.M' (more info in usb(3)).  'ethertype' is one of those
listed in the man page.  Generally, this should be ran by nusbrc(8)
when the device is attached..

To actually get this registered and running with your network
(assuming nusb/ether succeeds in creating some /net/etherU* device for
you), you need to run ip/ipconfig on the specified device:

	ip/ipconfig ether [your /net/etherU*]

Hope this helps,
Aidan

[-- Attachment #2: Type: message/rfc822, Size: 3511 bytes --]

From: Jens Staal <staal1978@gmail.com>
To: 9front@9front.org
Subject: [9front] question about nusb/ether
Date: Sun, 24 Mar 2024 08:59:06 +0100
Message-ID: <a5heedquuyjc6a6773brpfwyoc44gqyxyx67ispr2dcuqbvc5y@7fwncko2ua2m>

Hi

I have an issue with ethernet over usb. I am not sure if it is because
of an unsupported adapter of because I do not understand how to activate
it.

I did not get any wiser from the nusb man page unfortunately.

Are there any "for dummies" usgage examples for nusb/ether? How do I
know what "device" I should give as a command argument etc?

Thanks, 
Jens

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] question about nusb/ether
  2024-03-24 18:26 ` Aidan K. Wiggins
@ 2024-04-01  5:03   ` Jens Staal
  2024-04-01  6:09     ` Aidan K. Wiggins
  0 siblings, 1 reply; 7+ messages in thread
From: Jens Staal @ 2024-04-01  5:03 UTC (permalink / raw)
  To: 9front

Hi Aidan,

Sorry for the late reply but I just wanted to tell you that your tip
worked!

nusb/ether 6
ip/ipconfig ether /net/etherU6

gave me internet access on my 9front install.



On Sun, Mar 24, 2024 at 11:26:02AM -0700, Aidan K. Wiggins wrote:
> Hi Jens,
> 
> It's possible the card you are using is not supported; the supported
> cards are listed in nusb(4).  Which device are you trying to
> initialize?  You can check which card you have by investigating the
> output of the usbtree command.  In the case it says it is supported,
> we can troubleshoot.  Nevertheless, usage of nusb/ether looks
> something like this:
> 
> 	nusb/ether -t ethertype devid
> 
> where 'devid' can be drawn from the output of your usbtree as the N
> value in 'epN.M' (more info in usb(3)).  'ethertype' is one of those
> listed in the man page.  Generally, this should be ran by nusbrc(8)
> when the device is attached..
> 
> To actually get this registered and running with your network
> (assuming nusb/ether succeeds in creating some /net/etherU* device for
> you), you need to run ip/ipconfig on the specified device:
> 
> 	ip/ipconfig ether [your /net/etherU*]
> 
> Hope this helps,
> Aidan

> Date: Sun, 24 Mar 2024 08:59:06 +0100
> From: Jens Staal <staal1978@gmail.com>
> To: 9front@9front.org
> Subject: [9front] question about nusb/ether
> 
> Hi
> 
> I have an issue with ethernet over usb. I am not sure if it is because
> of an unsupported adapter of because I do not understand how to activate
> it.
> 
> I did not get any wiser from the nusb man page unfortunately.
> 
> Are there any "for dummies" usgage examples for nusb/ether? How do I
> know what "device" I should give as a command argument etc?
> 
> Thanks, 
> Jens


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] question about nusb/ether
  2024-04-01  5:03   ` Jens Staal
@ 2024-04-01  6:09     ` Aidan K. Wiggins
  2024-04-01 17:05       ` Jens Staal
  2024-04-02 21:01       ` Shawn Rutledge
  0 siblings, 2 replies; 7+ messages in thread
From: Aidan K. Wiggins @ 2024-04-01  6:09 UTC (permalink / raw)
  To: staal1978, 9front

[-- Attachment #1: Type: text/plain, Size: 197 bytes --]

Great to hear!

Would you mind additionally providing the output of usbtree so that we could (if necessary) add it to one of cases in /sys/src/9/boot/nusbrc to be recognized on attach?

Best,
Aidan

[-- Attachment #2: Type: message/rfc822, Size: 5076 bytes --]

From: Jens Staal <staal1978@gmail.com>
To: 9front@9front.org
Subject: Re: [9front] question about nusb/ether
Date: Mon, 1 Apr 2024 07:03:41 +0200
Message-ID: <mojgmnejlqm4cpz6sqqtqitxtigcsoib7ueyz4kam63kfg53cg@uwkteqij7zg4>

Hi Aidan,

Sorry for the late reply but I just wanted to tell you that your tip
worked!

nusb/ether 6
ip/ipconfig ether /net/etherU6

gave me internet access on my 9front install.



On Sun, Mar 24, 2024 at 11:26:02AM -0700, Aidan K. Wiggins wrote:
> Hi Jens,
> 
> It's possible the card you are using is not supported; the supported
> cards are listed in nusb(4).  Which device are you trying to
> initialize?  You can check which card you have by investigating the
> output of the usbtree command.  In the case it says it is supported,
> we can troubleshoot.  Nevertheless, usage of nusb/ether looks
> something like this:
> 
> 	nusb/ether -t ethertype devid
> 
> where 'devid' can be drawn from the output of your usbtree as the N
> value in 'epN.M' (more info in usb(3)).  'ethertype' is one of those
> listed in the man page.  Generally, this should be ran by nusbrc(8)
> when the device is attached..
> 
> To actually get this registered and running with your network
> (assuming nusb/ether succeeds in creating some /net/etherU* device for
> you), you need to run ip/ipconfig on the specified device:
> 
> 	ip/ipconfig ether [your /net/etherU*]
> 
> Hope this helps,
> Aidan

> Date: Sun, 24 Mar 2024 08:59:06 +0100
> From: Jens Staal <staal1978@gmail.com>
> To: 9front@9front.org
> Subject: [9front] question about nusb/ether
> 
> Hi
> 
> I have an issue with ethernet over usb. I am not sure if it is because
> of an unsupported adapter of because I do not understand how to activate
> it.
> 
> I did not get any wiser from the nusb man page unfortunately.
> 
> Are there any "for dummies" usgage examples for nusb/ether? How do I
> know what "device" I should give as a command argument etc?
> 
> Thanks, 
> Jens


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] question about nusb/ether
  2024-04-01  6:09     ` Aidan K. Wiggins
@ 2024-04-01 17:05       ` Jens Staal
  2024-04-02 21:01       ` Shawn Rutledge
  1 sibling, 0 replies; 7+ messages in thread
From: Jens Staal @ 2024-04-01 17:05 UTC (permalink / raw)
  To: 9front

I have not yet set up mail on my 9front but here is the manually
transcribed entry corresponding to usb ethernet:

ep6.0: 255 csp 0x00ffff vid 0x2357 did 0x0601 TP-LINK 'USB 10/100/1000 LAN' 1d9aa xhci

On Sun, Mar 31, 2024 at 11:09:53PM -0700, Aidan K. Wiggins wrote:
> Great to hear!
> 
> Would you mind additionally providing the output of usbtree so that we could (if necessary) add it to one of cases in /sys/src/9/boot/nusbrc to be recognized on attach?
> 
> Best,
> Aidan

> Date: Mon, 1 Apr 2024 07:03:41 +0200
> From: Jens Staal <staal1978@gmail.com>
> To: 9front@9front.org
> Subject: Re: [9front] question about nusb/ether
> 
> Hi Aidan,
> 
> Sorry for the late reply but I just wanted to tell you that your tip
> worked!
> 
> nusb/ether 6
> ip/ipconfig ether /net/etherU6
> 
> gave me internet access on my 9front install.
> 
> 
> 
> On Sun, Mar 24, 2024 at 11:26:02AM -0700, Aidan K. Wiggins wrote:
> > Hi Jens,
> > 
> > It's possible the card you are using is not supported; the supported
> > cards are listed in nusb(4).  Which device are you trying to
> > initialize?  You can check which card you have by investigating the
> > output of the usbtree command.  In the case it says it is supported,
> > we can troubleshoot.  Nevertheless, usage of nusb/ether looks
> > something like this:
> > 
> > 	nusb/ether -t ethertype devid
> > 
> > where 'devid' can be drawn from the output of your usbtree as the N
> > value in 'epN.M' (more info in usb(3)).  'ethertype' is one of those
> > listed in the man page.  Generally, this should be ran by nusbrc(8)
> > when the device is attached..
> > 
> > To actually get this registered and running with your network
> > (assuming nusb/ether succeeds in creating some /net/etherU* device for
> > you), you need to run ip/ipconfig on the specified device:
> > 
> > 	ip/ipconfig ether [your /net/etherU*]
> > 
> > Hope this helps,
> > Aidan
> 
> > Date: Sun, 24 Mar 2024 08:59:06 +0100
> > From: Jens Staal <staal1978@gmail.com>
> > To: 9front@9front.org
> > Subject: [9front] question about nusb/ether
> > 
> > Hi
> > 
> > I have an issue with ethernet over usb. I am not sure if it is because
> > of an unsupported adapter of because I do not understand how to activate
> > it.
> > 
> > I did not get any wiser from the nusb man page unfortunately.
> > 
> > Are there any "for dummies" usgage examples for nusb/ether? How do I
> > know what "device" I should give as a command argument etc?
> > 
> > Thanks, 
> > Jens
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] question about nusb/ether
  2024-04-01  6:09     ` Aidan K. Wiggins
  2024-04-01 17:05       ` Jens Staal
@ 2024-04-02 21:01       ` Shawn Rutledge
  2024-04-02 23:36         ` Aidan K. Wiggins
  1 sibling, 1 reply; 7+ messages in thread
From: Shawn Rutledge @ 2024-04-02 21:01 UTC (permalink / raw)
  To: 9front

On Sun, Mar 31, 2024 at 11:09:53PM -0700, Aidan K. Wiggins wrote:
> Great to hear!
> 
> Would you mind additionally providing the output of usbtree so that we could (if necessary) add it to one of cases in /sys/src/9/boot/nusbrc to be recognized on attach?
> 

I noticed this conversation after also finding a couple of devices that
were not recognized, and also found that they work after invoking
nusb/ether manually.

The first one is a few years old, probably not available anymore:

ep2.0: roothub csp 0x000009 ports 6 xhci
  port1: 
	ep15.0: hub csp 0x030009 ports 4 vid 0x0bda did 0x0401 Realtek 'USB3.0 Hub' c1e7b xhci
	  port1: 
		ep16.0: 255 csp 0x00ffff vid 0x0bda did 0x8153 Realtek 'USB 10/100/1000 LAN' 62613 xhci

The second is from https://www.aliexpress.us/item/3256803908379311.html 
(I got the USB 3 version, not type C):

ep2.0: roothub csp 0x000009 ports 6 xhci
  port1: 
	ep12.0: hub csp 0x030009 ports 4 vid 0x05e3 did 0x0626 GenesysLogic 'USB3.1 Hub' e8001 xhci
	  port3: 
		ep13.0: 255 csp 0x00ffff vid 0x0bda did 0x8153 Realtek 'USB 10/100/1000 LAN' 700ba xhci

Another is one I had tried a few weeks ago on the type C port. In the
meantime, the type C port on this laptop is no longer working at all,
AFAICT (not even in Linux); but I just found that if I connect this Cable
Matters adapter to the other USB port via a USB 3-to-type-C adapter,
ethernet is working:
https://www.amazon.fr/Cable-Matters-Adaptateur-Multiport-Ethernet/dp/B07C8LKKLT

ep1.0: roothub csp 0x000009 ports 12 xhci
  port1: 
	ep3.0: hub csp 0x010009 ports 4 vid 0x1a40 did 0x0101 none <nil> 79c19 xhci
	  port2: 
		ep4.0: 17 csp 0x000011 vid 0x2109 did 0x0101 'Cable Matters Inc.' 'USB-C to Multiport Adapter with Charging ' 2f44e xhci
	  port3: 
		ep5.0: 255 csp 0x00ffff vid 0x0bda did 0x8152 CMI 'USB 10/100 LAN' 720e0 xhci

Around the same time when I tried the Cable Matters device, I had also
tried this one, which was not working then, but seems to work now,
without needing to run nusb/ether manually (probably after updating
9front, probably after patch 08a080e8c2c775eda149d3e830bd4fad2c35f249):
https://satechi.net/products/slim-multi-port-adapter-with-ethernet

  port1: 
	ep9.0: hub csp 0x020009 ports 5 vid 0x2109 did 0x2817 'VIA Labs, Inc. ' 'USB2.0 Hub ' 6a60c xhci
	  port2: 
		ep10.0: storage csp 0x500608 vid 0x2537 did 0x1081 Norelsys NS1081 3e485 xhci
	  port3: 
		ep12.0: 255 csp 0x00ffff vid 0x0b95 did 0x1790 ASIX AX88179A 9c562 xhci
	  port5: 
		ep13.0: 254 csp 0x0000fe vid 0x2109 did 0x8817 'VIA Labs, Inc. ' 'USB Billboard Device ' effb8 xhci


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [9front] question about nusb/ether
  2024-04-02 21:01       ` Shawn Rutledge
@ 2024-04-02 23:36         ` Aidan K. Wiggins
  0 siblings, 0 replies; 7+ messages in thread
From: Aidan K. Wiggins @ 2024-04-02 23:36 UTC (permalink / raw)
  To: lists, 9front

[-- Attachment #1: Type: text/plain, Size: 1294 bytes --]

Thanks Jens & Shawn,

Shawn, It looks like the first (three) Realtek cards might support
operation under the class of CDC USB devices, which is the assumed
interface if no '-t type' is passed to nusb/ether.  It might be of
some interest in seeing if running nusb/ether with '-t url' to see if
the driver for the 8150 works with it..  no promises.  I suspect that
the 8152 (your third card listed), will be supported under url, we
just would need to add that to nusbrc if it works.  Jens, you also
seem to be using an 8153 based card.

What we might try in the meantime, is giving those devices which do
support CDC their own case in nusbrc to just use CDC, in place of a
dedicated driver.  I'm guessing the CDC case further down does not get
matched for these cards.  It is probably best to just enumerate them
for now, please see if adding this does anything on attach for you:

diff fcb6d6ec65fb82c3b6b936dd148df72b9955994b uncommitted
--- a/sys/src/9/boot/nusbrc
+++ b/sys/src/9/boot/nusbrc
@@ -25,6 +25,8 @@
 			nusb/ether -t aue $etherargs $id
 		case 0bda8150
 			nusb/ether -t url $etherargs $id
+		case 0bda8153 # support by cdc for now.
+			nusb/ether $etherargs $id
 		case 18d14ee3 0bb40003 10046344
 			nusb/ether -t rndis $etherargs $id
 		case 12092301 # keyboardio model 01 (IAD)

[-- Attachment #2: Type: message/rfc822, Size: 6656 bytes --]

From: Shawn Rutledge <lists@ecloud.org>
To: 9front@9front.org
Subject: Re: [9front] question about nusb/ether
Date: Tue, 2 Apr 2024 23:01:56 +0200
Message-ID: <ZgxyRNLPF877gV9I@zen>

On Sun, Mar 31, 2024 at 11:09:53PM -0700, Aidan K. Wiggins wrote:
> Great to hear!
> 
> Would you mind additionally providing the output of usbtree so that we could (if necessary) add it to one of cases in /sys/src/9/boot/nusbrc to be recognized on attach?
> 

I noticed this conversation after also finding a couple of devices that
were not recognized, and also found that they work after invoking
nusb/ether manually.

The first one is a few years old, probably not available anymore:

ep2.0: roothub csp 0x000009 ports 6 xhci
  port1: 
	ep15.0: hub csp 0x030009 ports 4 vid 0x0bda did 0x0401 Realtek 'USB3.0 Hub' c1e7b xhci
	  port1: 
		ep16.0: 255 csp 0x00ffff vid 0x0bda did 0x8153 Realtek 'USB 10/100/1000 LAN' 62613 xhci

The second is from https://www.aliexpress.us/item/3256803908379311.html 
(I got the USB 3 version, not type C):

ep2.0: roothub csp 0x000009 ports 6 xhci
  port1: 
	ep12.0: hub csp 0x030009 ports 4 vid 0x05e3 did 0x0626 GenesysLogic 'USB3.1 Hub' e8001 xhci
	  port3: 
		ep13.0: 255 csp 0x00ffff vid 0x0bda did 0x8153 Realtek 'USB 10/100/1000 LAN' 700ba xhci

Another is one I had tried a few weeks ago on the type C port. In the
meantime, the type C port on this laptop is no longer working at all,
AFAICT (not even in Linux); but I just found that if I connect this Cable
Matters adapter to the other USB port via a USB 3-to-type-C adapter,
ethernet is working:
https://www.amazon.fr/Cable-Matters-Adaptateur-Multiport-Ethernet/dp/B07C8LKKLT

ep1.0: roothub csp 0x000009 ports 12 xhci
  port1: 
	ep3.0: hub csp 0x010009 ports 4 vid 0x1a40 did 0x0101 none <nil> 79c19 xhci
	  port2: 
		ep4.0: 17 csp 0x000011 vid 0x2109 did 0x0101 'Cable Matters Inc.' 'USB-C to Multiport Adapter with Charging ' 2f44e xhci
	  port3: 
		ep5.0: 255 csp 0x00ffff vid 0x0bda did 0x8152 CMI 'USB 10/100 LAN' 720e0 xhci

Around the same time when I tried the Cable Matters device, I had also
tried this one, which was not working then, but seems to work now,
without needing to run nusb/ether manually (probably after updating
9front, probably after patch 08a080e8c2c775eda149d3e830bd4fad2c35f249):
https://satechi.net/products/slim-multi-port-adapter-with-ethernet

  port1: 
	ep9.0: hub csp 0x020009 ports 5 vid 0x2109 did 0x2817 'VIA Labs, Inc. ' 'USB2.0 Hub ' 6a60c xhci
	  port2: 
		ep10.0: storage csp 0x500608 vid 0x2537 did 0x1081 Norelsys NS1081 3e485 xhci
	  port3: 
		ep12.0: 255 csp 0x00ffff vid 0x0b95 did 0x1790 ASIX AX88179A 9c562 xhci
	  port5: 
		ep13.0: 254 csp 0x0000fe vid 0x2109 did 0x8817 'VIA Labs, Inc. ' 'USB Billboard Device ' effb8 xhci


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-04-02 23:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24  7:59 [9front] question about nusb/ether Jens Staal
2024-03-24 18:26 ` Aidan K. Wiggins
2024-04-01  5:03   ` Jens Staal
2024-04-01  6:09     ` Aidan K. Wiggins
2024-04-01 17:05       ` Jens Staal
2024-04-02 21:01       ` Shawn Rutledge
2024-04-02 23:36         ` Aidan K. Wiggins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).