Tiny Core Linux

Tiny Core Base => Raspberry Pi => Topic started by: strebor on June 20, 2016, 05:29:40 PM

Title: Pi Zero usb LAN adapter
Post by: strebor on June 20, 2016, 05:29:40 PM
Very new to the Raspery and Tiny Core and have not found out how to discover what hardware is compiled in.
I'm wanting to add wired Ethernet to the USB port

Thanks Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: Rich on June 20, 2016, 08:48:31 PM
Hi strebor
If you are looking for the kernel config, I think this is it:
http://tinycorelinux.net/8.x/armv7/releases/RPi/src/kernel/4.4.11-piCore_v7+_.config.xz
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on June 21, 2016, 02:20:51 AM
On the terminal type

Code: [Select]
sudo modprobe configs
zcat /proc/config.gz

It will display the actual kernel config file.
Title: Re: Pi Zero usb LAN adapter
Post by: mikedev on June 21, 2016, 11:48:32 AM
I'm wanting to add wired Ethernet to the USB port

Just for an example...
I am using pi Zero and a dirt cheap usb LAN adapter+USB 2.0 hub from ebay.

I use the piCore8.0beta

To support that dirt cheap usb LANadapter+USB2.0 3ports hub, I need to get http://tinycorelinux.net/8.x/armv6/releases/RPi/src/kernel/4.4.11-piCore+_modules.tar.xz and extract the
dm9601.ko
dm9601.ko.gz
into /usr/local/lib/modules/4.4.11-piCore+/kernel/dirvers/net/usb/
and remaster the core.gz

Then the usb LAN+USB2.0 3 ports hub is supported right from startup perfectly!
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 21, 2016, 12:26:24 PM
Thanks all for your answers.
What I actually have is piCorePlayer and a usb hub+Lan a la Mikedev.
I've gotten myself into a little bit of hole, as I only have ssh access (no spare hdmi monitor)

I see that the .img has a tce partition and I was wondering if I could use that to load a module at boot, rather than mess with kernel and have it overwritten with updates.

Anticipating your answers

Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: mikedev on June 21, 2016, 12:41:50 PM
Thanks all for your answers.
What I actually have is piCorePlayer and a usb hub+Lan a la Mikedev.
I've gotten myself into a little bit of hole, as I only have ssh access (no spare hdmi monitor)

I see that the .img has a tce partition and I was wondering if I could use that to load a module at boot, rather than mess with kernel and have it overwritten with updates.

Anticipating your answers

Strebor

In 7.x, it is available as a separate module "net-usb-4.1.13-piCore+.tcz" and you can load it after boot.
In 8.x, it is NOT available in the repository yet, and I can't wait so I manually remaster it into the core and load automatically at boot.
So, if you are looking for the module, then you need to wait for a bit...
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on June 21, 2016, 03:56:17 PM
net-usb-KERNEL.tcz added to 8.x repo
Title: Re: Pi Zero usb LAN adapter
Post by: Greg Erskine on June 21, 2016, 08:38:19 PM
Thanks all for your answers.
What I actually have is piCorePlayer and a usb hub+Lan a la Mikedev.
I've gotten myself into a little bit of hole, as I only have ssh access (no spare hdmi monitor)

I see that the .img has a tce partition and I was wondering if I could use that to load a module at boot, rather than mess with kernel and have it overwritten with updates.

Anticipating your answers

Strebor

hi Strebor,

I am assuming you are using piCorePlayer 2.06, so its linux 4.1.20-piCore+ / piCore v7.1beta4.

You need to load net-usb-4.1.20-piCore+.tcz, hopefully the required software is included for your particular hardware, but you need a network connection! maybe wifi?

Thru the web interface:
On [Main Page] in [Beta] mode, select [Extensions].
Scroll thru [Available extensions] until you find net-usb-4.1.20-piCore+.tcz. Click [Load].

