https://redmine.replicant.us/https://redmine.replicant.us/favicon.ico?15984615062018-09-02T20:19:35ZReplicantReplicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=71972018-09-02T20:19:35ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul></ul><p>Hi,</p>
<p>As I understand the best way to solve this bug would be to simply compile in the kernel image, all USB Ethernet adapters drivers. This should be trivial to do.</p>
<p>It would be better to have them as modules (as it would use less RAM and would carry less risk of making the kernel image too big for the boot partition) but as far as I know we have no good enough module loading mechanism in Android 6.x to do that.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=73172019-02-03T05:35:27ZKurtis HannaKurtis@riseup.net
<ul></ul><p>I'd love to research this issue more. Does anyone have any links to articles or documentation or code about this? I would really like to be able to connect my phone to my ethernet cable if it is a somewhat trival thing to make happen in software.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=73422019-03-06T23:17:17ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul></ul>The following might work:
<ul>
<li>Start to work on it for a device that you can easily test on</li>
<li>try to build an image and test it</li>
<li>go in your kernel source code and run:<br /><pre>
export ARCH=arm
make xconfig # select the drivers you want to add, like the asix driver
make savedefconfig
</pre><br />Then copy the generated defconfig in the place of your kenrel default configuration</li>
</ul>
<p>For the Galaxy S3 4G, in device/samsung/i9305/BoardConfig.mk we have:<br /><pre>
# Kernel
TARGET_KERNEL_SOURCE := kernel/samsung/smdk4412
TARGET_KERNEL_CONFIG := lineageos_i9305_defconfig
</pre></p>
<p>You can then go in kernel/samsung/smdk4412 and you have arch/arm/configs/lineageos_i9305_defconfig<br />You can then run the following to change the kernel configuration:<br /><pre>
export ARCH=arm
make lineageos_i9305_defconfig
make xconfig # select the drivers you want to add, like the asix driver
make savedefconfig
cp defconfig arch/arm/configs/lineageos_i9305_defconfig
</pre></p>
<p>However if you do that, the Android build system might complain that your kernel source tree is dirty, so you can remove the binaries changes with the following:<br /><pre>
make clean
make mrproper
make distclean
</pre></p>
<p>This is because running "make xconfig" will compile the graphical utility that enables you to change the kernel configuration.</p>
<p>Alternatively you can just clone the kernel again outside of the Replicant tree and do that there, and copy the resulting defconfig in Replicant source tree.</p>
<p>Once it's cleaned you can re-launch a build as usual, sign the build and install it as usual.</p>
<p>While this takes more time and it not very convenient it's way safer than flashing the boot.img.</p>
<p>If you do still attempt to flash the boot.img make sure to double check that you are not flashing the kernel in the bootloader partition, otherwise your may break your device if you do that.</p>
<p>This mistake is not that far fetched: On some devices like the Galaxy SII, the PIT partition named BOOT is the bootloader, while on many other devices it's the boot.img</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=73802019-04-07T14:31:14ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul><li><strong>Target version</strong> changed from <i>Replicant 6.0 0005</i> to <i>Replicant 6.0 0004</i></li></ul> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=74162019-05-06T15:30:03ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul></ul><p>I've tested an adapter compatible with the asix driver with the Galaxy Nexus.</p>
<p>On my desktop, lsusb shows the following:<br /><pre>
$ sudo lsusb -d 0b95:1720 -vvvv
Bus 001 Device 016: ID 0b95:1720 ASIX Electronics Corp. 10/100 Ethernet
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0b95 ASIX Electronics Corp.
idProduct 0x1720 10/100 Ethernet
bcdDevice 0.01
iManufacturer 1 USB
iProduct 2 USB2.0 10/100 Ethernet Adapter
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0027
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xa0
(Bus Powered)
Remote Wakeup
MaxPower 300mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 3
bInterfaceClass 0
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 11
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
bNumConfigurations 1
can't get debug descriptor: Resource temporarily unavailable
Device Status: 0x0000
(Bus Powered)
</pre></p>
<p>This shows that it should consume 300mA maximum.</p>
<p>The Galaxy Nexus should be able to provide 500mA on the USB port according to the <a href="https://git.replicant.us/replicant/kernel_samsung_tuna/tree/arch/arm/mach-omap2/board-tuna-connector.c#n260" class="external">kernel source code</a></p>
<p>However when I tried it, in dmesg we can see the following error:<br /><pre>
asix 1-1:1.0: (unregistered net_device): Failed to enable software MII access
</pre></p>
<p>The interface also was not there in /sys/class/net</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=74292019-05-06T15:59:10ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul></ul><p>On the Galaxy Nexus, after retrying after a power off and power on I got a "<->" icon in the top bar. This is the icon for ethernet. I can then update repositories with f-droid.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=74302019-05-07T14:51:19ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul></ul><p>I've sent patches to the mailing list for the Galaxy Nexus, that I could then reliability test. It didn't work the first time but it worked all the subsequent times reliabily.</p>
<p>I've patches for the Galaxy SII too, but I need to go buy a new battery as on the second hand ones I have just doing 'dmesg' in the terminal application makes the touchkey leds flicker. This is probably because it refresh the display and consume more power and that such old battery can't stand the current draw.</p>
I've pushed the patches in the following repositories:
<ul>
<li><a href="https://git.replicant.us/contrib/GNUtoo/kernel_samsung_smdk4412.git/" class="external">GNUtoo/kernel_samsung_smdk4412</a> in the ethernet/replicant-6.0-dev branch </li>
<li><a href="https://git.replicant.us/contrib/GNUtoo/kernel_samsung_tuna.git/" class="external">GNUtoo/kernel_samsung_tuna</a> in the ethernet/replicant-6.0-dev branch</li>
</ul>
<p>The ethernet/replicant-6.0-dev branch in my <a href="https://git.replicant.us/contrib/GNUtoo/manifest.git/" class="external">manifest</a> can also be used to test the patches.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=74602019-05-21T13:21:36ZDenis 'GNUtoo' CarikliGNUtoo@cyberdimension.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li></ul> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=75612019-08-27T17:10:29ZKurtis HannaKurtis@riseup.net
<ul></ul><p>I believe that once we have support for the N7100, N51XX, and espresso10 devices we can close this ticket.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76102019-10-08T23:00:28ZJoonas Kylmälä
<ul></ul><p>I suggest to skip this feature for the 0004 release.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76162019-10-09T19:50:03ZKurtis HannaKurtis@riseup.net
<ul><li><strong>Blocks</strong> <i><a class="issue tracker-3 status-27 priority-21 priority-default closed" href="/issues/1960">Issue #1960</a>: Build release candidate image for 6.0 0004</i> added</li></ul> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76782019-10-09T21:03:01ZKurtis HannaKurtis@riseup.net
<ul></ul><p>We need someone to test some Roms that GNUtoo built for the espresso devices in order to close this issue. The Roms can be downloaded here: <a class="external" href="https://replicant.cyberdimension.org/ethernet-test-0001/">https://replicant.cyberdimension.org/ethernet-test-0001/</a></p>
<p>The espressowifi Roms work on:<br />Galaxy Tab 2 7.0 Wi-Fi (P3110)<br />Galaxy Tab 2 10.1 Wi-Fi (P5110)</p>
<p>The espresso3g Roms work on:<br />Galaxy Tab 2 7.0 (P3100)<br />Galaxy Tab 2 10.1 (P5100)</p>
<p>If you need GNUtoo's GPG key to verify the images, you can find it here: <a class="external" href="https://redmine.replicant.us/projects/replicant/wiki/People#Denis-GNUtoo-Carikli">https://redmine.replicant.us/projects/replicant/wiki/People#Denis-GNUtoo-Carikli</a></p>
<p>We mainly just want to know that the devices boot up, so this will be really easy to test.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76792019-10-09T21:06:02ZKurtis HannaKurtis@riseup.net
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>90</i></li></ul> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76862019-10-10T22:58:42Zariel enter
<ul><li><strong>File</strong> <a href="/attachments/1624">Screenshot_2019-10-10-15-11-36.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1624/Screenshot_2019-10-10-15-11-36.png">Screenshot_2019-10-10-15-11-36.png</a> added</li><li><strong>File</strong> <a href="/attachments/1623">IMG_20191010_164533.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1623/IMG_20191010_164533.jpg">IMG_20191010_164533.jpg</a> added</li></ul><p>I just test the ROM, and it boot and works correctly. My device seems to be GT-P3113 so I installed the espressowifi ROM and as I said it worked.</p>
<p>Can I keep using that version of the ROM? or should I get back to the regular Replicant ROM?</p>
<p>I might have a USB Ethernet around, should I test it? is there something special that I would have to do after connecting it? I'm guessing that only asix driver compatible devices will work?</p>
<p>I was very happy to help. Thank you for considering me C:</p>
<p>EDITH: Sorry, I let my self carry a way. You probably already know USB Ethernet works fine. I just got really excited to help. Once again thank you. I think I'll be going to libre planet this year. I'm from Mexico BTW.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76872019-10-10T23:48:47Zariel enter
<ul></ul><p>OK, my mistake. I used Tap 2 7.0 instead of the 10.1 one. Luckily I have both do you guys need me to test it on 10.1 too?</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=76882019-10-11T18:01:41ZKurtis HannaKurtis@riseup.net
<ul></ul><p>Hello Ariel,</p>
<p>Thanks so much for providing this testing and feedback! You're welcome to keep using that Rom, but we will have an official testing version of Replicant 6.0 0004 ready in a few days that will include a number of fixes and updates that this Rom does not have. If you could test the 10.1 Rom as well on your device that'd be spectacular! Please feel free to test out the USB Ethernet adapter on both devices as well if you have one. Asix driver compatible devices are the most likely to work. You might need to restart the device to get the ethernet adapter to turn on. We might be at LibrePlanet this upcoming year as well. It'd be great to meet up!</p>
<p>Cordially,<br />Kurtis</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=77062019-10-15T21:12:26Zariel enter
<ul><li><strong>File</strong> <a href="/attachments/1625">IMG_20191015_150302.jpg</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/1625/IMG_20191015_150302.jpg">IMG_20191015_150302.jpg</a> added</li></ul><p>Sorry for the delay, I just tested on the Tap 2 10.1 and it works!!! It's also a espressowifi since it doesn't seem to have a ship socket. Any way I used espressowifi and it work.</p>
<p>Now time to look at the libre planet schedule and tickets. It will be my first and probably last time I'll ever go. I'm sure it will be a unforgettable life time experience C:</p>
<p>See you soon.</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=77072019-10-16T17:41:16ZKurtis HannaKurtis@riseup.net
<ul></ul><p>Thanks for the update, Ariel! This is very helpful! Looking forward to seeing you at LibrePlanet!</p> Replicant - Feature #1889: Add USB Ethernet supporthttps://redmine.replicant.us/issues/1889?journal_id=77222019-10-20T15:04:05ZKurtis HannaKurtis@riseup.net
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Resolved</i></li><li><strong>% Done</strong> changed from <i>90</i> to <i>100</i></li><li><strong>Resolution</strong> set to <i>fixed</i></li></ul><p>All of the ethernet patches have been pushed so I'm closing this ticket and marking it as fixed.</p>