Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

SPI Ethernet on raspberry or BPI-M2 on the GPIO

Featured Replies

Hi all,

 

I bought this ethernet:

 

 28j60_module.jpg

 

The idea is connect to the SPI, but not sure what pines i must to connect...

 

i follow this: Raspi.tv

 

So i connect the pines, exactly like there say, but he connect on the UART not in the SPI :S (have  2 pines more, but the pines that he conenct i have in my ethernet board)

ethernet-board-wiring_700.jpg

 

 

So i connect to the gpio of my board and well turn on! yeah! xD:

thump_9508146ethernet2.jpg

 

If i fo ifconfig i see this:

root@bananapim2:~# ifconfig
bond0     Link encap:Ethernet  HWaddr 7e:99:6b:7c:04:39
          UP BROADCAST MASTER MULTICAST  MTU:1500  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:1000
          RX bytes:0 (0.0   TX bytes:0 (0.0 

eth0      Link encap:Ethernet  HWaddr 02:44:07:0d:76:33
          inet addr:192.168.1.44  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::44:7ff:fe0d:7633/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:937 errors:0 dropped:0 overruns:0 frame:0
          TX packets:459 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:758921 (741.1 KiB)  TX bytes:86608 (84.5 KiB)
          Interrupt:44

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:31817 (31.0 KiB)  TX bytes:31817 (31.0 KiB)

wlan1     Link encap:Ethernet  HWaddr 98:3b:16:c8:56:6e
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:42 errors:0 dropped:42 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:12820 (12.5 KiB)  TX bytes:0 (0.0 
  1. I should supposed is the bond0 the interface?? ot should be the an eth1?
  2. Can i connect this to the SPI?
  3. Its enabled SPI on armbian by defaultt?
  4. Where is the file that i must change for work with GPIO on Armbian? its /boot/config-4.3.3-sunxi? there are a lot of lines that have SPI options, to many with "=m" and others comments :S

 

I try edit /etc/networks/interfaces and put auto bon0, but not get any IP address, i haven't got any idea about wtf means bond0...

Luckily your first image name contains "28j60", so we can say that it's an enc28j60 module.

Linux driver for this is in \drivers\net\ethernet\microchip\enc28j60.c, and required kernel option is CONFIG_ENC28J60,

Unfortunately it's not enabled by default in Armbian kernel.

 

For compiling your own kernel please read the documentation here or wait for a new kernel release (I'll enable this module if I don't forget).

/boot/config-4.3.3-sunxi?

 

Please keep two things in mind:

  • Banana Pi M2 is no Raspberry Pi. On Raspberry Pi /boot/config.txt has a special meaning, with Armbian a file called /boot/config-4.3.3-sunxi is something completely different! (important to note when you rely on tutorials written for RPi)
  • The Ethernet module you try to use is both slow as hell and power hungry. I would check whether it's ok to draw 160mA from the 3.3V pin

Any USB-to-Ethernet adapter is a better choice when you have a free USB port.

  • Author

Please keep two things in mind:

  • Banana Pi M2 is no Raspberry Pi. On Raspberry Pi /boot/config.txt has a special meaning, with Armbian a file called /boot/config-4.3.3-sunxi is something completely different! (important to note when you rely on tutorials written for RPi)
  • The Ethernet module you try to use is both slow as hell and power hungry. I would check whether it's ok to draw 160mA from the 3.3V pin

Any USB-to-Ethernet adapter is a better choice when you have a free USB port.

 

Yeah i know, but i biught this because its cheap for testing, i wanna buy an Ethernet 10/100/1000 to connect to the SPI, i dont wanan connect in the usb...

 

Luckily your first image name contains "28j60", so we can say that it's an enc28j60 module.

Linux driver for this is in \drivers\net\ethernet\microchip\enc28j60.c, and required kernel option is CONFIG_ENC28J60,

Unfortunately it's not enabled by default in Armbian kernel.

 

For compiling your own kernel please read the documentation here or wait for a new kernel release (I'll enable this module if I don't forget).

 

 
Thanks, I will try this week, anyway, when this new kernel release will come??
  • Author

This will be most likely the slowest GbE implementation in the world. Have you checked the state of drivers already? http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/229951.html

 

Wow... is a sith... i will open  a new topic because i start to have a lot of problems trying to adding new hardware to the arm boards, thanks for the info

 

Update: Here my new post: http://forum.armbian.com/index.php/topic/663-hardware-question-gpio-spi-uart-wireless-ethernet/

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.