# USB DSL modem problem



## twantnix3 (Sep 15, 2009)

I am thinking about comming home to freebsd from gentoo, all i want is for my box to connect through usb to my modem.  it does with linux, but i need to know what i need for freebsd.


----------



## fronclynne (Sep 15, 2009)

Without knowing any more about your problem, may I suggest:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ppp-and-slip.html
& 
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dialout.html

Also, USB support on 8.x is quite nice, consider installing BETA4 or one of the forthcoming RCs.


----------



## Carpetsmoker (Sep 15, 2009)

This is a rather difficult question to answer without knowing what USB modem you have in the first place...


----------



## tangram (Sep 15, 2009)

Oh and [cmd=]eth0[/cmd] is the way Linux names interfaces ([cmd=]eth0[/cmd] the first NIC, [cmd=]eth1[/cmd] the second and so on). Network interfaces in FreeBSD are named after the supporting driver.


----------



## twantnix3 (Sep 15, 2009)

Carpetsmoker said:
			
		

> This is a rather difficult question to answer without knowing what USB modem you have in the first place...



its a dsl modem, but connects through usb.  sorry, forgot to add that info.


----------



## LateNiteTV (Sep 15, 2009)

twantnix3 said:
			
		

> its a dsl modem, but connects through usb.  sorry, forgot to add that info.



i think he was asking for the make and model


----------



## twantnix3 (Sep 15, 2009)

all I know is its an Arris modem. prolly the newest one


----------



## aragon (Sep 15, 2009)

I suspect the device IDs would be more useful.  You can see these logged to /var/log/messages when you connect the modem.


----------



## twantnix3 (Sep 15, 2009)

it says: usb 1-1.3: Product: ARRIS USB RNDIS Drive
         usb 1-1.3: Manufacturer: ARRIS RNDIS Adapter
         usb 1-1.3: SerialNumber: DUMMYDUMMYDUMMY
         usb 1-1.3: uevent
         usb 1-1.3: usb_probe_device

thats what see so far from that


----------



## aragon (Sep 15, 2009)

That doesn't look like it comes from a FreeBSD kernel, otherwise it'd have useful information such as this:


```
Sep 16 00:07:36 <user.notice> igor root: Unknown USB device: vendor 0x0421 product 0x0042 bus uhub2
```


----------



## twantnix3 (Sep 16, 2009)

I am not using freebsd as of now because of this problem.  im using linux.  but i like the speed and stability of freebsd.  is there soome kind of module I can call at the beginning?


----------



## twantnix3 (Sep 16, 2009)

sorry, biginning of the install.


----------



## Carpetsmoker (Sep 16, 2009)

If you have the PCI ID then that should be enough.

For Linux, you can use the lspci(8) command. I'm not sure but judging from the manpage either without any arguments or with the -n argument should give you a PCI ID.


----------



## twantnix3 (Sep 17, 2009)

ok, installed freebsd, heres what it said when i connected the usb:

```
ugen0: <Arris RNDIS Adapter ARRIS USB RNDIS Driver, class 210, rev 1.1010.00, addr 3> on uhub1
```


----------



## aragon (Sep 17, 2009)

There should be more to it.  Do you not see a log entry like I pasted?

Otherwise, run "usbconfig" as root while your modem is connected and paste us the output.


----------



## twantnix3 (Sep 17, 2009)

command not found


----------



## phoenix (Sep 17, 2009)

Try *usbdevs* and *usbdevs -v* on FreeBSD 6.x/7.x (usbconfig is from 8.x).


----------



## twantnix3 (Sep 17, 2009)

addr 3 Arris RNDIS Adapter ARRIS USB RNDIS Driver


----------



## twantnix3 (Sep 18, 2009)

fronclynne said:
			
		

> Without knowing any more about your problem, may I suggest:
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ppp-and-slip.html
> &
> http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/dialout.html
> ...



if i install a beta, can i upgrade to the stable later?


----------



## tangram (Sep 18, 2009)

twantnix3 said:
			
		

> if i install a beta, can i upgrade to the stable later?



Yup.


----------



## tingo (Sep 18, 2009)

