Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Tethering with Axon 7 Issues
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Lillysky
n00b
n00b


Joined: 19 Aug 2017
Posts: 2
Location: Oregon

PostPosted: Sun Aug 20, 2017 7:14 am    Post subject: [Solved] Tethering with Axon 7 Issues Reply with quote

Hey friends,
after 3 days I've finally got gentoo installed and running. I've been dealing with the usual wildness after an install, however currently I can't do much without a network connection. During the install I was able to tether my Axon 7 as easy as plugging it in and turning on tethering. This is not the case with the actual installation.

So I booted up the liveusb again, chrooted into the drive and installed DHCP, hoping I could use dhcpcd usbN as per the wiki article. To figure out what usb number my phone is I used dmesg. Its a whole lot of nonsense to a noob like me. I was able to find something mentioning a device number, which in my case was 7 (not in reference to the model number btw). This led me to believe it would be usb7 that I needed to use with dhcpcd, but it told me usb7 is invalid or nonexistent. I checked dmesg again to see if I picked the wrong one and noticed at the bottom it said "renaming from usb0". That threw me off. I tried usb0-usb7 and they all gave me the same error.

From here I'm not sure what to do. It "just werkd" on the liveusb yet in the environment I can't even figure out my device usb number, much less get dhcp working. Having to go into the liveusb and chroot just to install a few packages to go back and test more things is getting really tedious and stale so I'd like to establish a connection in the actual environment.

On the wiki it mentions with some phones you need rndis_host module, but I have absolutely no idea how a kernel module is added and, am in no way competent enough to just mess around until I figure it out. The wiki page has, at the top, a few blocks like this:
Code:

Device Drivers --->
    [*] Network device support --->
        <M> USB Network Adapters --->
            <M> Multi-purpose USB Networking Framework
                <M>  CDC Ethernet support (smart devices such as cable modems)
                <M>  CDC EEM support
      <M>  Host for RNDIS and ActiveSync devices
                <M>  Simple USB Network Links (CDC Ethernet subset)
                     [*] Embedded ARM Linux links (iPaq, ...)

The way it's presented would lead you to think it has to do with installing the modules needed but really it looks like a bunch of useless comments, to me at least. If I do need to mess with this module, how...?
An aside: if I do need to do this please don't tell me I also need to recompile the entire kernel, oh please no.

tl;dr: how do I replicate whatever is making tethering work in the livecd environment, but on my actual system? How am I supposed to interpret dmesg to figure out the correct usbN number? How come dhcpcd gives me an error on literally all of them? Has anyone tethered a ZTE Axon 7 before and if so, what did you do to make it work? Do I need to install this rndis_host module and if so, how?

I really do want to learn these things but currently I'm lost and confused...


Last edited by Lillysky on Sun Aug 20, 2017 5:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Lillysky
n00b
n00b


Joined: 19 Aug 2017
Posts: 2
Location: Oregon

PostPosted: Sun Aug 20, 2017 4:51 pm    Post subject: Reply with quote

Excuse the double post, but I'm going through it all again but this time heres more detail.

First I started an xfce session as a local user, turned tethering on, opened up xterm and used dmesg. After looking through the output I found two lines of interest:
Code:

usb 1-2: new high-speed USB device number 3 using ehci-pci
-snip-
usb 1-2: Product: Android

From this one can deduce that what I need is usb3 for dhcpcd.

I used ctrl+alt+f2 and logged in as root, then tried:
Code:
 dhcpcd usb3

It output:
Code:

usb3: interface not found or invalid
dhcpcd exited

Perhaps I got the number wrong. I scrolled down some more in dmesg and found the same android device but listed as device number 6. Tried it again with usb6 and got the same error. Dmesg didnt have anything else about android, so that appears to be a dead end there. I tried blkid as well but, no luck, just storage devices.

Ive re-read the wiki page far too many times at this point. The only other thing I can think of is the module it mentions but I'll come back and edit this later if I manage to figure it out with some searching.


Edit 1: I ran lsmod and found this line:
Code:

usbnet    4505    2 rndis_host,cdc_ether

Im guessing this means rndis_host exists, but this is confusing because most people (including the wiki article) get some lines in dmesg mentioning rndis_host, but so far I havent found anything indicative of rndis_host.


Edit 2: I went back changed my phone connection setting from "media device MTP" to "camera PTP", then turned on tethering again and ran dmesg. At the very bottom I noticed:
Code:

rndis_host 1-2:1.0 usb0: register 'rndis_host' at usb-0000:00:04. 1-2, RNDIS device, 7a:8a:1c:15:72:f5
rndis_host 1-2:1.0 enp0s4f1u2: renamed from usb0

Okay so rndis_host does exist. Could it have renamed my phone from usb0 to enp0s4f1u2? To test this I ran dhcpcd with the possible name. I got a variety of good looking lines, including:
Code:

...
enp0s4f1u2: carrier acquired
...
enp0s4f1u2: soliciting a DHCP lease
...

I cut out some lines since I'm currently posting on mobile and typing it all out seems unnecessary but you get the point.

This could be good! let's try
Code:

ifconfig -a


And good news! enp0s4f1u2 is at the top and there are numbers other than 0 when it talks about packets! This could very well be a working connection! Running route shows enp0s4f1u2 under 'Iface' in the table it outputs, again indicating a working connection! One last test - emerge. As an example I decided to get x11-terms/xfce4-terminal.

It worked!

Further testing may be needed as I think what really happened was I was just using the wrong name all along and that mtp/ftp likely didn't matter. Sorry this has been drawn out so far, I feel like an idiot but I'm glad I figured it out!
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 3664

PostPosted: Mon Aug 21, 2017 6:03 am    Post subject: Reply with quote

Lillysky wrote:
Code:

rndis_host 1-2:1.0 usb0: register 'rndis_host' at usb-0000:00:04. 1-2, RNDIS device, 7a:8a:1c:15:72:f5
rndis_host 1-2:1.0 enp0s4f1u2: renamed from usb0

Okay so rndis_host does exist. Could it have renamed my phone from usb0 to enp0s4f1u2?

See https://wiki.gentoo.org/wiki/Eudev/Network_device_names
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum