Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Aug 2014 13:24:52 +0300
From:      Volodymyr Kostyrko <c.kworr@gmail.com>
To:        Miguel Clara <miguelmclara@gmail.com>, freebsd-usb@freebsd.org
Subject:   Re: "usbnet" support in FreeBSD?
Message-ID:  <53F86BF4.3060506@b1t.name>
In-Reply-To: <CADGo8CWM92S68kdJczKnvmf5uz=z12H83sieXmN2p8QHw1902w@mail.gmail.com>
References:  <CADGo8CWM92S68kdJczKnvmf5uz=z12H83sieXmN2p8QHw1902w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23.08.2014 01:17, Miguel Clara wrote:
> I know FreeBSD suppots (at least according to the guide) usb tether, but
> some devices when connected via USB are visible as a network interface and
> this allows file sharing among other things!
>
> I have a Blackberry 10 device and I'm wondering if this is somehow possible
> or if not how hard would it be?
>
> On linux the device is recognize by usbnet driver (
> http://www.linux-usb.org/usbnet/) is there anything like this in freebsd?
>
>
> More info about the device detection:
>
> dmesg:
> ugen0.4: <Research In Motion, Ltd.> at usbus0
> umodem0: <Research In Motion, Ltd. RIM Network Device, class 0/0, rev
> 2.00/2.40, addr 11> on usbus0
> umodem0: data interface 0, has no CM over data, has no break
> device_attach: umodem0 attach returned 6

Try setting device to 'Mac compatibility' mode: Settings -> Storage and 
access -> USB connections : connect to Mac.

Also check thath USB tethering is enabled in your phone: Settings -> 
Network Connections -> Internet tethering, select "Connect using" "USB" 
and turn it on.

kernel: ugen6.2: <Research In Motion, Ltd.> at usbus6
devd: Executing 'kldload -n if_cdce'
kernel: cdce0: <Research In Motion, Ltd. BlackBerry, class 2/6, rev 
2.00/2.40, addr 1> on usbus6
devd: Executing 'logger Unknown USB device: vendor 0x0fca product 0x8013 
bus uhub6'
root: Unknown USB device: vendor 0x0fca product 0x8013 bus uhub6
kernel: ue0: <USB Ethernet> on cdce0
kernel: ue0: Ethernet address: 96:eb:cd:2d:05:5d
devd: Executing 'logger Unknown USB device: vendor 0x0fca product 0x8013 
bus uhub6'
limbo root: Unknown USB device: vendor 0x0fca product 0x8013 bus uhub6
devd: Executing '/etc/pccard_ether ue0 start'
devd: Executing 'logger Unknown USB device: vendor 0x0fca product 0x8013 
bus uhub6'
root: Unknown USB device: vendor 0x0fca product 0x8013 bus uhub6

# dhclient ue0
DHCPREQUEST on ue0 to 255.255.255.255 port 67
DHCPNAK from 192.168.0.1
DHCPDISCOVER on ue0 to 255.255.255.255 port 67 interval 4
DHCPOFFER from 192.168.0.1
DHCPREQUEST on ue0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.2 -- renewal in 3600 seconds.

I don't know why but setting ifconfig_ue0=DHCP at /etc/rc.conf doesn't 
works.

# route add default 192.168.0.1

# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: icmp_seq=0 ttl=46 time=588.697 ms
64 bytes from 8.8.8.8: icmp_seq=1 ttl=46 time=284.988 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=46 time=277.634 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=46 time=275.505 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=46 time=252.686 ms
^C
--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 252.686/335.902/588.697/126.859 ms

# tcpdump -pni ue0
13:23:09.393751 IP 192.168.0.2 > 8.8.8.8: ICMP echo request, id 18451, 
seq 0, length 64
13:23:09.982413 IP 8.8.8.8 > 192.168.0.2: ICMP echo reply, id 18451, seq 
0, length 64
13:23:10.398790 IP 192.168.0.2 > 8.8.8.8: ICMP echo request, id 18451, 
seq 1, length 64
13:23:10.683738 IP 8.8.8.8 > 192.168.0.2: ICMP echo reply, id 18451, seq 
1, length 64
13:23:11.402911 IP 192.168.0.2 > 8.8.8.8: ICMP echo request, id 18451, 
seq 2, length 64
13:23:11.680505 IP 8.8.8.8 > 192.168.0.2: ICMP echo reply, id 18451, seq 
2, length 64
13:23:12.406746 IP 192.168.0.2 > 8.8.8.8: ICMP echo request, id 18451, 
seq 3, length 64
13:23:12.682195 IP 8.8.8.8 > 192.168.0.2: ICMP echo reply, id 18451, seq 
3, length 64
13:23:13.408292 IP 192.168.0.2 > 8.8.8.8: ICMP echo request, id 18451, 
seq 4, length 64
13:23:13.660936 IP 8.8.8.8 > 192.168.0.2: ICMP echo reply, id 18451, seq 
4, length 64

-- 
Sphinx of black quartz judge my vow.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53F86BF4.3060506>