You probably need the cdce(4) driver in FreeBSD to get your usb ethernet device to work.


----------



## twantnix3 (Sep 21, 2009)

is it already installed in 7.2?


----------



## twantnix3 (Sep 21, 2009)

can I call cdce at installation?


----------



## fronclynne (Sep 21, 2009)

Just use `# kldload if_cdce`

If it works, you can add 
	
	



```
if_cdce_load="yes"
```
 to /boot/loader.conf


----------



## twantnix3 (Sep 22, 2009)

it didnt work..  everytime i try to come to bsd I run into somethin it seems...  I thank you all, Ill just deal with it when I have more time


----------



## twantnix3 (Sep 30, 2009)

update:   recently tried a version of linux, when i compiled the kernel, i searched for RNDIS in the config file program(make menuconfig) and i was successful!  now my question now is that can I do the same with freebsd?


----------



## tangram (Sep 30, 2009)

twantnix3 said:
			
		

> update:   recently tried a version of linux, when i compiled the kernel, i searched for RNDIS in the config file program(make menuconfig) and i was successful!  now my question now is that can I do the same with freebsd?



Maybe because FreeBSD is not a Linux distribution?


----------



## tingo (Oct 7, 2009)

twantnix3 said:
			
		

> it didnt work..  everytime i try to come to bsd I run into somethin it seems...  I thank you all, Ill just deal with it when I have more time



Did you remember to unplug an re plug your usb modem *after* kldload'ing if_cdce?


----------



## twantnix3 (Oct 17, 2009)

ill have to try that at a later time.


----------



## Zeniff (Jan 5, 2010)

Hi! I think I'm having a similar problem.
I cannot get my USB modem to work on FreeBSD.

After reading this post and thinking maybe my BSDanywhere LiveCD might give me a clue (since my modem works fine with that), I booted it up and noticed it looks like it uses cdce0. So, I looked at the man page for cdce(4) and put in my /boot/loader.conf:

```
if_cdce_load="YES"
```
I rebooted, but it didn't seem to do anything that I'm aware of...

I didn't know what else to look for, so I haven't changed anything else. After rebooting, I also went to sysinstall, but my USB modem still did not show up in the configure options for network interfaces. And, when I try 
	
	



```
dhclient cdce0
```
 it says nothing is found. I wondered if dhclient-script is supposed to do something, but when I run it, nothing happens.

It seems this thread is the closest to any info I've seen on USB modems for FreeBSD, so I hope it put me on the right track... but I'm still stuck. Does anyone have any ideas? Should I start a new thread?
Thank you~


----------



## DutchDaemon (Jan 5, 2010)

What shows up in /var/log/messages when you (un)plug the USB modem? Also see [cmd=]dmesg -a[/cmd] for relevant output.


----------



## SirDice (Jan 5, 2010)

You are booting a LiveCD. Any changes made to /boot/loader.conf will be lost if you reboot.


----------



## Zeniff (Jan 5, 2010)

DutchDaemon said:
			
		

> What shows up in /var/log/messages when you (un)plug the USB modem? Also see [cmd=]dmesg -a[/cmd] for relevant output.



Here's what I copied by hand (I don't know how to get other ways yet):

```
kernel: module cdce already present!
```
I just now removed the module again from my /boot/loader.conf, since it said it was already there.

Here's part of logs/dmesg:

```
kernel: ugen2.2: <Actiontec Electronics, Inc> at usbus2
kernel: ugen2.2: <Actiontec Electronics, Inc> at usbus2 (disconnected)
root: Unknown USB device: vendor 0x1668 product 0x6010 bus uhub2
kernel: ugen2.2: <Actiontec Electronics, Inc> at usbus2
```



			
				SirDice said:
			
		

> You are booting a LiveCD. Any changes made to /boot/loader.conf will be lost if you reboot.


No, I'm in a new install of FreeBSD made from only the CD disc1.
The LiveCD was what I tried to compare to and that was BSDanywhere (OpenBSD).

(By the way, I wonder if there's a way to retrieve the logs from FreeBSD's partition? My Ubuntu doesn't seem to know how to read FreeBSD's file system.)


