RasPi.TV

Raspberry Pi, Electronics & Making
  • Home
  • Site Map
  • Shop
  • Downloads
  • I²C
  • raspberry pi
  • Linux usage
  • Python prog.
  • Input & Output

How to Run Raspberry Pi with No Monitor or Network

 Input and Output, interfacing, Linux usage, Raspberry Pi Hardware  Add comments
Nov 282012
 

I went to the 4th Milton Keynes Raspberry Jam on Sunday. Now the thing with Raspberry Jams, is that you never know whether there’s going to be enough monitors to go round (some don’t have any at all). Last time I got one, this time there were not many laid out. I expect I could have had one if I’d have asked, but there was no need. I was prepared.

I had one of these…

USB to ttl serial interface (with 3V3 logic)

This is a USB to serial adaptor, which enables you to connect your Raspberry Pi serial port Tx (white) and Rx (green) pins to the USB port of another computer and login using the Pi’s serial interface.

It also has red (5V) and black (GND) leads. If the 5V lead is connected to the 5V pin on the RasPi, you can actually power the RasPi through your computer’s USB port – if it’s capable of providing enough output. But if you’re powering the RasPi separately, omit the red lead (but still attach the black one).

How to connect the serial-USB adaptor

A closer look

I bought this one from ModMyPi.com and it arrived very promptly. I’ve made another purchase from them recently that went equally well. :yes:

If the right settings are configured on the Pi, (and they are by default on Raspbian) this means you can get a command line login console directly on your laptop. You will need to install drivers for the USB interface if you’re using windows. You can download those here.

USB-serial login on Raspberry Pi

Since none of my demos for this Jam involved the GUI (Graphical User Interface – Windows-like interface) this was more than sufficient for me.

What’s the catch?

There isn’t one really, but there are a couple of quirks. You need to unplug the USB dongle if you want to start a new session (in Putty, at least. This is a good reason not to power your Pi with it if you’re likely to need to reset the connection.) You do also have to install drivers on your other computer to run the USB-RS232 adaptor – but that’s normal for any device.

Another Gotcha! (If you have a Gertboard)

If you’ve installed the Arduino IDE for Gertboard using Gordon’s script, you’ll need to uncomment the second line below at the bottom of /etc/inittab

#Spawn a getty on Raspberry Pi serial line
#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

sudo nano /etc/inittab

and change…

#T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
to
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

then CTRL+o, Enter, CTRL+x to save and exit. It should look like this…

Edit the last line of /etc/inittab if needed

If you’re running an older version of Debian or Raspbian, you might need to disable the kernel log output on /dev/ttyAMA0 by removing the line “console=ttyAMA0,115200 kgdboc=ttyAMA0,115200” from /boot/cmdline.txt
But if you’re using a linux distribution (distro) newer than July 2012, you probably won’t need to.

How to do the actual serial port login

  • If using Windows, you’ll need to install the drivers You can download those here.
  • You’ll need a client application, like Putty, which can handle a serial login.
  • You’ll need to configure it, but that’s quite simple.
  • You’ll need to make sure your wires are hooked up correctly (as in the photos above).

You can download Putty from here

Configure Putty for a serial connection:

Settings you need to tweak on Putty

  • choose the virtual COM port that your computer allocates to the USB device (Mine is on COM7 in Windows7 and /dev/ttyUSB0 in Ubuntu). You should be able to find this in “Devices and Printers” if you are a Windows user.
  • select serial connection
  • set the speed to 115200
  • save settings (if you want to)

If your wires are hooked up right, it should now just be a question of clicking Open to start a connection.

When you are faced with this screen (minus the yellow text I’ve added)…

Logging into your Pi with Putty through serial port


…just press enter and you should get a login prompt.

You can only use this as a terminal. You can’t view LXDE through it. But if a terminal is what you want, this does the job very nicely indeed. And since you can power your Pi with it too, it makes quite a useful tool for people who do demos at Raspberry Jams and other places.

