WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: SSH into Raspberry Pi Zero W  (Read 2543 times)

Offline fapplin

  • Newbie
  • *
  • Posts: 5
SSH into Raspberry Pi Zero W
« on: April 15, 2019, 03:19:55 PM »
I have Tiny Core Linux 4.19.10-tinycore running on an old HP Pavalion N3350 (500 MHz AMD K6 and 64 MB of RAM). I have a Raspberry Pi Zero W that I configured to use as an Ethernet OTG. I can SSH into it successfully from my Manjaro Linux desktop and I can VNC to it with Tiger VNC (tightvncserver on the rpi0).

I can't seem to SSH or VNC into the rpi0 from my Tiny Core Linux machine. When I do: sudo /sbin/ifconfig - it shows my eth0 and lo. On my Manjaro machine, when I do: ip a - I see my eth0, lo, and usb0.

I was able to easily SSH and VNC from TCL to my Beaglebone Black running Debian 9. Does anyone have a clue why I can't access my RPI0? I simply want to use the old laptop with TCL to VNC into the RPI0.


Offline fapplin

  • Newbie
  • *
  • Posts: 5
Re: SSH into Raspberry Pi Zero W
« Reply #1 on: April 15, 2019, 03:33:06 PM »
I just wanted to add that I had to run this file on mt TCL box to get the Beaglebone working.

mkudevrule.sh
Code: [Select]
cat > /etc/udev/rules.d/73-beaglebone.rules <<EOF
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \
        ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d0", \
        DRIVER=="", RUN+="/sbin/modprobe -b ftdi_sio"

ACTION=="add", SUBSYSTEM=="drivers", \
        ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \
        ATTR{new_id}="0403 a6d0"

ACTION=="add", KERNEL=="ttyUSB*", \
ATTRS{interface}=="BeagleBone", \
        ATTRS{bInterfaceNumber}=="00", \
SYMLINK+="beaglebone-jtag"

ACTION=="add", KERNEL=="ttyUSB*", \
ATTRS{interface}=="BeagleBone", \
        ATTRS{bInterfaceNumber}=="01", \
SYMLINK+="beaglebone-serial"
EOF

sudo udevadm control --reload-rules

Do I need something similar for the RPI0?

Offline fapplin

  • Newbie
  • *
  • Posts: 5
Re: SSH into Raspberry Pi Zero W
« Reply #2 on: April 15, 2019, 05:12:16 PM »
I have Tiny Core Linux 4.19.10-tinycore running on an old HP Pavalion N3350 (500 MHz AMD K6 and 64 MB of RAM). I have a Raspberry Pi Zero W that I configured to use as an Ethernet OTG. I can SSH into it successfully from my Manjaro Linux desktop and I can VNC to it with Tiger VNC (tightvncserver on the rpi0).

I can't seem to SSH or VNC into the rpi0 from my Tiny Core Linux machine. When I do: sudo /sbin/ifconfig - it shows my eth0 and lo. On my Manjaro machine, when I do: ip a - I see my eth0, lo, and usb0.

I was able to easily SSH and VNC from TCL to my Beaglebone Black running Debian 9. Does anyone have a clue why I can't access my RPI0? I simply want to use the old laptop with TCL to VNC into the RPI0.

I just wanted to add that I installed usbutils. So, when I do lsusb, I get:
Code: [Select]
Bus 001 Device 003: ID 0525:a4a2 Netchip Technology, Inc. Linux-USB Ethernet/RNDIS Gadget

So, I know TLC is recognizing the OTG Ethernet gadget part of the RPI0.

I do an IFCONFIG -a: and I see usb0 listed (no IP address).

So, when I try to ssh pi@raspberrypi.local I get the following message:

Code: [Select]
ssh: Could not resolve the hostname raspberrypi.local: Name or service not known

I did install avahi, also, and it was no help.

Offline mocore

  • Hero Member
  • *****
  • Posts: 641
  • ~.~
Re: SSH into Raspberry Pi Zero W
« Reply #3 on: April 16, 2019, 03:40:01 PM »
just guessing tbh ...

perhaps on tlc  needs to be told to start dhcp ?
and or have you setup static network addresses??

Offline fapplin

  • Newbie
  • *
  • Posts: 5
Re: SSH into Raspberry Pi Zero W
« Reply #4 on: April 16, 2019, 05:44:52 PM »
Thanks for the suggestion.

I need to do more looking at what's going on with the Beaglebone Black (BBB). I just used their stock debian image and placed it on an SD card. I plugged it in first to my Manjaro machine to make sure I could SSH into it. Then, I plugged it into TCL and it worked just the same. So, if I can figure out what the BBB is doing I should be able to figure out the Raspberry Pi Zero (RPI0).

Tiny Core certainly is a different animal. I just don't know how much time I want to spend on this. The main goal of this exercise was taking an old laptop with very little RAM and making it useful by being able to VNC to something like a BBB or a RPI0. All of the work is then done on these little SBCs. The BBB requires an ethernet connection to be able to do anything via the web. The RPI0 has builtin WIFI. So, the old laptop could become very portable with the RPI0.   

Offline fapplin

  • Newbie
  • *
  • Posts: 5
Re: SSH into Raspberry Pi Zero W
« Reply #5 on: April 17, 2019, 09:32:58 AM »
I got it working by doing the following:

Set up static IP on Raspberry Pi Zero.

In /etc/network/interfaces

Code: [Select]
allow-hotplug usb0
iface usb0 inet static
   address 192.168.7.2
   netmask 255.255.255.0
   network 192.168.7.0
   broadcast 192.168.7.255
   gateway 192.168.7.1

Note the gateway address because you'll need it on the Tiny Core side.

On Tiny Core side, I installed ssh and tigervnc viewer.

At the command prompt, I ran the command:

Code: [Select]
sudo ifconfig usb0 192.168.7.1

This is the gateway address noted on the Raspberry Pi.

Now, I am ssh'ing and able to VNC!!!!