Project

General

Profile

[6.0004 on N7100] - Extra network doesn't work

Added by Emmett Brown about 1 month ago

Hi everybody!

I've just bought a wifi adaptateur using atheros AR7291 to use on my N7100 with replicant 6.0004, but it doesn't work.
It well recognize by my phone. In the wifi menu, the MAC Address appears, but it doesn't discover any wifi network

I also bought an ethernet adaptator to connect my n7100 on my network with RJ45, but it also doesn't work...
It appears as "eth0" with "ifconfig", but there is no IP address.

Thanks for your help !

Emmett


Replies (5)

RE: [6.0004 on N7100] - Extra network doesn't work - Added by Kurtis Hanna about 1 month ago

Hello Emmett,

I thought the wifi adapter had to be AR9271, not AR7291. Here's our wiki that lists devices that are known to work: https://redmine.replicant.us/projects/replicant/wiki/WiFiAdapter We haven't updated the docs yet related to how to use the usb wifi adapter without RepWifi, so please ignore that part because RepWifi is EOL. If you have a usb wifi adapter that is known to work, perhaps your otg cable or usb port on your phone has a hardware issue. Also, please let us know if your battery was fully charged or close to dead when you did this test. When it gets below 20% battery charge, wifi works less reliably.

I was just recently testing an ethernet adapter with my N7100 also and had the exact same issue. It doesn't seem like this feature worked on stock android on the N7100 based on my reading of old xda threads.

A few posts on page four of this thread seems to suggest they found a way to get it to work by running a few commands, but I haven't tested their methods yet:
https://forum.xda-developers.com/showthread.php?t=1933410&page=4

The information seems dated back to stock Android Lolipop, so perhaps it isn't helpful.

Please keep us updated on your progress and happy hacking!

Cordially,
Kurtis

RE: [6.0004 on N7100] - Extra network doesn't work - Added by Emmett Brown about 1 month ago

Hello Kurtis!

Thanks for your answer.

I'm sorry, my bad, the wifi adapter I bought is an AR9271, as the wiki suggest.
So, normaly, it had to work.
My OTG cable works with other devices, and my battery was nearly 100%
I also tried with a cable with 2 usb A connector that allow to add extra power supply, but it didn't help

Regarding the ethernet adapter, I tried the way suggested

"ifconfig eth0 192.168.XXX.XXX netmask 255.255.XXX.XXX
route add default gw 192.168.XXX.XXX dev eth0
setprop net.dns1 192.168.XXX.XXX"

"route add default gw 192.168.XXX.XXX dev eth0" returns "resolving 'gw': No such file or directory"

So I tried with busybox "busybox route add default gw 192.168.XXX.XXX dev eth0", and it seemed to work

But at the end, I wasn't able to use internet

If I do "ifconfig eth0", the configuration seems to be OK
If I do "route", the configuration seems also to be OK

It only was possible to ping ip inside my network.
I have a web server, but it's impossible to connect to it even if I use ip address "192.168.X.X" instead of the domain name

I continue my investigation ...

Thanks !

RE: [6.0004 on N7100] - Extra network doesn't work - Added by Emmett Brown about 1 month ago

Instead of setprop net.dns1 192.168.XXX.XXX
I used "ndc resolver setnetdns eth0 "" X.X.X.X X.X.X.X

Now, from terminal, I can ping internet domain.
Yeah !

But from apps, impossible to connect to anything

RE: [6.0004 on N7100] - Extra network doesn't work - Added by Emmett Brown about 1 month ago

I found something on this forum

https://discuss.96boards.org/t/hikey-android-configure-ethernet-set-static-ip/399/9

It says :
I went real deep on a search to resolve this and figured out why my own ethernet connection wasn’t working for the browser or other apps.

It has to do with the routing table setup for Android. There’s a rule that causes the main routing table only be used for root (uid 0). As a result the non-root user that the phone applications are running under don’t see the routes that had been added and return with some form of “Network unreachable”.

I’m looking into it more, but this line got, entered via a root shell by way of adb, got most of it resolved:

ip rule add from all lookup main pref 99

So, here commands to use et usb -> ethernet with Replicant :

ifconfig eth0 192.168.XXX.XXX netmask 255.255.XXX.XXX // define static IP and netmask
busybox route add default gw 192.168.XXX.XXX dev eth0 // define the gateway. Commands did not work without busybox
ndc resolver setnetdns eth0 "" X.X.X.X X.X.X.X // Define DNS. Setprop is depreciated
ip rule add from all lookup main pref 99 // allow the route to be seen by non-root user

One last thing to resolve :
Conversation (and maybe other apps) considers that there is not internet connection if connection data is disable or if airplane mode is on, even if ethernet connection works with privacy browser for example. I don't know why.

RE: [6.0004 on N7100] - Extra network doesn't work - Added by Emmett Brown about 1 month ago

Kurtis Hanna wrote:

Hello Emmett,

I thought the wifi adapter had to be AR9271, not AR7291. Here's our wiki that lists devices that are known to work: https://redmine.replicant.us/projects/replicant/wiki/WiFiAdapter We haven't updated the docs yet related to how to use the usb wifi adapter without RepWifi, so please ignore that part because RepWifi is EOL. If you have a usb wifi adapter that is known to work, perhaps your otg cable or usb port on your phone has a hardware issue. Also, please let us know if your battery was fully charged or close to dead when you did this test. When it gets below 20% battery charge, wifi works less reliably.

I just made some test with the wifi adapter, and I observed strange thing.
As I said, I'm using an AR9271. It works on my computeur, and my OTG cable works with other device.

When I connect my adapter, I can't see any network around.
I tried to use an usb multimeter with my adapter on my computeur to know the energy consumption : 25mA sleep mode - Between 70 and 90mA while working.
I do the same on my n7100, just to know if my phone is able to give enough power, and obviously, it can't give more than 70mA. But the stranger thing was my wifi adapter was able to see networks when it is used with the usb multimeter! It can't connect to my network due to an "authentification issue", but it seems to work better with my ubs multimeter.

The, I decided to try to do the same with my external GPS, just to know the energy consumption. While using my usb mutlimeter, the GPS in no more recognize.

So, is someone know the limit of power supply by OTG ?
Why my usb multimeter changes the behaviour of my usb devices ?

    (1-5/5)