xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 12:15 am

@liz: Ok then I guess it\'d be fruitless to request adding uart pins on all raspi boards -- we can wait though, since we\'re already planning on getting our boards after bulk purchasing is open to minimize shipping fee, which is going to be around January or February anyway.
@asb: My main concern is the compatibility of sd cards we have; there\'s a lot of discussion going on in the forum about sd card issues and we\'re afraid our high-speed card won\'t work.

tumblebomb
Posts: 50
Joined: Sun Nov 27, 2011 4:56 pm

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 12:18 am

An interesting use for it and one that seems quite tempting now. I\'ve not played with ssh or serial connections much but even if its installed as standard, surely the distro will need users (root etc..) setup first before it allows anyone to dial in? which leads to believe you will need some kind of display connected initially.
if this is rubbish please ignore my ignorance. Having done plenty of electronics for projects and such like getting your uart adaptor made and or tested, really may be best once you know your pi is working. with plenty of things to go wrong troubleshooting would be like fumbling in the dark with no screen and no way to check the Pi. unless you have someone who is good at analysing circuits. good luck.
p.s. if your school really won\'t allow you a screen to use, get enough people and start organised protest. failing that getting parents, teachers, school board/governors onboard should be possible. surely a IT lab has something that could be used? tell them stopping you will hinder your education and development.

tumblebomb
Posts: 50
Joined: Sun Nov 27, 2011 4:56 pm

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 12:20 am

i know we would all prefer to have everything ready to go for when they arrive but is this maybe not a case for yourselves where it would be better to wait until they have been out for a while? to not waste money on adaptors until you know it will work.

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 12:34 am

@tumblebomb: I haven\'t played with a lot of embedded boards yet; but the tutorials for beagleboard and pandaboard both recommend connecting to the board through serial at first use, so I suppose serial/uart works without much user setup. And we\'re not occupying school building :D
I know I probably shouldn\'t have bought the accessories before the design had finalized, and I wouldn\'t if the board came out before black friday :)

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 1:06 am

I have been researching on the proper pcb headers to go with raspi. As I only want uart what I really need are just 4 pins, i.e. 3V3, GND, TXD and RXD. However 3V3 is on the bottom row which really makes things difficult, and now I have to buy 2x8 headers. The problem is that sellers either ask for a ridiculous price ($20) or require buying in 5k. Oh god, this is getting ugly. I\'m in US. any suggestions? (Or maybe raspi can come with the proper headers in the box?)

hstubbs3
Posts: 31
Joined: Fri Nov 18, 2011 7:11 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 7:49 am

$20 for the headers?? What about Radio Shack? Local electronics supply?

Try asking that engineering or physics department.. They may be practically swimming in parts...

shiftyphil
Posts: 21
Joined: Thu Nov 17, 2011 12:32 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 10:09 am

$20? Are you sure you don\'t mean 20c, because that\'s what they cost here in Australia.

User avatar
Burngate
Posts: 6100
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 10:54 am

Here in Britain I use Maplin, or CPC, part of Premier Farnell. They\'re good for small quantities at reasonable prices, and keep sending me fliers about their bargain offers.
In the US there\'s http://www.newark.com/, also part of Premier Farnell. I\'ve just tried looking for headers, but got bored looking through their site.
If you\'re going to ask your physics teacher to help with the soldering, why not involve him at an earlier stage - he may already have access to the parts. Just make sure you\'ve done some research first. If I were him, I\'d be more willing to help if I knew you were wanting to do it yourself rather than just conning me into doing it for you!
One option is to solder all 26 pins into the board, but then you\'ll need a way of connecting to just the three you need. Unless you\'re thinking of using the rest later, I\'d just wire directly to the board. After all, you can always desolder the wires and put in a proper header later.

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 2:53 pm

Yes, I mean $20... some websites charge $20 for shipping and handling. I saw newark offer 2x5way pcb headers for $0.06 each, but you have to buy over $100 to get free shipping and the website says a $20 handling fee applies. Radioshark doesn\'t seem to offer pcb headers at all. I did find a ebay listing of a 2x40way for $0.9 http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 250wt_1041. Actually I don\'t think such a tiny piece of metal and plastic is worth even $0.001. I\'ll talk to my physics teacher to see if he has such headers.

tumblebomb
Posts: 50
Joined: Sun Nov 27, 2011 4:56 pm

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 3:38 pm

@xkxx I was making up a lot of cables before for the PC etc.. I\'m sure I\'ve got a bunch of pins and connectors going spare. I\'d happily send some over to you or pre make some cables if you want?

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 4:05 pm

