calleblyh
Posts: 56
Joined: Thu Feb 12, 2015 6:14 pm
Location: Southwest Finland

RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 10:23 am

Hi,

As I have earlier told I bricked my PiZero USB-port. However I can still via serial and Putty connect to it on my LapTop. Also trying to connect a ENC28J60 to get internet to work. There is a small problem, the labelling on the board is different from guides I have found on the web. But I think via trial and error method I will find a solution

Another thing when connecting via serial , is it possible to get the terminal screen on the PiZ HDMI output to update in parallel with my LapTop Putty screen.

An interesting 2017 infront of us

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 10:48 am

The pin layout is the same as every other 40-pin Raspberry. With the front face (where the HDMI & USB connectors are sited towards you) Pin #1 is first on the left with pin #2 behind it.

Image

https://pinout.xyz
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 10:58 am

It's likely the ENC28J60 module whose pinout is in doubt - especially considering the OP has managed to hook up a serial connection without a hitch.

Post a picture of your module.

Dougie's a linux wizard, so I'm pretty sure that if there is a way, he can advise how to get the serial console input appearing on HDMI. Maybe using screen -x, auto started somehow?

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 11:08 am

Image

This is what both of mine look like.

SO == MISO == GPIO10 Pin#19
SI == MOSI == GPIO09 Pin#21
CS == CE1 == GPIO07 Pin#26
CLK == SCLK == GPIO11 Pin#23
INT == INT == GPIO25 Pin#22
VCC == 3V3 == Pin#1 or Pin#17
GND == GND == Pin#6, Pin#9, Pin#14, Pin#20, Pin#25, Pin#30, Pin#34 or Pin#39

I've no idea how to get the serial stuff to mirror on to /dev/tty1. Probably screen -x ... may work.
Last edited by DougieLawson on Tue Jan 03, 2017 6:23 pm, edited 3 times in total.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 12:11 pm

As an alternative to trying to mirror the serial console on HDMI, and when you have your SPI ethernet module working, you might consider using sudo apt-get install synergy to share your laptop keyboard & mouse over the network, thus recovering some functionality lost by way of your dead USB port.

calleblyh
Posts: 56
Joined: Thu Feb 12, 2015 6:14 pm
Location: Southwest Finland

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 4:50 pm

Thanks for all responses. Attached a picture of my ENC28j60, actually the same as I found on Raspi.tv, so the 2*6 header
5V - GND
INT - CLK INT label I am not sure could be LNT ?
SO -WOL WOL ? stands for ?
SCK - ST
RST - CS
Q3 - GND Q3 ? stands for ?
enc28j60 resize 40.jpg
enc28j60 resize 40.jpg (20.62 KiB) Viewed 5511 times
In the meanwhile connecting 5V to ENC I can see flashing Yellow LED on the ethernetconnector when connected to my router. Using 3,3V no flashing. So, should I use 3.3V or 5V

also I think there is a typing error in previous response

SO == MISO == GPIO09 Pin#21 and not SO == MISO == GPIO01 Pin#17 as said in response

User avatar
karrika
Posts: 1052
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 5:41 pm

These pin numbers are so confusing.

CE0 = GPIO 8 = #24
MISO = GPIO 9 = #21
MOSI = GPIO 10 = #19
SCLK = GPIO 11 = #23
INT = GPIO 25 = #22
GND = GND
VCC = 3.3V

At least PiZero works by simply adding one line to /boot/config.txt
dtoverlay = enc28j60

If you want to remote control your desktop with a keyboard and mouse you could have a look at TeamViewer or VNC. They both allow you to run almost anything on PiZero while controlling it from your laptop's keyboard and mouse.

Adafruit also has a RetroPie addition for mapping GPIO pins to keyboard shortcuts. Most console games work well with up/down/left/right and a few fire buttons.

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 5:54 pm

calleblyh wrote:Thanks for all responses. Attached a picture of my ENC28j60, actually the same as I found on Raspi.tv, so the 2*6 header
5V - GND
INT - CLK INT label I am not sure could be LNT ?
SO -WOL WOL ? stands for ?
SCK - ST
RST - CS
Q3 - GND Q3 ? stands for ?
enc28j60 resize 40.jpg
In the meanwhile connecting 5V to ENC I can see flashing Yellow LED on the ethernetconnector when connected to my router. Using 3,3V no flashing. So, should I use 3.3V or 5V

also I think there is a typing error in previous response

SO == MISO == GPIO09 Pin#21 and not SO == MISO == GPIO01 Pin#17 as said in response

Your photo is too fuzzy. Post a full size version on http://imgur.com post the link on here.

WOL == Wake on LAN
INT == interrupt == GPIO25 for the standard driver
I'd guess that ST is actually SI == MOSI

No ideas on Q3.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 6:08 pm

karrika wrote:These pin numbers are so confusing.
If you exclude Dougie's error strewn list it makes sense. But his pictures are OK at least.

User avatar
DougieLawson
Posts: 35381
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Tue Jan 03, 2017 6:20 pm

gregeric wrote:
karrika wrote:These pin numbers are so confusing.
If you exclude Dougie's error strewn list it makes sense. But his pictures are OK at least.
Fixed it.
Note: Having anything remotely humorous in your signature is completely banned on this forum.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

calleblyh
Posts: 56
Joined: Thu Feb 12, 2015 6:14 pm
Location: Southwest Finland

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Wed Jan 04, 2017 12:50 pm

Thanks for all contributions, I finally made it, I got an IP-adress.

This is my interconnection pinout

RPiZero GPIO #--------------------ENC28J60 PinLabel

17----------------------------------------- Q3 3,3v
19------------------------------------------ST
21------------------------------------------SO
22------------------------------------------INT
23------------------------------------------SCK
24------------------------------------------CS
25------------------------------------------GND

How about the mirroring feature screen -x, need to add it into autostart or /boot/config.txt. I couldnot find any help related to mirroring using screen -x

gregeric
Posts: 1509
Joined: Mon Nov 28, 2011 10:08 am

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Wed Jan 04, 2017 1:20 pm

Great job! That "ST" label is probably meant to be "SI".

The screen -x hint was just that, an idea that it might be used to do as you wish. I haven't attempted to do it myself, but essentially you'd start a screen session in your serial console with screen -S myScreen bash. The next bit I'm not certain about how to make work, but I imagine an autostarted bash script, looping while looking for a screen session named myScreen. If it exists, the script runs screen -x myScreen & hopefully that will run in /dev/tty/0, providing a mirrored display of the myScreen serial console session on the HDMI output. I'm pretty sure I could make that work in an auto-started LXTerminal, but not so sure without the desktop running.

My second thought, using synergy to provide keyboard & mouse over network is what I'd use instead (others have suggested vnc etc), but those may only work if you are autostarting the Pixel desktop.

User avatar
karrika
Posts: 1052
Joined: Mon Oct 19, 2015 6:21 am
Location: Finland

Re: RPi Zero, faulty USB-port, ENC28J60 pinout to GPIO pins

Wed Jan 04, 2017 2:33 pm

You could try to first allow x on the PiZero.
xhost +localhost
After that ssh into the PiZero and start a terminal with the display on PiZero.

Code: Select all

DISPLAY=:0.0 lxterminal
I have not tried this...

Return to “Beginners”