Como eu obtenho o USB Tethering funcionando entre 15.10 e um dispositivo Android?

2

Ambiente: Ubuntu 15.10 em um Dell L502X

Eu costumava usar o tethering USB entre o Ubuntu e um dispositivo Android sem problemas. No final do ano passado, apliquei uma nova instalação do Ubuntu (15.10) no notebook. Agora, com essa combinação, não consigo fazer o tethering USB funcionar. Eu tentei um Nexus 4 (rodando o Android 5.1, que costumava trabalhar com o Ubuntu 15.04 que eu usei anteriormente), um Nexus 5 (rodando o Android 6.0.1) e um Nexus 5X (rodando o Android 6.0.1).

Quando eu habilito o tethering de USB, recebo uma nova entrada em ifconfig output:

enx92c991095e89 Link encap:Ethernet  HWaddr 92:c9:91:09:5e:89  
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:7 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:520 (520.0 B)  TX bytes:0 (0.0 B)

Observe que o endereço de hardware muda com cada cabo, então, desligar o tethering USB, ligá-lo novamente ou alternar para outro dispositivo Nexus me fornece uma entrada de substituição:

enx82fb7388a85c Link encap:Ethernet  HWaddr 82:fb:73:88:a8:5c  
      UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      RX packets:4 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:332 (332.0 B)  TX bytes:0 (0.0 B)

Também recebo uma entrada com fio correspondente na tela Rede nas Configurações do sistema, mostrando o endereço de hardware correspondente à sub-rotina ifconfig e descrito como "Desconectado" (para a sessão de tethering USB ativada atual) ou "Não gerenciado" ( para uma sessão de tethering USB anterior).

Ter o GUFW ativado ou desativado não afeta o problema. A conexão direta ou por meio de um hub USB não afeta o problema.

Meu /etc/network/interfaces é padrão:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Há mais alguma coisa que eu precise fazer no Ubuntu 15.10 para fazer o tethering do Android Android funcionar?

UPDATE : Aqui estão os registros solicitados por @bain:

Jan 16 08:22:09 L502X kernel: [ 5377.812495] usb 1-1: new high-speed USB device number 3 using xhci_hcd
Jan 16 08:22:09 L502X kernel: [ 5377.945753] usb 1-1: New USB device found, idVendor=18d1, idProduct=4ee2
Jan 16 08:22:09 L502X kernel: [ 5377.945763] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 16 08:22:09 L502X kernel: [ 5377.945768] usb 1-1: Product: Nexus 5X
Jan 16 08:22:09 L502X kernel: [ 5377.945772] usb 1-1: Manufacturer: LGE
Jan 16 08:22:09 L502X kernel: [ 5377.945776] usb 1-1: SerialNumber: 00f204f982a4b8b9
Jan 16 08:22:10 L502X org.gtk.Private.GPhoto2VolumeMonitor[1780]: (process:2108): GVFS-GPhoto2-WARNING **: device (null) has no BUSNUM property, ignoring
Jan 16 08:22:10 L502X kernel: [ 5378.080031] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8612 LEN=24 
Jan 16 08:22:10 L502X kernel: [ 5378.080049] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8610 LEN=24 
Jan 16 08:22:10 L502X kernel: [ 5378.090303] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8612 LEN=24 
Jan 16 08:22:10 L502X kernel: [ 5378.090319] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8610 LEN=24 
Jan 16 08:22:11 L502X org.gtk.Private.GPhoto2VolumeMonitor[1780]: (process:2108): GVFS-GPhoto2-WARNING **: device (null) has no BUSNUM property, ignoring
Jan 16 08:22:11 L502X colord[1165]: (colord:1165): Cd-WARNING **: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_
Jan 16 08:22:14 L502X colord-sane: io/hpmud/musb.c 2081: Invalid usb_open: Permission denied
Jan 16 08:22:30 L502X kernel: [ 5398.876832] usb 1-1: USB disconnect, device number 3
Jan 16 08:22:31 L502X kernel: [ 5399.213700] usb 1-1: new high-speed USB device number 4 using xhci_hcd
Jan 16 08:22:31 L502X kernel: [ 5399.346845] usb 1-1: New USB device found, idVendor=18d1, idProduct=4ee4
Jan 16 08:22:31 L502X kernel: [ 5399.346855] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 16 08:22:31 L502X kernel: [ 5399.346860] usb 1-1: Product: Nexus 5X
Jan 16 08:22:31 L502X kernel: [ 5399.346864] usb 1-1: Manufacturer: LGE
Jan 16 08:22:31 L502X kernel: [ 5399.346868] usb 1-1: SerialNumber: 00f204f982a4b8b9
Jan 16 08:22:31 L502X mtp-probe: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1"
Jan 16 08:22:31 L502X mtp-probe: bus: 1, device: 4 was not an MTP device
Jan 16 08:22:31 L502X kernel: [ 5399.385223] usbcore: registered new interface driver cdc_ether
Jan 16 08:22:31 L502X kernel: [ 5399.392871] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:04:00.0-1, RNDIS device, 9a:ff:bd:ee:76:ea
Jan 16 08:22:31 L502X kernel: [ 5399.392918] usbcore: registered new interface driver rndis_host
Jan 16 08:22:31 L502X NetworkManager[1070]: <warn>  (usb0): failed to find device 4 'usb0' with udev
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  (usb0): new Ethernet device (carrier: OFF, driver: 'rndis_host', ifindex: 4)
Jan 16 08:22:31 L502X kernel: [ 5399.398467] rndis_host 1-1:1.0 enx9affbdee76ea: renamed from usb0
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  (usb0): interface index 4 renamed iface from 'usb0' to 'enx9affbdee76ea'
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  devices added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1/1-1:1.0/net/enx9affbdee76ea, iface: enx9affbdee76ea)
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  device added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1/1-1:1.0/net/enx9affbdee76ea, iface: enx9affbdee76ea): no ifupdown configuration found.
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  (enx9affbdee76ea): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jan 16 08:22:31 L502X kernel: [ 5399.442941] IPv6: ADDRCONF(NETDEV_UP): enx9affbdee76ea: link is not ready
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  (enx9affbdee76ea): link connected
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  (enx9affbdee76ea): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Jan 16 08:22:31 L502X NetworkManager[1070]: <info>  Device 'enx9affbdee76ea' has no connection; scheduling activate_check in 0 seconds.
Jan 16 08:22:31 L502X kernel: [ 5399.458876] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8612 LEN=24 
Jan 16 08:22:31 L502X kernel: [ 5399.458904] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8610 LEN=24 
Jan 16 08:22:31 L502X kernel: [ 5399.469062] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8612 LEN=24 
Jan 16 08:22:31 L502X kernel: [ 5399.469088] [UFW BLOCK] IN=enp6s0 OUT= MAC= SRC=fe80:0000:0000:0000:16fe:b5ff:febb:2732 DST=ff02:0000:0000:0000:0000:0000:0000:0001 LEN=64 TC=0 HOPLIMIT=1 FLOWLBL=0 PROTO=UDP SPT=8612 DPT=8610 LEN=24 
Jan 16 08:22:33 L502X ModemManager[1081]: <info>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1': not supported by any plugin
Jan 16 08:22:35 L502X colord-sane: io/hpmud/musb.c 2081: Invalid usb_open: Permission denied

