Connecting to a Raspberry Pi via USB/TTL-Serial with Ubuntu Linux

One of the nice features of the Raspberry Pi are all the little pins, connecting something, exposing other things, …

Part of these GPIO ports are all ports necessary for a serial interface, although they are only low voltage (±3.3VDC) TTL signals whereas the „proper” serial port runs on ±5VDC. Additionally, there is also a pin where you can actually power the Raspberry Pi with 5V. :D

So why would you need that? Well, if you do not have a TV or spare monitor around (like for example in a Hackspace or Hosting Center), you will need different means to connect to your Pi. Us oldtimers can even remember the times when a serial port was the only way to connect to a machine. So we are going to use „the ancient ways” to connect our state of the art - no serial ports thanks to Mr. Steve Jobs - machines to the Pi.

So you are guessing that all you need on the hardware side is a converter to step the 3.3 Volts up to 5 Volts, and we are good to go, right? Right and wrong. If you want to talk with proper serial hardware like a Psion 5MX, then yes. There are already several converters available.

But if you just want to connect the Pi to a Computer/Laptop you can use a cheap USB to TTL Serial Cable (if you own a Hacklace, you probably already have one). Just connect it to the serial pins of the Raspberry Pi and the USB port of the computer and you can power the Pi via that cable and you get a „new” serial device on the computer which you can use to talk to the Pi. This will look like this:

Raspberry Pi with connected USB to TTL Serial Cable | picture by AdaFruit


On my Ubuntu 12.04 laptop, the connecting/connected device looks like this:

[   12.633361] usbcore: registered new interface driver usbserial
[   12.633374] USB Serial support registered for generic
[   12.633425] usbcore: registered new interface driver usbserial_generic
[   12.633427] usbserial: USB Serial Driver core
[   12.668865] pl2303: Prolific PL2303 USB to serial adaptor driver

m3@Sculley:~$ ls -l /dev/ttyUSB0
crw-rw---- 1 root dialout 188, 0 Mär 1 22:11 /dev/ttyUSB0

Due to the security settings in Ubuntu Linux, a „normal” user is not allowed to access the serial ports directly. Although this in generally a good thing (never trust a user), it is not in your case. I mean, we know what we are doing, right? :D

In order to get us access to /dev/USB0, we have to add the user we are working with to the group „dialout” (yeah, the names are rather ancient). This is accomplished by
sudo adduser [the user you want to add] dialout
id -Gn

If the „id” command does not list „dialout”, you need to log off or reboot the machine for the change to take affect.

Once this is done, all that is left to do in order to connect to the Rapsberry Pi via the serial port, is to start „screen” with the right parameters:
screen /dev/ttyUSB0 115200
Just press once or twice, and you should get your login prompt or can even watch the Pi boot.

From here on, it should be obvious, what you can do. :D

Tagged as: , , , , , , , , | Author:
[Freitag, 20130301, 22:10 | permanent link | 0 Kommentar(e)

Comments are closed for this story.


„Leyrers Online Pamphlet“ ist die persönliche Website von mir, Martin Leyrer. Die hier veröffentlichten Beiträge spiegeln meine Ideen, Interessen, meinen Humor und fallweise auch mein Leben wider.
The postings on this site are my own and do not represent the positions, strategies or opinions of any former, current or future employer of mine.

Me, Elsewhere

Tag Cloud

2007, 2blog, 2do, 2read, a-trust,, a1, accessability, acta, advent, age, ai, amazon, ankündigung, apache, apple, audio, austria, backup, barcamp, basteln, bba, big brother awards, birthday, blog, blogging, book, books, browser, Browser_-_Firefox, bruce sterling, buch, bürgerkarte, cars, cartoon, ccc, cfp, christmas, cloud, coding, collection, command line, commandline, computer, computing, concert, conference, copyright, covid19, css, database, date, datenschutz, debian, delicious, demokratie, design, desktop, deutsch, deutschland, dev, developer, development, devops, digitalks, dilbert, disobay, dna, dns, Doctor Who, documentation, Domino, domino, Douglas Adams, download, downloads, drm, dsk, dvd, e-card, e-government, e-mail, e-voting, E71, education, Ein_Tag_im_Leben, elga, email, encryption, essen, EU, eu, event, events, exchange, Extensions, fail, fedora, feedback, film, firefox, flash, flightexpress, food, foto, fsfe, fun, future, games, gaming, geek, geld, git, gleichberechtigung, google, graz, grüne, grüninnen, hack, hacker, handtuch, handy, hardware, HHGTTG, history, how-to, howto, hp, html, humor, IBM, ibm, ical, iCalendar, image, innovation, intel, internet, internet explorer, iot, iphone, ipod, isp, IT, it, itfails, itfailsAT, itfailsDE, java, javascript, job, jobmarket, journalismus, keyboard, knowledge, konzert, language, laptop, law, lego, lenovo, life, links, linux, Linux, linuxwochen, linuxwochenende, live, living, lol, london, lost+found, Lotus, lotus, Lotus Notes, lotus notes, LotusNotes, lotusnotes, Lotusphere, lotusphere, Lotusphere2006, lotusphere2007, Lotusphere2008, lotusphere2008, lustig, m3_bei_der_Arbeit, mac, mail, marketing, mathematik, media, medien, metalab, Microsoft, microsoft, mITtendrin, mobile, mood, motivation, movie, mp3, multimedia, music, musik, männer, nasa, nerd, netwatcher, network, netzpolitik, news, nokia, notes, Notes, Notes+Domino, office, online, OOXML, open source, openoffice, opensource, orf, orlando, os, outlook, patents, pc, pdf, performance, perl, personal, php, picture, pictures, podcast, politics, politik, pr, press, presse, privacy, privatsphäre, productivity, programming, protest, public speaking, qtalk, quintessenz, quote, quotes, radio, rant, recherche, recht, release, review, rezension, rip, rss, science, search, security, server, settings, sf, shaarli, Show-n-tell thursday, sicherheit, silverlight, smtp, SnTT, social media, software, sony, sound, space, spam, sprache, spö, ssh, ssl, standards, storage, story, stupid, summerspecial, sun, surveillance, sysadmin, talk, talks, technology, The Hitchhikers Guide to the Galaxy, theme, think, thinkpad, thunderbird, tip, tipp, tools, topgear, torrent, towel, Towel Day, TowelDay, travel, truth, tv, twitter, ubuntu, ui, uk, unix, update, usa, usb, vds, video, videoüberwachung, vienna, Vim, vim, vintage, vista, vorratsdatenspeicherung, vortrag, wahl, wcm, web, web 2.0, web2.0, web20, Web20, webdesign, werbung, wien, wiener linien, wikileaks, windows, windows 7, wired, wishlist, wissen, Wissen_ist_Macht, wlan, work, workshops, wow, writing, wtf, wunschzettel, Wunschzettel, www, xbox, xml, xp, zensur, zukunft, zune, österreich, övp, übersetzung, überwachung

AFK Readinglist