----------



## SirDice (Jan 5, 2010)

Zeniff said:
			
		

> (By the way, I wonder if there's a way to retrieve the logs from FreeBSD's partition?


If you have a Windows client, my favorites are PuTTY and WinSCP.


----------



## Zeniff (Jan 5, 2010)

Thanks, I'll look into that for another time. Unfortunately I don't have any other PC at my house now..

(Thanks for the replies so far. I'll need to come back tomorrow or as soon as I can.)


----------



## Zeniff (Jan 6, 2010)

Hi again~

I thought maybe since the modem works on Ubuntu 9.10, I decided to post the output of some commands I've heard from the earlier posts.

I unplugged and replugged in my USB modem, and this was the end part of dmesg:

```
[   26.508037] hub 1-0:1.0: over-current change on port 7
[   26.724015] usb 4-1: new full speed USB device using uhci_hcd and address 2
[   26.927112] usb 4-1: configuration #2 chosen from 2 choices
[   26.960850] eth1: register 'cdc_ether' at usb-0000:00:1d.2-1, CDC Ethernet Device, 00:0f:b3:72:fb:a9
[   26.960879] usbcore: registered new interface driver cdc_ether
[   37.328021] eth1: no IPv6 routers present
[  325.296069] usb 4-1: USB disconnect, address 2
[  325.297517] eth1: unregister 'cdc_ether' usb-0000:00:1d.2-1, CDC Ethernet Device
[  331.380034] usb 4-1: new full speed USB device using uhci_hcd and address 3
[  331.585876] usb 4-1: configuration #2 chosen from 2 choices
[  331.595584] eth1: register 'cdc_ether' at usb-0000:00:1d.2-1, CDC Ethernet Device, 00:0f:b3:72:fb:a9
[  342.164036] eth1: no IPv6 routers present
```

Here is the output of ifconfig (eth1 is my USB modem, eth0 is bge0 in FreeBSD (I think), but I never used before because I don't have something to plug into it):

```
eth0      Link encap:Ethernet  HWaddr 00:0d:9d:50:ac:1d  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:20 

eth1      Link encap:Ethernet  HWaddr 00:0f:b3:72:fb:a9  
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20f:b3ff:fe72:fba9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:181 errors:0 dropped:0 overruns:0 frame:0
          TX packets:221 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:150085 (150.0 KB)  TX bytes:74440 (74.4 KB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:4 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:240 (240.0 B)  TX bytes:240 (240.0 B)
```

Here is the output of lsusb:

```
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 003: ID 1668:6010 Actiontec Electronics, Inc. [hex] Gateway
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
```

Does any of that info help find out how to solve my problem? Thanks~


----------



## aragon (Jan 6, 2010)

Zeniff said:
			
		

> Here's part of logs/dmesg:
> 
> ```
> kernel: ugen2.2: <Actiontec Electronics, Inc> at usbus2
> ...


Unfortunately that device is not currently supported, however linux says it's a CDCE device so it might be possible to just modify FreeBSD's cdce(4) driver for your hardware's device IDs.  Do you know how to patch kernel source and recompile?


----------



## Zeniff (Jan 6, 2010)

Really? Wow, that's too bad... As I'm someone who is new to both Linux and BSD, I feel kind of strange, because I would have guessed that if the device worked on one OS, it would work on the others. I guess that means each version of Linux, BSD, etc each make their own drivers or support it their own way? I'm happy most of the other stuff works, though.

I've never tried or learned about patches and compiling yet, sorry. But, if it's my only option, I may be willing to try it.

The cdce(4) man page you mentioned says I can enable cdce by recompiling or just adding something to loader.conf. Would it be possible/easier to modify the cdce drive in a similar way?


----------



## aragon (Jan 6, 2010)

All the linuxes use the same kernel, and have the same driver support for the most part.  The BSDs don't use the linux kernel and don't even borrow much code from it either due to the GPL restrictions.

In theory it should be straight forward to add support for your device if it and cdce(4) both adhere well to the CDCE spec.  What FreeBSD version are you running?


----------