UPDATE # 2 : Novo syslog, após desabilitar o firewall via GUFW:

Jan 16 09:33:23 L502X kernel: [ 9649.766835] usb 1-1: new high-speed USB device number 6 using xhci_hcd
Jan 16 09:33:23 L502X kernel: [ 9649.900519] usb 1-1: New USB device found, idVendor=18d1, idProduct=4ee2
Jan 16 09:33:23 L502X kernel: [ 9649.900529] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 16 09:33:23 L502X kernel: [ 9649.900534] usb 1-1: Product: Nexus 5X
Jan 16 09:33:23 L502X kernel: [ 9649.900538] usb 1-1: Manufacturer: LGE
Jan 16 09:33:23 L502X kernel: [ 9649.900542] usb 1-1: SerialNumber: 00f204f982a4b8b9
Jan 16 09:33:23 L502X org.gtk.Private.GPhoto2VolumeMonitor[1780]: (process:2108): GVFS-GPhoto2-WARNING **: device (null) has no BUSNUM property, ignoring
Jan 16 09:33:24 L502X org.gtk.Private.GPhoto2VolumeMonitor[1780]: (process:2108): GVFS-GPhoto2-WARNING **: device (null) has no BUSNUM property, ignoring
Jan 16 09:33:24 L502X colord[1165]: (colord:1165): Cd-WARNING **: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_
Jan 16 09:33:26 L502X kernel: [ 9652.898664] usb 1-1: USB disconnect, device number 6
Jan 16 09:33:26 L502X kernel: [ 9653.233755] usb 1-1: new high-speed USB device number 7 using xhci_hcd
Jan 16 09:33:26 L502X kernel: [ 9653.367239] usb 1-1: New USB device found, idVendor=18d1, idProduct=4ee4
Jan 16 09:33:26 L502X kernel: [ 9653.367249] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 16 09:33:26 L502X kernel: [ 9653.367254] usb 1-1: Product: Nexus 5X
Jan 16 09:33:26 L502X kernel: [ 9653.367258] usb 1-1: Manufacturer: LGE
Jan 16 09:33:26 L502X kernel: [ 9653.367262] usb 1-1: SerialNumber: 00f204f982a4b8b9
Jan 16 09:33:26 L502X kernel: [ 9653.375259] rndis_host 1-1:1.0 usb0: register 'rndis_host' at usb-0000:04:00.0-1, RNDIS device, 4e:8a:8f:3f:b7:cb
Jan 16 09:33:26 L502X NetworkManager[1070]: <warn>  (usb0): failed to find device 5 'usb0' with udev
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  (usb0): new Ethernet device (carrier: OFF, driver: 'rndis_host', ifindex: 5)
Jan 16 09:33:26 L502X mtp-probe: checking bus 1, device 7: "/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1"
Jan 16 09:33:26 L502X mtp-probe: bus: 1, device: 7 was not an MTP device
Jan 16 09:33:26 L502X kernel: [ 9653.420245] rndis_host 1-1:1.0 enx4e8a8f3fb7cb: renamed from usb0
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  (usb0): interface index 5 renamed iface from 'usb0' to 'enx4e8a8f3fb7cb'
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  devices added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1/1-1:1.0/net/enx4e8a8f3fb7cb, iface: enx4e8a8f3fb7cb)
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  device added (path: /sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1/1-1:1.0/net/enx4e8a8f3fb7cb, iface: enx4e8a8f3fb7cb): no ifupdown configuration found.
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  (enx4e8a8f3fb7cb): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  (enx4e8a8f3fb7cb): link connected
Jan 16 09:33:26 L502X kernel: [ 9653.447746] IPv6: ADDRCONF(NETDEV_UP): enx4e8a8f3fb7cb: link is not ready
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  (enx4e8a8f3fb7cb): device state change: unavailable -> disconnected (reason 'none') [20 30 0]
Jan 16 09:33:26 L502X NetworkManager[1070]: <info>  Device 'enx4e8a8f3fb7cb' has no connection; scheduling activate_check in 0 seconds.
Jan 16 09:33:27 L502X colord-sane: io/hpmud/musb.c 2081: Invalid usb_open: Permission denied
Jan 16 09:33:28 L502X ModemManager[1081]: <info>  Couldn't find support for device at '/sys/devices/pci0000:00/0000:00:1c.3/0000:04:00.0/usb1/1-1': not supported by any plugin