@tumblebomb: wow thank you very much for your kindness. What we need (as well as people who want to solder gpio pins onto raspi boards) is bare pcb headers like this: http://cgi.ebay.com/ws/eBayISAPI.dll?Vi ... 250wt_1041. We might actually have them in the school but I have to wait till Monday to ask my teacher.

tumblebomb
Posts: 50
Joined: Sun Nov 27, 2011 4:56 pm

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 4:13 pm

great i\'ll try and dig some out. Just PM me if you do need .

hippy
Posts: 6281
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 5:25 pm

[quote]Quote from xkxx on December 11, 2011, 01:06
I have been researching on the proper pcb headers to go with raspi. As I only want uart what I really need are just 4 pins, i.e. 3V3, GND, TXD and RXD. However 3V3 is on the bottom row which really makes things difficult, and now I have to buy 2x8 headers. [/quote]

Having 3V3 on a separate row to TXD, RXD and GND (0V) is a tad inconvenient but in most cases you won\'t need 3V3 from the R-Pi to use a USB-to-UART cable or module and you would only need a 3-pin header if you wanted access to the UART but not the other GPIO pins.

You could also generate 3V3 with a LDO regulator from the 5V which is on the same row if you really do need 3V3 and that would only require a 5-pin header.

If you have the USB-to-UART module previously pointed to on ebay; the 5V and 3V3 are outputs from that module and you don\'t want to connect them to the 5V and 3V3 of the R-Pi.

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Sun Dec 11, 2011 7:19 pm

@hippy: thanks I didn\'t know that, you mean I only need to connect to TXD, RXD and GND headers? If so, is there a way to directly connect the 3 pcb holes on raspi to the pins on the USB-to-UART module? That can save me the headers and all the headaches of soldering.

Edit: I think what I need is something with a pin and a clip that I can attach to a hole on raspi board, so that I can connect the pin to the \"duppont cable\" that came with the uart module.

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Mon Dec 12, 2011 5:49 pm

...No answers? Is there something that has one end able to attach to a pcb hole and the other end a standard pin that can connect to a dupont cable? This thing can save up some pcb headers and soldering.

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: UART for using Raspi without a screen

Mon Dec 12, 2011 8:51 pm

The short answer is that yes, there is a thing that can attach to a pcb hole and provide a standard pin - it\'s called a pcb header...

There\'s nothing I know of that you can attach temporarily, or that I would personally trust, apart from a standard header pin (or a wire soldered direct to the board, but that\'s rather more, shall we say, permanent)

I don\'t live anywhere near anywhere I can buy stuff like headers over the counter, or I would pick some up and mail them to you with pleasure. I\'m sure there\'s a kind soul somewhere here who would do so, even if they end up charging you the correct postage, rather than a stock $20 fee. You may be better off going down to radio cack or similar and picking some up yourself. You only need a 3 pin connector per board

I\'ll have a chat with the sparkies at work tomorrow, though - they may have some lying about.

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 12:25 am

@tufty: Thanks for your info.

I think we have gathered some useful points for using raspi without a monitor. I\'ll put a summary here:
1. You can either use SSH through ethernet wire or serial through UART to connect to raspi from your computer. SSH is faster, fast enough to do x forwarding, provided that SSH host support is included in the system and it boots successfully. And, you know, you don\'t want to do \'ifconfig eth0 down\' in a ssh session. Low-level UART is a safer choice, which should always work even if your system image fails to boot.
2. You need a regular ethernet wire for SSH or an UART-to-USB adapter for UART connections, like this one: http://www.ebay.com/itm/150710735528. And since raspi won\'t ship with header fitted, you need to solder a 3-pin pcb header http://www.ebay.com/sch/i.html?_nkw=header+pins on the board to make it work. Ask a teacher at school for assistance for soldering and persuade him/her to buy the pcb headers for you and for science. The three pins are GND, TXD and RXD, as shown in the wiki: http://elinux.org/RaspberryPiBoard#Prod ... PIO_Header. There\'s no cheap and reliable alternatives to pcb headers, though you can theoretically use glue (well... don\'t do it).
3. For SSH or UART under windows, putty can handle it all, but you can also use hyperterm for UART. Under Linux, use openssh/dropbear for SSH and minicom/screen for UART/serial.

Credit: Chris-Tyler, gbiohazard, tufty, hippy, Johannes, contributors of the raspi wiki

