WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: enc28j60 not working after enabling overlays  (Read 4904 times)

Offline szpsz

  • Newbie
  • *
  • Posts: 7
enc28j60 not working after enabling overlays
« on: June 21, 2018, 08:11:07 AM »
Hi,

I'm trying to run raspberry pi with enc28j60 spi ethernet card. I enabled enc28j60 in overlays, but it is not working. I checked lsmod and couldn't  find enc28j60 module.

According to this http://forum.tinycorelinux.net/index.php?topic=21186.0 and this http://forum.tinycorelinux.net/index.php/topic,18858.0.html thread i should be able to somehow install this module, but o have problem with it.  I cant find matching .tcz.

I know that this internet card runs on raspbian without problems. Is there any way to run it under piCore?

Regards,

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: enc28j60 not working after enabling overlays
« Reply #1 on: June 21, 2018, 02:15:00 PM »
Hi,

I'm trying to run raspberry pi with enc28j60 spi ethernet card. I enabled enc28j60 in overlays, but it is not working. I checked lsmod and couldn't  find enc28j60 module.

According to this http://forum.tinycorelinux.net/index.php?topic=21186.0 and this http://forum.tinycorelinux.net/index.php/topic,18858.0.html thread i should be able to somehow install this module, but o have problem with it.  I cant find matching .tcz.

I know that this internet card runs on raspbian without problems. Is there any way to run it under piCore?

Regards,