UPDATE # 3 : route -n com o tethering de USB ativado, após sudo dhclient ... :

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 enx16d44e6a2773
192.168.42.0    0.0.0.0         255.255.255.0   U     0      0        0 enx16d44e6a2773
    
por CommonsWare 15.01.2016 / 15:10

3 respostas

1

Bem, obrigado bain pelo início da resposta, você quase resolveu:)

Fazendo exatamente o que você disse, você ainda não pode surfar nem fazer coisas como ping google.com , irritante.

MAS, tudo parecia ok (route, ifconfig, /etc/resolv.conf apontando para 127.0.1.1 ...). Só para ter certeza, eu tentei pingar um ip conhecido do google (206.169.145.232), e funcionou! Porra, eu não sei por que o DNS também está sendo executado, mas você pode usar a solução temporária editando /etc/resolv.conf e substituindo 127.0.1.1 por 8.8.8.8 (e até mesmo adicionar uma segunda linha nameserver 8.8.4.4 ) .

Você está pronto e pode navegar na Web novamente!

Agora, seria ótimo se alguém pudesse descobrir por que o kubuntu 15.10 (que também é afetado por esse bug) não pode fazer isso automaticamente, como antes.

Aproveite.

    
por AciD 28.01.2016 / 08:21
0

O que aconteceu é que suas interfaces USB0 foram renomeadas para enx4e8a8f3fb7cb pelo driver rndis_host. Simplesmente edite seu arquivo / etc / network / interfaces e substitua a interface USB0 pela interface renomeada que o driver rdis_host renomeou.

Para descobrir isso depois de conectar seu telefone e ativar o recurso tethering, execute "ifconfig -a" em um terminal e você verá a nova interface gerada aleatoriamente, mais uma vez você não verá mais o USB0, pois ele foi renomeado pelo driver rndis_host.

    
por janswers 01.10.2017 / 06:34
-1

O problema não no Ubuntu, enfrentei o mesmo problema no Windows 7

De alguma forma, o PC não reconhece a rede do Android com o DNS. Para resolver esse problema, você está usando algum aplicativo de conexão de bloqueio no seu android?

Se sim desativá-lo, tente usar o tethering de USB, se o mesmo problema fizer o seguinte:

  1. Instalar (Configurar DNS ou DNS Changer) no Google play
  2. Definir o DNS do Google

    DNS1: 8.8.8.8

    DNS2: 8.8.4.4

Em seguida, pressione conectar, depois tente ativar o tethering USB.

Deve funcionar

    
por mmalzahrani 04.12.2017 / 23:05