Anything I missed/got wrong? Can someone post this on the wiki?

Bakul Shah
Posts: 321
Joined: Sun Sep 25, 2011 1:25 am

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 3:50 am

Look for \"pin headers\" and you will get more hits. Jameco has a 2x40 for $1.09 and various other sizes or right angle ones. You can cut longer ones into right 2xn size if you want, with a bit of care. Radioshack, Frys, Amazon, ... lots of other sources (though I don\'t know if Radioshack carries electronics parts as much as they used to).

Chris Tyler
Posts: 70
Joined: Thu Jul 28, 2011 12:16 pm
Contact: Website

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 4:26 am

[quote]3. For SSH, you can use putty for windows or openssh/dropbear for Linux. For serial/UART use minicom for Linux. The UART adapter should have driver built-in for windows so no need for additional software here.[/quote]

Both Linux and Windows should include the USB UART drivers. Minicom is a terminal program for Linux; under Windows you\'d need something similar, such as Hyperterminal (hyperterm). These terminal programs pass your keystrokes to the serial port and displays data coming in from the serial port on the screen (they do a lot more, but everything else is gravy).

There are some other things you can do to alleviate the need for a serial console -- for example, you can log your boot messages to the SD card, so that if an error occurs during system start-up, you can remove the SD card and read it with a laptop to see the boot messages (including errors).

gbiohazard
Posts: 1
Joined: Sun Dec 11, 2011 9:17 pm

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 4:15 pm

Hi!

I\'ve been working with serial com and recovered several routers - WRT54GL - from bad firmware flash using this method. I used USB UART adapter based on the CP2102 chip that you can find on eBay for a very low price. Putty is a great program that can handle, in last releases, SSH, serial, telnet... so no need for anything else!

IMHO, if you\'re going to use the UART pins just to enable the SSH access, you can go without soldering any header. Ok it won\'t be as nice as it should be...and shouldn\'t be recommended but...
You can plug stripped wires in the UART holes on the Raspi and attach the other side to the USB adapter with what you can find (...adhesive tape!..). Without moving all the stuff, it may do the job.

But in the future, a 10$ soldering iron will be your best friend for any electronic project.

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 4:45 pm

@Bakul Shah: thanks for the info. Jameco charges $5 for all orders under $10, Radioshack doesn\'t seem to have it, and Amazon has it in marketplace for around $5. Currently the lowest price I found is $0.9 on ebay with free shipping.
@ Chris-Tyler & gbiohazard: thanks, I have updated my last post. It seems that besides raspi uart is most widely used to recover or hack cellphones, routers and such...interesting. I didn\'t know putty does serial too -- good to know. Wow I\'m learning something new every day on the forum:)

tufty
Posts: 1456
Joined: Sun Sep 11, 2011 2:32 pm

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 5:19 pm

[quote]Quote from xkxx on December 13, 2011, 00:25
Under Linux, use ... minicom for UART/serial.[/quote]
Or use screen, which is probably already installed. For example, assuming your serial port is /dev/ttyS01 and you\'re running at 115200baud...

screen /dev/ttyS01 115200

xkxx
Posts: 39
Joined: Sat Dec 10, 2011 5:26 am

Re: UART for using Raspi without a screen

Tue Dec 13, 2011 7:16 pm

[quote]Quote from tufty on December 13, 2011, 17:19
[quote]Quote from xkxx on December 13, 2011, 00:25
Under Linux, use ... minicom for UART/serial.[/quote]
Or use screen, which is probably already installed. For example, assuming your serial port is /dev/ttyS01 and you\'re running at 115200baud...

screen /dev/ttyS01 115200[/quote]

Thanks. However I tried under Linux Mint 12 - nope, it\'s not preinstalled.

Asmodeus
Posts: 29
Joined: Mon Aug 01, 2011 7:44 am

Re: UART for using Raspi without a screen

Wed Dec 14, 2011 12:55 pm

[quote]Quote from xkxx on December 13, 2011, 19:16
[quote]Quote from tufty on December 13, 2011, 17:19
[quote]Quote from xkxx on December 13, 2011, 00:25
Under Linux, use ... minicom for UART/serial.[/quote]
Or use screen, which is probably already installed. For example, assuming your serial port is /dev/ttyS01 and you\'re running at 115200baud...

screen /dev/ttyS01 115200[/quote]

Thanks. However I tried under Linux Mint 12 - nope, it\'s not preinstalled.[/quote]

sudo apt-get install screen 8-)

Return to “General discussion”