If you are reporting an issue and looking for help, at least you must specify which version of piCore you are talking about and which architecture. Such "this shit doesn't work" type post is just a spam wasting time of all readers. Sorry to be rude but it is the fact.

 >:(

Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 711
Re: enc28j60 not working after enabling overlays
« Reply #2 on: June 21, 2018, 03:16:00 PM »
You can build your own tinycore extension (.tcz) with the driver/module.

If you download the appropriate file for the driver/module for your raspberry pi, you can do it like my old thread like this..if you running ver 9 of picore..like Bela says you have to add more information to the question.

For arm6.
Download http://tinycorelinux.net/9.x/armv6/releases/RPi/src/kernel/4.9.22-piCore_modules.tar.xz

And you have the file in this path
4.9.22-piCore_modules/lib/modules/4.9.22-piCore/kernel/drivers/net/ethernet/microchip/enc28j60.ko

For arm7.
Download http://tinycorelinux.net/9.x/armv7/releases/RPi/src/kernel/4.9.22-piCore-v7_modules.tar.xz

And you have the file in this path
4.9.22-piCore-v7_modules/lib/modules/4.9.22-piCore-v7/kernel/drivers/net/ethernet/microchip/enc28j60.ko

My old thread:

http://forum.tinycorelinux.net/index.php/topic,18858.msg129216.html#msg129216

Here some old thread how to add touchscreen driver.
http://forum.tinycorelinux.net/index.php/topic,20692.msg129171.html#msg129171
« Last Edit: June 21, 2018, 03:31:51 PM by patrikg »

Offline szpsz

  • Newbie
  • *
  • Posts: 7
Re: enc28j60 not working after enabling overlays
« Reply #3 on: June 21, 2018, 07:29:14 PM »
Sorry for not mentioning version. I'am using piCore 9.0.3. Now I'am trying to make it running on raspberry pi B (REV 1 B with 26 GPIO), but finally I want to use enc28j60 with raspberry pi zero.

Patrikg thanks for Your response, I will check it soon and  write back if I mange to make it running.

Regards,

Offline szpsz

  • Newbie
  • *
  • Posts: 7
Re: enc28j60 not working after enabling overlays
« Reply #4 on: July 02, 2018, 05:56:25 AM »
Hi,

Patrikg I checked Your solution from this thread http://forum.tinycorelinux.net/index.php/topic,20692.msg129171.html#msg129171 but still without success.

First I tried to copy enc28j60.ko module file and load it with insmod command. After this I have enc28j60 listed on lsmod output but ifconfig show only eth0 and loopback interface. Of course after rebooting raspberry module was unloaded from kernel.

Then I try to make .tcz package myself. I follow Your instructions but after rebooting raspberry the enc28j60 module is not listed on lsmod output. When I tried to load module manually (tce-load -i /etc/sysconfig/tcedir/optional/enc28j60.tcz) I've got error: 'enc28j60 is already installed!'

Do i forget about something? Your guide of creating package is really simple, I don't think I made a mistake following it.

Regards,

Offline TimJ

  • Jr. Member
  • **
  • Posts: 57
Re: enc28j60 not working after enabling overlays
« Reply #5 on: July 02, 2018, 01:49:49 PM »
Your tcz should have installed the module here
Code: [Select]
/usr/local/lib/lib/modules/4.9.22-piCore-v7/kernel/drivers/net/ethernet/microchip/enc28j60.kothe 4.9.22-piCore-v7 may be different on an old Pi
check that it is there
if it is try
Code: [Select]
sudo modprobe enc28j60
lsmod
ifconfig -a
if it is not there see if it is anywhere
Code: [Select]
cd /
sudo find . -name enc28j60.ko
and correct your tcz

Offline szpsz

  • Newbie
  • *
  • Posts: 7
Re: enc28j60 not working after enabling overlays
« Reply #6 on: July 03, 2018, 06:18:26 AM »
Path was wrong I corrected it. Now module is in
Code: [Select]
/usr/local/lib/lib/modules/4.9.22-piCore/kernel/drivers/net/ethernet/microchip/enc28j60.ko
When I tried to load module manually using
Code: [Select]
sudo modprobe enc28j60I've got en error:
Code: [Select]
modprobe: can't load module enc28j60 (kernel.tclocal/drivers/net/ethernet/microchip/enc28j60.ko): invalid module format
I used module from:
Code: [Select]
http://tinycorelinux.net/9.x/armv6/releases/RPi/src/kernel/4.9.22-piCore_modules.tar.xz
Any ideas what is wrong now?

Regards,

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: enc28j60 not working after enabling overlays
« Reply #7 on: July 03, 2018, 11:16:03 AM »
Path was wrong I corrected it. Now module is in
Code: [Select]
/usr/local/lib/lib/modules/4.9.22-piCore/kernel/drivers/net/ethernet/microchip/enc28j60.ko

Wrong path, look for .../lib/lib/...
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline szpsz

  • Newbie
  • *
  • Posts: 7
Re: enc28j60 not working after enabling overlays
« Reply #8 on: July 04, 2018, 05:59:44 AM »
Sorry it was just copy-paste error. Actually path is correct:
Code: [Select]
/usr/local/lib/modules/4.9.22-piCore/kernel/drivers/net/ethernet/microchip/enc28j60.ko
For me the error says that it is something wrong with file enc28j60.ko file but it is rather improbable?

Offline szpsz

  • Newbie
  • *
  • Posts: 7
Re: enc28j60 not working after enabling overlays
« Reply #9 on: July 10, 2018, 12:30:21 PM »
Hi,

I still can't get ethernet card to work with raspberryPi under piCore 9.0.3. I tried to work with cheap USB card QinHeng CH9200  but without success. I tried to find any topic where somebody was able to run ethernet card with piCore but failed in that either.

I can only find topics like this where OP didn't write about success or fail:
Code: [Select]
http://forum.tinycorelinux.net/index.php?topic=21186.0
http://forum.tinycorelinux.net/index.php?topic=20574.0

It would be very useful to have raspberryPi zero with piCore (for its stability) to us as smart home system or other sensor platform, but without ethernet is not possible.

When I'am using usb ethernet adapter lsusb looks quite promising, but there is still no change in interfaces -a.

Code: [Select]
[362183.827279] usb 1-1.2: USB disconnect, device number 4
[363434.172344] usb 1-1.2: new full-speed USB device number 5 using dwc_otg
[363434.306668] usb 1-1.2: New USB device found, idVendor=1a86, idProduct=e092
[363434.306691] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[363434.306700] usb 1-1.2: Product: CH9200 USB Ethernet Adapter
[363434.306710] usb 1-1.2: Manufacturer: Nanjing QinHeng Electronics Co.͊Nanj


I will be very graceful for any suggestions.

Regards,



Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: enc28j60 not working after enabling overlays
« Reply #10 on: July 10, 2018, 01:40:24 PM »
I've used several USB ethernet cards.

Do you have net-usb-KERNEL.tcz loaded


Offline szpsz

  • Newbie
  • *
  • Posts: 7
Re: enc28j60 not working after enabling overlays
« Reply #11 on: July 12, 2018, 06:09:41 AM »
Hi,

Yes I've got net-usb-KERNEL.tcz installed. What cards have You used? I don't know if there is something wrong with driver or something else (fg. interfaces configuration?) If I can check this with card which is proven to work with Pi zero it would be easier to find what causes the error.

I check carefully dmesg and find probable cause of failure with en28j60. I will probably try to compile module and install from sources.

Code: [Select]
[   13.867948] enc28j60: disagrees about version of symbol module_layout
[   13.868701] enc28j60: disagrees about version of symbol module_layout



Regards,

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1243
Re: enc28j60 not working after enabling overlays
« Reply #12 on: July 12, 2018, 12:41:47 PM »
The enc28j60 is not a USB based product.

This is a USB device that works on a piZero.   https://www.adafruit.com/product/2992