Or, you could set up SD card on another Raspberry Pi B, but it needs to be using linux 4.1.20-piCore+ not linux 4.1.20-piCore_v7+

Or, if you are using a Linux computer elsewhere:
1. copy net-usb-4.1.20-piCore+.tcz to /mnt/mmcblk0p2/tce/optional
2. add  net-usb-4.1.20-piCore+.tcz  to file /mnt/mmcblk0p2/tce/onboot.lst

We will discuss if we need to add net-usb-4.1.20-piCore+.tcz to the standard image.

regards
Greg

Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 22, 2016, 06:14:39 AM
Greg et al, thanks, I will report success or failure. In woodworking mode  today as the drive units have arrived for the bespoke under cupboard kitchen player.
Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 23, 2016, 11:46:44 AM
Update, well the module is loaded, and now to turn of wifi .
The adapter I have is based upon RT8152 so i should be picked up ::)

Nah, and now I'm cut off so I'm going to stop until I can see a console on the hdmi port


The list of hardware in the module is thus:
pegasus.ko.gz
zaurus.ko.gz
kalmia.ko.gz
r8152.ko.gz
ax88179_178a.ko.gz
gl620a.ko.gz
net1080.ko.gz
sierra_net.ko.gz
rtl8150.ko.gz
plusb.ko.gz
sr9800.ko.gz
ipheth.ko.gz
mcs7830.ko.gz
cx82310_eth.ko.gz
huawei_cdc_ncm.ko.gz
smsc75xx.ko.gz
catc.ko.gz
lg-vl600.ko.gz
qmi_wwan.ko.gz
sr9700.ko.gz
rndis_host.ko.gz
asix.ko.gz
kaweth.ko.gz
dm9601.ko.gz
int51x1.ko.gz
..........................................................................
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 27, 2016, 04:14:06 PM
Well I have an hdmi monitor now so I can see

The USB-NET module is loaded and I can see in dmesg that the four port hub is recognised and the ethernet adapter is seen as r8152.
A CDC interface is registered with the core (cdc_ether) BUT ifcnfig run a root only shows the loopback.
Any ideas where I should look next?

Strebor

Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 28, 2016, 12:06:28 PM
Also should I see an available module from lsmod -l  I grep for 8152 or net-usb and don't find anything
cat /sys/class/net only shows the loopback

strebor
Title: Re: Pi Zero usb LAN adapter
Post by: Greg Erskine on June 29, 2016, 03:35:27 AM
hi strebor,

After loading net-usb-4.1.20-piCore+.tcz, I plugged one of these USB LAN devices into my RPi0, got this:

Code: [Select]
[696615.083155] usb 1-1.3: new high-speed USB device number 5 using dwc_otg
[696615.184046] usb 1-1.3: New USB device found, idVendor=1a40, idProduct=0101
[696615.184078] usb 1-1.3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[696615.184093] usb 1-1.3: Product: USB 2.0 Hub
[696615.188807] hub 1-1.3:1.0: USB hub found
[696615.189031] hub 1-1.3:1.0: 4 ports detected
[696615.463154] usb 1-1.3.4: new high-speed USB device number 6 using dwc_otg
[696615.565014] usb 1-1.3.4: New USB device found, idVendor=0bda, idProduct=8152
[696615.565045] usb 1-1.3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[696615.565059] usb 1-1.3.4: Product: USB 10/100 LAN
[696615.565073] usb 1-1.3.4: Manufacturer: Realtek
[696615.565499] usb 1-1.3.4: SerialNumber: 00E04C360941
[696615.641285] usbcore: registered new interface driver cdc_ether
[696615.723156] usb 1-1.3.4: reset high-speed USB device number 6 using dwc_otg
[696615.863965] r8152 1-1.3.4:1.0 eth0: v1.08.0 (2015/01/13)
[696615.864480] usbcore: registered new interface driver r8152

Plugged in Ethernet cable and got this:

Code: [Select]
tc@piCorePlayerHDMI:~$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:36:09:41
          inet addr:192.168.1.12  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:33 errors:0 dropped:1 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5200 (5.0 KiB)  TX bytes:1120 (1.0 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:87:35:1C:6F:85
          inet addr:192.168.1.3  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:190 errors:0 dropped:0 overruns:0 frame:0
          TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:32500 (31.7 KiB)  TX bytes:32723 (31.9 KiB)

lsmod gives this:

Code: [Select]
tc@piCorePlayerHDMI:~$ lsmod
Module                  Size  Used by    Not tainted
ctr                     4005  2
ccm                     8358  2
arc4                    1956  2
rt2800usb              18749  0
rt2x00usb              11916  1 rt2800usb
rt2800lib              81924  1 rt2800usb
rt2x00lib              48318  3 rt2800usb,rt2x00usb,rt2800lib
mac80211              624069  3 rt2x00usb,rt2800lib,rt2x00lib
cfg80211              500746  2 rt2x00lib,mac80211
snd_soc_bcm2708_i2s     7654  0
snd_soc_core          168317  1 snd_soc_bcm2708_i2s
r8152                  37386  0
rfkill                 22466  2 cfg80211
crc_ccitt               1620  1 rt2800lib
snd_pcm_dmaengine       5794  1 snd_soc_core
snd_compress            8861  1 snd_soc_core
regmap_mmio             3556  1 snd_soc_bcm2708_i2s
snd_bcm2835            22487  1
snd_pcm                93037  4 snd_soc_core,snd_pcm_dmaengine,snd_bcm2835
snd_timer              24444  1 snd_pcm
snd                    68803  6 snd_soc_core,snd_compress,snd_bcm2835,snd_pcm,snd_timer
cdc_ether               5582  0
i2c_bcm2708             6208  0
spi_bcm2835             7880  0
bcm2835_gpiomem         3703  0
bcm2835_rng             2207  0
uio_pdrv_genirq         3670  0
uio                    10078  1 uio_pdrv_genirq

It works!

regards
Greg
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 29, 2016, 07:43:02 AM
Greg, thanks for the detained post. I don't think the module is loaded on the Pi Zero, now I know what I should see from lsmod I'll work on that.
Kind regards, Strebor.
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on June 29, 2016, 09:25:19 AM
Is your USB adapter recognized? Check with lsusb.

Look for related messages in dmesg.

Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 29, 2016, 03:46:07 PM
bmarkus, yes but the last three lines of Greg's dmesg output don't come up on mine and I can't see r8152 in my lsmod.
I'm going to try a Rasbian install and see how the hardware I have performes.

thanks Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: Greg Erskine on June 29, 2016, 07:01:55 PM
hi strebor,

I think that means the hardware cannot find r8152.ko.gz.

How did you install it? Through the extension net-usb-4.1.20-piCore+.tcz or did you manually add r8152.ko.gz?

"df" will show you what extensions have been loop mounted.

Does your device have LEDs? Mine has a blue LED indicating USB and red LED indication Ethernet cable.

BTW: lsusb is not part of the standard piCorePlayer install. Load usbutils.tcz. Alternatively, if you do a [Wifi Settings] > [Diagnostics] it will install.

regards
Greg

Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 30, 2016, 02:15:49 AM
Greg, through the  extension of picoreplayer on a RPi2 and then move the card to the Zero, but I've also tried installing it by cp and vi the config file....strebor
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 30, 2016, 12:46:04 PM
Greg, well the archive is mounted loop, but lsmod r8152.ko doesn't see the module and I can't find any mention in the.dep file.
The .ko.gz file is there and the permissions were all root/root.
I seem to remember that when loading the extension from the gui the ascendancies window was empty, this I thought was odd as other extensions showed the load dependence

Regards Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: Misalf on June 30, 2016, 12:50:28 PM
Does this help
Code: [Select]
sudo depmod -a
sudo udevadm trigger
after adding the module into the file system?
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on June 30, 2016, 01:27:48 PM
Is kernel moduld matching kernel version?
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on June 30, 2016, 04:12:10 PM
uname -a says 4.1.20-picore* and /tmp/tcloop/net-usb-4.1.20-picore_v7+
give or take the odd typo

.......................


sudo depmod -a
sudo udevadm trigger

did't seem to do anything ifconfig still shows only shows loopback IF , dmesg didn't show a USB ethernet port defined.
.................

I tried Raspbian and the usb adapter came up, so it's ok hardware wise

regards Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: Paul_123 on June 30, 2016, 05:51:14 PM
uname -a says 4.1.20-picore* and /tmp/tcloop/net-usb-4.1.20-picore_v7+
give or take the odd typo

Please be specific, because the above is wrong.

You have downloaded the net-usb drivers for the armv7 processors.  The zero is armv6 You need this file

http://distro.ibiblio.org/tinycorelinux/7.x/armv6/tcz/net-usb-4.1.20-piCore+.tcz
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on July 01, 2016, 02:21:27 AM
I'll get my coat :(   I see what has happened, because I used the model B to add the extension and then move it to the Zero. I'll redo the image  and load the extension by hand.
Thanks Paul
Title: Re: Pi Zero usb LAN adapter
Post by: Greg Erskine on July 01, 2016, 02:45:31 AM
I'll get my coat :(   I see what has happened, because I used the model B to add the extension and then move it to the Zero. I'll redo the image  and load the extension by hand.
Thanks Paul

Hi strebor,

You must have a Raspberry Pi Model 2B (RPi2B) not a Raspberry Pi Model B (RPiB). Maybe a RPi3B?

Check in the footer on each web page for "linux 4.1.20-piCore+" NOT "linux 4.4.13-piCore_v7+"

regards
Greg
Title: Re: Pi Zero usb LAN adapter
Post by: strebor on July 01, 2016, 03:53:46 AM
Greg, you mean 2B or not 2B; well yes it's  2B
Thanks all for your help, this is great forum. As far as the Pi foundation aims  go, and generally a real tour de force.

Regards Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: Greg Erskine on July 01, 2016, 05:38:08 AM
You must have a Raspberry Pi Model 2B (RPi2B) not a Raspberry Pi Model B (RPiB). Maybe a RPi3B?

Just realised this statement has 2 and opposite meanings.

I should have said:

You must have used a Raspberry Pi Model 2B (RPi2B) not a Raspberry Pi Model B (RPiB).

regards
Greg
Title: Re: Pi Zero usb LAN adapter SOLVED
Post by: strebor on July 02, 2016, 08:42:17 AM
Repace the V7 net-usb package with the V6 for the PiZero and away we go 8)
nowI have to configure for hdmi out, and do the rest of the woodwork.
Thanks again all
Strebor
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on September 23, 2016, 01:43:04 PM
A very novice worthy question ...