I hope this is useful for you :-D

 Posted by alex at 8:00 am  Tagged with: log into raspberry pi via serial port, USB to RS232 login to raspberry pi, use raspberry pi with no monitor or network

  25 Responses to “How to Run Raspberry Pi with No Monitor or Network”

  1. Joshi says:
    November 28, 2012 at 9:03 am

    Thank you for this one – very useful indeed !
    I really like your website: lots of useful information.
    Thank you and please keep on !
    Joshi

    Reply
    • alex says:
      November 28, 2012 at 10:00 am

      Thank you Josh. It’s always nice to get a bit of encouragement. :)
      I used this device at the Oxford Raspberry Jam last night as well. Really useful, as I already had too much to carry.

      Reply
  2. Mike says:
    December 5, 2012 at 6:33 pm

    Thanks very much for this clear, concise tutorial. I bought an Adafruit starter kit that came with one of these cables. I had no idea how to use it though. Please do keep up the great work!

    Reply
  3. Quick2Wire Pi Interface Board Beta Review » RasPi.tv says:
    December 7, 2012 at 9:21 am

    […] you are invited to test your 5V FTDI interface if you have one. I have a similar thing I reviewed last week so I tried it. I got Tx and Rx the wrong way round first time (didn’t bother looking up which […]

  4. eddie says:
    September 1, 2013 at 2:39 am

    good job ! this is awesome. will this connection also allow me to use GUI and if not can you help me. thank you, eddie

    Reply
    • alex says:
      September 1, 2013 at 7:37 am

      No. Just command line.

      Reply
  5. rfac says:
    September 27, 2013 at 3:04 pm

    I have a Windows PC and using Putty to for serial communication with Pi.I followed all the steps in this post. I got to this point :
    “When you are faced with this screen (minus the yellow text I’ve added)…:

    Nothing happens when I press “Enter”.
    Any ideas or suggestion on what could be wrong?

    Reply
    • alex says:
      September 27, 2013 at 3:40 pm

      Have you got Tx and Rx wires the right way round? One thing you could try is wire up the pins on the Pi, but without the red one on 5V, plug in the USB, start up Putty.

      Then connect a power supply to the Pi in the normal way.

      You should see messages while it boots. Something like “uncompressing Linux kernel” and then get a login prompt when boot has finished.

      Reply
      • rfac says:
        September 27, 2013 at 4:01 pm

        I have the white wire connected to GPIO 8, Green wire connected to GPI0 10.
        I will give your suggestion a try. Thanks

        Reply
        • alex says:
          September 27, 2013 at 4:05 pm

          wrong hookups Tx is 14, Rx is 15. Where did you get the idea it was 8 & 10?

          Reply
          • rfac says:
            September 27, 2013 at 5:52 pm

            You are correct, I actually meant pin 8 and pin 10. I erred in calling them GPIO 8 and 10.
            I followed your suggestion above on the connection and power sequence. I reversed the connection with white wire connected to pin 8 and green connected to pin 10.
            It now works as described above,
            Thanks very much for your help

            Reply
            • alex says:
              September 27, 2013 at 6:12 pm

              Excellent – glad it works now :)

              Reply
  6. paul says:
    October 2, 2013 at 1:30 am

    Do you have any idea how to configure the usb ports on my linux box to talk to the Pi?

    When I plug the cable from the Pi to my laptop (Slackware 14.0)

    dmesg reports:
    [ 2479.629123] usb 7-1: new low speed USB device using uhci_hcd and address 2
    [ 2479.692100] hub 7-0:1.0: unable to enumerate USB device on port 1
    (These messages are repeated many times with a different port number – up to 127, then starts over)

    ls /dev
    # ls -l /dev/usb*
    crw——- 1 root root 189, 0 Oct 1 16:21 /dev/usbdev1.1
    crw——- 1 root root 189, 128 Oct 1 16:21 /dev/usbdev2.1
    crw——- 1 root root 189, 129 Oct 1 16:21 /dev/usbdev2.2
    crw——- 1 root root 189, 256 Oct 1 16:21 /dev/usbdev3.1
    crw——- 1 root root 189, 384 Oct 1 16:21 /dev/usbdev4.1
    crw——- 1 root root 189, 512 Oct 1 16:21 /dev/usbdev5.1
    crw——- 1 root root 189, 640 Oct 1 16:21 /dev/usbdev6.1
    crw——- 1 root root 189, 768 Oct 1 16:21 /dev/usbdev7.1
    crw——- 1 root root 247, 0 Oct 1 16:21 /dev/usbmon0
    crw——- 1 root root 247, 1 Oct 1 16:21 /dev/usbmon1
    crw——- 1 root root 247, 2 Oct 1 16:21 /dev/usbmon2
    crw——- 1 root root 247, 3 Oct 1 16:21 /dev/usbmon3
    crw——- 1 root root 247, 4 Oct 1 16:21 /dev/usbmon4
    crw——- 1 root root 247, 5 Oct 1 16:21 /dev/usbmon5
    crw——- 1 root root 247, 6 Oct 1 16:21 /dev/usbmon6
    crw——- 1 root root 247, 7 Oct 1 16:21 /dev/usbmon7

    (there is no ttyUSB device)

    lsusb doesn’t show anything.

    I’ve tried telling minicom that the port is /dev/usbdev7.1 and /dev/usbmon7 but nothing happens.

    Thanks!

    Reply
    • alex says:
      October 2, 2013 at 7:03 am

      I recently set one up with Putty on Ubuntu 10.04 Lucid and “it just worked” on /dev/ttyUSB0
      Ubuntu FTW :)

      Sorry. I know nothing about slackware. :( Hopefully someone else could give you some pointers.

      Reply
      • paul says:
        October 2, 2013 at 10:34 am

        Thanks, Alex. Really not a whole lot of differences between the different distros. I lied, I first tried it on Slack 13.37 (which doesn’t handle all USB devices very well). So, I just tried it on Slack 14.0 and Debian. Same results.

        Couple of questions, if I may:

        What does the last few lines of dmesg show after you plug the Pi in?
        When you do a ls /dev after you plug in the Pi, ttyUSB0 is listed?

        And a real dumb one – just want to make sure – I can make the cable by just cutting the end off a USB cable and crimping on the ends that plug into the header, right? The cable you are using doesn’t have any electronics in it?

        Since it “just works” for you, I guess I either have a bad cable or a library not loaded.

        Thanks!

        Reply
        • alex says:
          October 2, 2013 at 10:49 am

          The cable has a level converter in. It’s a proper FTDI USB-UART chip. The USB on a PC runs from 5V and the Pi serial ports are 3v3. It’s not a dumb cable.

          I’ll try and have a look at the other bits later for you when I’m near my Pi and cable.

          Reply
      • paul says:
        October 2, 2013 at 10:36 am

        Oh, and what does lsusb show after the Pi is plugged in?

        Reply
    • paul says:
      October 2, 2013 at 10:57 am

      OK, Just answered my own question “Inside the big USB plug is a USBSerial conversion chip”.

      Got a cable on order. For some reason I thought the signals were compatible…..RTM ….

      Thanks!

      Reply
  7. Rene says:
    October 21, 2013 at 8:58 am

    I´m wondering if I us a Serial LCD display, how can I use TTY-to-USB Cable and also the Serial Display? a Quick question. Thank for the reply !

    Reply
    • alex says:
      October 21, 2013 at 8:20 pm

      If you have a Rev 2 Pi, I think there might be a second serial line on the P5 header. Could that be a solution?

      Reply
  8. Ralph says:
    January 27, 2015 at 10:02 pm

    I have had success using this serial connection iff I don’t use the USB 5V but use the power supply connection. Using the power supply enables the boot up process. Disconnecting the power and using the USB 5V, the pi shows the color gradiant screen but then stops the boot process. Any idea why a B+ wouldn’t boot on a completely USB connection? Thanks,
    RL

    Reply
    • alex says:
      January 27, 2015 at 10:30 pm

      Insufficient power from the USB?

      Although I seem to remember reading somewhere that one isn’t supposed to back power the B+. Although I may be confused about whether that is through the GPIO or USB.

      Reply
      • AndrewS says:
        January 28, 2015 at 2:15 pm

        Insufficient power would be my guess too. A USB device is only ‘allowed’ to draw 500mA from the USB port, so the maximum current coming out of the serial cable will be (500mA – (whatever current the serial converter itself uses)), which obviously isn’t enough to power your B+.

        In terms of backpowering the B+ – the B+ has additional protection circuitry (not found on the Model B) which means it’s impossible to back-power via USB, but you *are* allowed to back-power via the GPIO (it’s in the HAT specs), as long as you don’t also power via the microUSB.

        Reply
  9. Stuart Hertzog says:
    October 10, 2015 at 8:35 am

    For me, the blank screen was a matter of timing. I had the USB power connected to the GPIO 5v, so connecting the serial interface to a USB powered hub (connected to an iMac), immediately booted the Pi to the point at which it hung (something wrong on the RasPi initialization on the SD card). So, then opening a screen session in OS X Terminal showed — nothing! There was nothing happening at that moment, the Pi was hung — but the USB serial setup was working.

    I discovered this by first opening a screen session on the iMac, then plugging in the Pi, either through an external power supply, or by connecting the 5v (red) connector (but not both!). The Terminal screen session (or an alternative, such as CoolTerm) filled with data, to the point at which the Pi hung. And as we were trying to troubleshoot the defective SD setup, we had what we wanted.

    It was all a matter of timing — at least, for me. I hope that helps!

    Reply
  10. Finbar Maginn says:
    October 15, 2016 at 8:59 am

    “When you are faced with this screen (minus the yellow text I’ve added)…”

    when i get to this step i get no response from the Pi, any ideas why this might happen? its a fresh img flash (not NOOBS) and i’ve modified the config file to enable serial connection. checked my wiring numerous times. more specifically im using this usb adapter…

    http://www.waveshare.com/PL2303-USB-UART-Board-type-A.htm

    any help would be appreciated.
    thanks in advance,
    Finbar

    Reply

Leave a Reply Cancel reply

  Pi controlled light and fan from mains power socket   Review of ModMyPi case for the Raspberry Pi
RasPi.TV Site Map - click here

Follow Me

RSS Twitter YouTube

NEW Product

NEW RasPiO® Breadboard Pi Bridge New RasPiO Breadboard Pi Bridge

Pi Ports to Breadboard in Numerical Order

Products Designed by Alex

RasPiO® Night Light - great gift idea! New RasPiO Night Light RasPiO® Analog Zero - Read sensors, make a weather station, thermometer or voltmeter RasPiO Analog Zero

Recent Posts

  • Back up your Garmin activity data on a Raspberry Pi
  • How much power does the Pi4B use? Power Measurements
  • Raspberry Pi 4 launches with BCM2711 quad-core Cortex-A72 64-bit SoC running at 1.5GHz with dual 4K display capability
  • Development of a new product – RasPiO Breadboard Pi Bridge (BBPi)
  • Making a fairly simple bike dashcam with Raspberry Pi – “Live project blog” pt5 Road Testing

Recent Comments

  • Dirk Broer on New Raspberry Pi Family Photo including Pi3A+ plus Zero WH
  • Dirk Broer on New Raspberry Pi Family Photo including Pi3A+ plus Zero WH
  • Peter Capon on Ethernet On Pi Zero – How To Put An Ethernet Port On Your Pi
  • Giles on How to drive a 7 segment display directly on Raspberry Pi in Python
  • Ben on Review of ISO-TECH IDM99III Digital Multimeter
Tweets by @RasPiTV

Categories

  • Electronics
  • Gertboard
  • get_iplayer
  • Input and Output
  • interfacing
  • Laser Cutting
  • Linux usage
  • Mailbag
  • Making
  • Product Launch
  • python programming
  • raspberry pi
  • Raspberry Pi Camera
  • Raspberry Pi Hardware
  • raspberry pihardware
  • RasPiO Duino
  • Review
  • software installation
  • Uncategorized
  • Wemos

Blogroll

  • Makersify
  • Oxford Raspberry Jam
  • Raspberry Pi Foundation
  • Raspberry Pi Spy
  • Raspberry PiPod
  • Robotics and Add-ons
  • See – Adafruit Industries

Archives

  • July 2020
  • June 2019
  • March 2019
  • December 2018
  • July 2018
  • June 2018
  • May 2018
  • March 2018
  • February 2018
  • January 2018
  • November 2017
  • October 2017
  • September 2017
  • July 2017
  • June 2017
  • May 2017
  • March 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
  • January 2015
  • December 2014
  • November 2014
  • October 2014
  • September 2014
  • August 2014
  • July 2014
  • June 2014
  • May 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • November 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • July 2012
  • June 2012

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Stats since June 2012

blog posts: 305
word count: 210,404
© 2012-19 RasPi.TV Site Map | Reviews Policy Suffusion theme by Sayontan Sinha