Using the Raspberry Pi without a monitor/keyboard: possible?


11 posts
by mpalomer » Wed Jan 02, 2013 10:19 am
I posted a thread similar to this a few days ago, but after researching the few suggestions from that thread I still don't have a definite answer of how to approach this. So here I go again...

What would be the best way for me to be able to SSH into the Raspberry Pi from my PC? I want to be able to use the Pi without getting a separate monitor/keyboard for it. Initially I thought of connecting through Bluetooth (with the use of some adapters) or the USB ports on my PC and the Pi, but I couldn't find any surefire way of doing this that would work (unless someone can direct me to a guide on using usbnet with the Raspberry Pi with a Windows PC).

Next I thought of the more obvious approach of connecting my PC and the Pi through the ethernet ports with a crossover cable, though I've never done this so I'm not sure about how to do this either. Would I be able to SSH into the Pi right after powering up and booting from the SD card, that is, without doing anything that would require direct use input to the Pi? Also, would connecting to the Pi from my PC interrupt its connection to the internet?

Another method I've seen some guides for is connecting it to the local network and accessing it through that, but I'd rather not do this because my router and modem live in a different room, tucked away into a hard to reach corner (not my decision, so I can't really do anything about it) and I'd hate to have to go there and back constantly if I'm doing something that involves connecting things to the ports. Plus I wouldn't be able to admire the delicious looking case I'm buying for it, hehe.
Posts: 26
Joined: Mon Dec 31, 2012 5:26 am
by chris57100 » Wed Jan 02, 2013 10:29 am
Hi,

On my side i used a wireless keyboard with it's own dongle. So i plug it in the USB port and it's done. Nothing to configure.
But i wanted to create a home server so i do not need keyboard anymore and plug it on my router/modem.
What's the problem if you plug it on the router ? (except not seeing the case ;-) ) If your router has DHCP enabled and can reach the modem then you should be able to SSH to the pi and access the internet i guess.

About connecting the Pi on the ethernet port of the PC, then you have to configure a DHCP server on the PC. I have a Mac and i was not able to do that (it seems i should have a Mac Server to have the service enabled). Most Pi distro have the DHCP client activated and a SSH service installed (sshd or dropbear or another one)

Else i don't see any other way to access it ...
Raspberry Pi Home Server : http://www.pihomeserver.fr
Software tutorials : Samba, Airplay, CUPS, Time machine, MPD+Rompr, Nginx, Owncloud, rTorrent, Wordpress, Joomla, Subsonic, VNC, etc.
Electronic tutorials : Mobile Data Recorder, LCD screen, Weather station, etc.
Posts: 419
Joined: Wed Sep 12, 2012 7:23 pm
Location: Thionville
by repton » Wed Jan 02, 2013 12:33 pm
The simplest way is to get the Pi on your home/office LAN and then you can simply ssh onto it from your PC (assuming your PC is also on the LAN).

If there is no easy way to get a wired connection to the Pi, then get a WLAN card for it (assuming you have a wireless LAN in your home/office).

Ideally you'll want to configure the Pi with a static IP (rather than using DHCP) so when you want to ssh to it from your PC you know what IP it is on. If you need an ssh client for Windows I would recommend putty.

I have exactly this setup here at home with a Pi connected via WLAN in a barn where it is quite inaccessible (you need a stepladder to reach the box it is in) and it is working a treat connected to a 1-Wire network recording temperatures for me.

HTH,
Paul
UK Supplier of 1-Wire components, kits and modules:
http://www.sheepwalkelectronics.co.uk/
Posts: 84
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
by bgirardot » Wed Jan 02, 2013 5:03 pm
By far the easiest is going to be getting a small wifi usb dongle. Edimax ew-7811un is a popular one for the rpi for about 10 bucks. works out of the box on the RPi.
Posts: 517
Joined: Wed Oct 10, 2012 6:20 am
Location: Switzerland
by aTao » Wed Jan 02, 2013 5:15 pm
Put a network hub in your room http://www.ebuyer.com/351558-d-link-des-1005d-5-port-10-100mbps-desktop-switch-des-1005d-b for example.
Then you can have lots of Pi.
>)))'><'(((<
User avatar
Posts: 429
Joined: Wed Dec 12, 2012 10:41 am
Location: Swine Town UK
by efflandt » Thu Jan 03, 2013 3:35 am
But, how would the OP configure a WiFi USB dongle from the network before it is configured, or without a Linux PC that could access the ext4 partition on the SD card to configure it?

I already had one of the following for network connecting a BluRay player, or when installing Linux on PC's without having to configure WiFi (my DSL wireless/router/modem is in basement with no wiring to other floors). The device can be powered from a USB port on a PC, but for the Pi needs the AC power supply also included. Once you configure the device with a PC for your wireless security settings you simply connect an ethernet cable to it and automatically get an IP from your wireless router.

http://www.netgear.com/home/products/ho ... 2001.aspx#

You may need to check your router logs to see what IP it was assigned initially. But once you have access to it, after you run sudo raspi-config, do
Code: Select all
sudo apt-get update && sudo apt-get install avahi-daemon

Then if you also have avahi on a Linux PC (installed by default in Ubuntu), or Apple zeroconfig, or Bonjour in Windows, you can find your Pi by its hostname.local. For example in my ~/.ssh/config in Ubuntu:
Code: Select all
Host rpi
HostName raspberrypi.local
User efflandt

Host raspbmc
HostName raspbmc.local
User pi
ForwardX11 no

So I can simply ssh rpi (as myself) or ssh raspbmc (as user pi) to connect to them even if they get a different dynamic IP.
Posts: 359
Joined: Mon Dec 03, 2012 2:47 am
Location: Elgin, IL USA
by mpalomer » Thu Jan 03, 2013 5:36 am
efflandt wrote:But, how would the OP configure a WiFi USB dongle from the network before it is configured, or without a Linux PC that could access the ext4 partition on the SD card to configure it?


I may just get a WiFi dongle, mainly because that thing you linked to is kind of pricey in comparison... I keep an Ubuntu live CD around, so I could maybe use that to get to the files on the SD card, though I don't know exactly what I'd do to change to configure it to connect to my network on boot (I'm kind of a Linux noob :oops: ). But I think I can figure it out with enough research.

What WiFi adapter is "most compatible", i.e. will have the simplest setup? I'm also looking for one that will work connected straight to the Pi, without a powered hub.
Posts: 26
Joined: Mon Dec 31, 2012 5:26 am
by repton » Thu Jan 03, 2013 8:35 am
efflandt wrote:But, how would the OP configure a WiFi USB dongle from the network before it is configured, or without a Linux PC that could access the ext4 partition on the SD card to configure it?


If you want to configure the whole thing completely from scratch without a keyboard and monitor then you need something to let you interface to the serial console in the GPIO header (P1). For example one of these: http://www.ebay.co.uk/itm/251196567870 (I have no connection to that seller, but I have bought one of those and it does work well).

Alternatively you can plug a USB hub in and then temporarily use a keyboard and mouse at the same time as the WLAN adapter to configure it up.

Paul
UK Supplier of 1-Wire components, kits and modules:
http://www.sheepwalkelectronics.co.uk/
Posts: 84
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
by repton » Thu Jan 03, 2013 8:41 am
mpalomer wrote:What WiFi adapter is "most compatible", i.e. will have the simplest setup? I'm also looking for one that will work connected straight to the Pi, without a powered hub.


I don't know if it's necessarily "most compatible" but I have bought one of these: http://www.ebay.co.uk/itm/370569077102 and found it to work pretty much plug-and-play. All I did was put the following in /etc/network/interfaces:

Code: Select all
auto wlan0
iface wlan0 inet static
        address 192.168.0.21
        netmask 255.255.255.0
        gateway 192.168.0.1
        wpa-essid insert-your-essid-here
        wpa-psk insert-your-wpa-psk-here


If you're using DHCP on your network you can miss out the address/netmask/gateway lines and change "static" to "dhcp", giving something like this:

Code: Select all
auto wlan0
iface wlan0 inet dhcp
        wpa-essid insert-your-essid-here
        wpa-psk insert-your-wpa-psk-here


I didn't need to do anything else I don't think, the kernel recognised the adapter and loaded the module for me.

HTH,
Paul
UK Supplier of 1-Wire components, kits and modules:
http://www.sheepwalkelectronics.co.uk/
Posts: 84
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.
by mpalomer » Thu Jan 03, 2013 11:05 am
repton wrote:If you want to configure the whole thing completely from scratch without a keyboard and monitor then you need something to let you interface to the serial console in the GPIO header (P1). For example one of these: http://www.ebay.co.uk/itm/251196567870 (I have no connection to that seller, but I have bought one of those and it does work well).


I think this is just what I was looking for... Do you use Windows, and if so, what terminal emulator do you use? I'm looking at a tutorial for using this, but the terminal emulator they recommend is ZOC, which costs like $79 (I know there's a free trial, but I want something I can use in the long term).
Posts: 26
Joined: Mon Dec 31, 2012 5:26 am
by repton » Thu Jan 03, 2013 12:02 pm
mpalomer wrote:I think this is just what I was looking for... Do you use Windows, and if so, what terminal emulator do you use? I'm looking at a tutorial for using this, but the terminal emulator they recommend is ZOC, which costs like $79 (I know there's a free trial, but I want something I can use in the long term).


I use that cable with putty, which doubles up as an ssh client and serial terminal emulator. It is free.

You can find it here: http://www.chiark.greenend.org.uk/~sgtatham/putty/

Paul.
UK Supplier of 1-Wire components, kits and modules:
http://www.sheepwalkelectronics.co.uk/
Posts: 84
Joined: Sat Mar 17, 2012 6:06 pm
Location: North Yorkshire, UK.