I notice Greg has got this USB hub/ethernet thing working on a Pi0.

I have downloaded  net-usb-4.1.20-piCore+.tcz onto my Windows box and can putty into the Pi0 via a wifi link.

How do I install the package on the Pi0 having got this far?

Thanks
Paul
Title: Re: Pi Zero usb LAN adapter
Post by: Greg Erskine on September 23, 2016, 07:22:43 PM
Hi Paul,

I use winSCP to copy files to the Raspberry Pi.

1. Copy net-usb-4.1.20-piCore+.tcz to /mnt/mmcblk0p2/tce/optional
2. Add this line "net-usb-4.1.20-piCore+.tcz" to /mnt/mmcblk0p2/tce/onboot.lst

regards
Greg
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on September 24, 2016, 01:49:37 AM
 Copy the md5 file to optional dir also.
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on September 25, 2016, 01:14:46 PM
Hi Greg & Bela

Thanks for your help so far but I am having problems. I am wondering if the ethernet bit of the usb hub is duff. I have an Pi0 with a wifi dongle connected via the hub. I can talk to the pi0 using Putty & WinSCP (Thanks Greg) - so the usb bit of it works ok with the wifi.

I have installed net-usb-4.1.20-piCore+.tcz including the md5 txt file as per your instructions. Indeed this module is showing as being loaded in the PCP extensions interface.

I attach output from lsmod & ifconfig along with an extract from dmesg re the hub. This is with the hub plugged in as above and the ethernet connected to my switch. The hub shows constant blue at the Pi0 connection end and eventually it moves to solid blue (after flashing for a while) at the ethernet end.

Do I have a duff ethernet connection or have I missed siomething fundamental?

Thanks Paul
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on September 25, 2016, 02:47:14 PM
You have two IP interfaces which need special attention. Remove WiFi stick and reboot with Ethernet only.
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on September 26, 2016, 07:01:35 AM
Thanks Bela.

I have tried this before but tried it again and still no success. Given I am running headless I cannot provide any further info when running in this configuration. Any further ideas?

Paul
Title: Re: Pi Zero usb LAN adapter
Post by: bmarkus on September 26, 2016, 07:06:53 AM
Grab an USB serial adapter and use the serial console to debug.
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on October 02, 2016, 12:51:35 PM
Dear Bela and Greg

I continue to have problems with this usb hub/ethernet dongle. It works with full Raspbian so hardware is OK.

I have booted with keyboard and screen attached and only wired ethernet rather than running headless and confirm that in this setup ifconfig only shows local loopback l0 with no eth0. In either configuration (wifi or as above) r8152 is not being loaded.

FYI when booting it shows 8.0beta4 and kernel 4.4.15-piCore+. I loaded extension 4.1.20-piCore+.tcz as per Greg's note. And tce/optional has this and onboot.lst is updated as specified.

I was wanting to try using wired ethernet without wifi to take the strain off the Pi0 so I could play FLAC without stutter as per advice from Gordon of IQAudio. I seem to be getting further away from this the more I try!

Any other ideas?

Title: Re: Pi Zero usb LAN adapter
Post by: sbp on October 02, 2016, 01:30:17 PM

I have booted with keyboard and screen attached and only wired ethernet rather than running headless and confirm that in this setup ifconfig only shows local loopback l0 with no eth0. In either configuration (wifi or as above) r8152 is not being loaded.

FYI when booting it shows 8.0beta4 and kernel 4.4.15-piCore+. I loaded extension 4.1.20-piCore+.tcz as per Greg's note. And tce/optional has this and onboot.lst is updated as specified.


Sorry, but you are mixing an old kernel with a newer module - that will not work.

You need to use the newest piCore-8.0 which is using kernel 4.1.20. After doing that your extension based on 4.1.20+.tcz will match and the module can be loaded and used and hopefully your USB to LAN device will work.

Regards
Steen
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on October 02, 2016, 03:17:29 PM
Steen

Thanks for your speedy and informative reply.  Unfortunately I have no idea how I can load the newest PiCore-8.0 with kernel 4.1.20+.tcz. I am using PiCorePlayer as I want to use the audio stuff within to drive my PHat DAC. BTW the DAC works fine with a Pi0 over wifi to play MP3's - unfortunately no good with FLAC - lots of stutter.

Any pointers as to how I may follow your advice?

Regards
Paul
Title: Re: Pi Zero usb LAN adapter
Post by: Paul_123 on October 03, 2016, 11:41:34 AM
Steen

Thanks for your speedy and informative reply.  Unfortunately I have no idea how I can load the newest PiCore-8.0 with kernel 4.1.20+.tcz. I am using PiCorePlayer as I want to use the audio stuff within to drive my PHat DAC. BTW the DAC works fine with a Pi0 over wifi to play MP3's - unfortunately no good with FLAC - lots of stutter.

Any pointers as to how I may follow your advice?

Regards
Paul

Upgrade to piCorePlayer 3.02

http://forums.slimdevices.com/showthread.php?105997-Announce-piCorePlayer-3-00&p=863233&viewfull=1#post863233
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on October 03, 2016, 12:51:48 PM
Thanks to all for your input in resolving my problem.

I am now up and running PCP 3.02 on Pi0. The usb/wired ethernet connect now allows me to play FLAC files from LMS7.9/RPi2B combo. When using wifi on the Pi0 it was impossible to play FLAC files given amount of stutter present.

Thanks again
Paul
Title: Re: Pi Zero usb LAN adapter
Post by: beerstein on October 13, 2016, 01:51:35 PM
hi: Does anyone  know where I can buy one in europe?
One computer store in SoCal sometimes has 5 pieces on stock at one per house hold. Only in store sales - no mail order.
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on October 13, 2016, 05:24:00 PM
These are the places I have purchased Pi zero and associated bits. Seems the deal is you have to buy a kit these days. May be the margins on the Zero are very small.

shop.pimoroni.com/products/raspberry-pi-zero
thepihut.com/products/raspberry-pi-zero

Paul
Title: Re: Pi Zero usb LAN adapter
Post by: R1220 on November 16, 2016, 08:34:39 AM
Hi!
Did you tried with this?
 http://blog.gbaman.info/?p=791  (http://blog.gbaman.info/?p=791)
It works pretty good. But only with the Zero! I've just created an usb0 network, give a static ip to the rpi and just that!  now i'm going to configure a bridge connection so i can share internet trough the laptop to the rpi via usb.
Title: Re: Pi Zero usb LAN adapter
Post by: my sounds on November 16, 2016, 09:06:28 AM
I have used this method to access my zero - it is good. However the problem I had, which is now resolved, was to have the zero access my LAN via a wired ethernet connect not involving anything more than a usb-ethernet dongle ie not using an intervening computer to provide such a link. 

I use my zero as a music player on my home network served by lms7.9 . Indeed I now suspect that my need for the wired connect was because FLAC was overloading the wifi bandwidth. I have now circumvented this difficulty by having the server transcode to mp3 before transmitting. So ironically I now no longer need the a wired connect to my LAN.

As per usual a big thank you to the community for helping me sort this lot.

Paul
Title: Re: Pi Zero usb LAN adapter
Post by: tehfink on August 14, 2017, 09:21:26 PM
Hi Paul,

I use winSCP to copy files to the Raspberry Pi.

1. Copy net-usb-4.1.20-piCore+.tcz to /mnt/mmcblk0p2/tce/optional
2. Add this line "net-usb-4.1.20-piCore+.tcz" to /mnt/mmcblk0p2/tce/onboot.lst

regards
Greg

Hi guys,

What's the correct procedure nowadays to use a USB-ethernet adapter with a pi zero?

There doesn't seem to be a "net-usb-4.9.22-piCore+.tcz" available for piCore 9:
http://distro.ibiblio.org/tinycorelinux/9.x/armv6/tcz/
Title: Re: Pi Zero usb LAN adapter
Post by: Juanito on August 15, 2017, 05:15:32 AM
net-usb-4.9.22-piCore added to piiCore 9.x armv6 repo
Title: Re: Pi Zero usb LAN adapter
Post by: tehfink on August 15, 2017, 11:15:47 AM
net-usb-4.9.22-piCore added to piiCore 9.x armv6 repo

Hi Juanito,

Are you saying that it was added, or that will be added at a later date? Because I can't find it here:
http://distro.ibiblio.org/tinycorelinux/9.x/armv6/tcz/
nor
http://distro.ibiblio.org/tinycorelinux/9.x/armv6/tcz/updates/updatelist.txt
which is where it should be located, yes? (as of this posting)
Title: Re: Pi Zero usb LAN adapter
Post by: Juanito on August 15, 2017, 11:18:35 AM
You should find it at repo.tinycorelinux.net
Title: Re: Pi Zero usb LAN adapter
Post by: Rich on August 15, 2017, 11:19:20 AM
Hi tehfink
It was posted here:
http://tinycorelinux.net/9.x/armv6/tcz/
It just hasn't propagated to the mirror sites yet.
Title: Re: Pi Zero usb LAN adapter
Post by: tehfink on August 15, 2017, 11:51:49 AM
You should find it at repo.tinycorelinux.net

Hi tehfink
It was posted here:
http://tinycorelinux.net/9.x/armv6/tcz/
It just hasn't propagated to the mirror sites yet.

Thanks, guys!

For future reference, to use a USB-ethernet adapter with piCore 9 on a pi zero:
Title: Re: Pi Zero usb LAN adapter
Post by: juliannojungle on October 29, 2019, 06:23:56 PM
Sorry to revive such an old thread, but I'm having this problem today.

I'm just trying to plug my Raspberry Pi Zero using PiCore on USB as a network device, so I can just SSH into it.

I've tried already the last post's procedure (putting "http://repo.tinycorelinux.net/9.x/armv6/tcz/net-usb-4.9.22-piCore.tcz" on "/mnt/mmcblk0p2/tce/optional/" and adding the "net-usb-4.9.22-piCore.tcz" line to the end of the "/mnt/mmcblk0p2/tce/onboot.lst" file.
After reboot, nothing happened.
Tried the regular "Raspbian" procedure as well after the above procedure (add "dtoverlay=dwc2" on "config.txt" and "modules-load=dwc2,g_ether" after "rootwait" on "cmdline.txt" file), but obviously with that the keyboard attached to Pi stops working after reboot (because of gadget mode) and still no network device.

What am I missing? Thank you very much in advance.
Title: Re: Pi Zero usb LAN adapter
Post by: gestein on November 02, 2019, 03:47:23 PM
Hi,

I also tried to get this running, but I had the same problem as juliannojungle.

But I recognized in some other thread, that "net-usb-KERNEL.tcz" has to be loaded and installed.
If I manually try to do "tce-load -i net-usb-KERNEL.tcz" eth0 appears and the module r8152 is loaded.
After a reboot, eth0 is gone again.

So I added the line "net-usb-KERNEL.tcz" in "/mnt/mmcblk0p2/tce/onboot.lst" instead of "net-usb-4.9.22-piCore.tcz".
After a reboot, it works!

Maybe you could try this also.
Best regards
Gerhard
Title: Re: Pi Zero usb LAN adapter
Post by: juliannojungle on November 03, 2019, 08:36:03 AM
I think I did not make myself clear. Sorry for that.
What I meant wasn't to connect an USB network adapter to the Pi, but just plug the Pi on computer's USB and SSH it.

I've tried the "tce-load -i net-usb-KERNEL.tcz" and still didn't get the usb0 on ifconfig.

Tried the following as well: https://gist.github.com/chr15m/84d7f4b0eba45102848a76ac6b47b449
That is:
Code: [Select]
tce-load -wi net-usb-4.9.22-piCore-v7
modprobe cdc_ether
modprobe usbnet
ifconfig -a
ifconfig usb0 up
sudo /sbin/udhcpc -b -i usb0 -x hostname:$HOSTNAME -p /var/run/udhcpc.usb0.pid
but got stuck on "modprobe usbnet", with message: "modprobe: module usbnet not found in modules.dep"

Really have no idea on what to do. :/
Title: Re: Pi Zero usb LAN adapter
Post by: gestein on November 03, 2019, 09:58:52 AM
I see. Completely different story. Sorry.

There is an answer in the thread, that you mentioned:
Quote
For rpi zero use net-usb-4.9.22-piCore from http://repo.tinycorelinux.net/9.x/armv6/tcz/, as it's armv6, not armv7.

Does this help?

Gerhard