Difference between revisions of "Add a Serial port to the ARM9 Linkstation"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m (Using a USB Plug to form a friction-fit connector)
m (Remove category hacking.)
 
(31 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Articles|Hacking|Hardware|LSPro|Kurobox}}
+
{{Articles|Hardware|LSPro|LSLive|Kurobox|KuroboxPro}}
 +
{|align=right class=wikitable
 +
|-
 +
|| http://upload.wikimedia.org/wikibooks/en/f/f9/DB-9_Female_PinOut.png
 +
|-
 +
||[[Image:LS-Pro.jpg|120px|center]]
 +
<center><small> [[:Category:LSPro|Linkstation Pro]]</small></center>
 +
|-
 +
||[[Image:Kuro-box pro.jpg|95px|center]]
 +
<center><small> [[KuroBoxPro|KuroBox Pro]]</small></center>
 +
|}
 +
 
 
= Introduction =
 
= Introduction =
{{Postit|Note|The same instructions will work for a [[KuroBoxPro]]}}
 
  
== What you can do with serial access on a LS Pro==
+
These instructions will work for a [[KuroBoxPro]] and [http://buffalo.nas-central.org/index.php/Category:LS-WSGL/R1 Linkstation Mini].
At first: check [http://en.wikipedia.org/wiki/Serial_port serial access]
+
 
 +
== What you can do with serial access ==
 +
At first: check [[w:Serial_port| serial access]]
 
In fact you can control the UBoot Bootloader. <br><br>
 
In fact you can control the UBoot Bootloader. <br><br>
  
 
* You can change to EM Mode at will without any dirty tricks.
 
* You can change to EM Mode at will without any dirty tricks.
 +
* One can get diagnostic information from the boot process or while using the Buffalo Updater, and use this to troubleshoot and fix an otherwise unrecoverable box
 
* You can look at the linux system of your LS pro without having to flash any custom firmware
 
* You can look at the linux system of your LS pro without having to flash any custom firmware
 
* You can load a kernel + ramdisk via tftp
 
* You can load a kernel + ramdisk via tftp
Line 18: Line 31:
  
 
== Why it is easy to gain serial access on the LS Pro ==
 
== Why it is easy to gain serial access on the LS Pro ==
[[Image:LS_Pro_Mainboard_Backside_serial.JPG|400px|right]]<br>
+
{|
Pinout - Ground is on the Right side with the board flipped over like this
+
|-valign=top
 +
||
 
{| style="background:Gainsboro;border-collapse:collapse;border:solid 1px black"
 
{| style="background:Gainsboro;border-collapse:collapse;border:solid 1px black"
 
|+  
 
|+  
Line 37: Line 51:
 
| style="border:solid 1px white"|4  
 
| style="border:solid 1px white"|4  
 
| style="border:solid 1px white"|Ground (GND)  
 
| style="border:solid 1px white"|Ground (GND)  
 +
|}
 +
|| [[Image:LS_Pro_Mainboard_Backside_serial.JPG|200px|thumb|right|Pinout - Ground is on the Right side with the board flipped over like this]]
 +
|| [[Image:LS_Pro_Mainboard_Frontside_serial.JPG|200px|thumb|right|Front side of Board shows pinout assignments]]
 +
|| [[Image:Serial_LS_Pro_prepared_box_for_serial.JPG|200px|thumb|right|Inside of case showing opening/slot for serial port access]]
 
|}
 
|}
  
[[Image:Serial_LS_Pro_prepared_box_for_serial.JPG|200px]]<br>
+
== Serial access on KuroBoxPro ==
 
+
  
 +
Find the unpopulated header CN6.  The pins TXD, RXD, VCC and GND pins are marked.  You can solder on a 4-pin header and use a TTL-232R-3V3.  See next section.
  
 
= The Serial Converter =
 
= The Serial Converter =
 +
 
{{Level Shifter}}
 
{{Level Shifter}}
  
=Using a USB Plug to form a friction-fit connector=
+
=Using a USB Plug to form a friction-fit connector (NOT RECOMMENDED)=
{{Warning| I blew out a fuse on my KuroBoxPro by using this method, consider soldering in a pin header instead <br>[[User:Ramuk|Ramuk]] 18:13, 18 August 2007 (CEST) [[Image:lsproserialheader.jpg|100px]]}}
+
{{Postit|Pin Header| I blew out a fuse on my KuroBoxPro by using this method, consider soldering in a pin header instead <br>[[User:Ramuk|Ramuk]] 18:13, 18 August 2007 (CEST) Epilogue- We have seen a 2nd case of frictions pins leading to a fuse-blowing short. The friction-fit method seems to have some consistent risks!<br>[[User:TimSmall|TimSmall]] 14:03, 13 April 2008 (CDT) Third case...  The contact spacing for USB plug are not quite the same as for the Linkstation Serial port, also the width isn't quite the same, so it's easy to short pin-to-pin or pin-to-chassis..  [[Use a Nokia Serial Cable on an ARM9 Linkstation |I soldered the serial wires direct to the board instead...]]
 +
[[Image:lsproserialheader.jpg|170px|thumb|<big>[[:Category:LSPro|LSPro]] Board with PinHeader]]</big>}}
 +
# From the outset, '''consider using the more secure method''', such as soldering a standard or angled 4-pin header instead of the friction-fit method.  '''We now have two well documented cases of this method leading to a blown fuse.'''
 
# You will need an old USB-plug (Female, Type A). I used two from USB-extender-cables and the rest from female-USB-connectors that i directly ordered in a shop.
 
# You will need an old USB-plug (Female, Type A). I used two from USB-extender-cables and the rest from female-USB-connectors that i directly ordered in a shop.
 
# You will also need something as thick as 1 mm. This can be wood, plastic or the latest flyers you collected by going out at the weekend. We used a [http://www.neonixie.com/prototyping/ECS1/ecs1.jpg Eurocard] which we broke in Pieces (4 rows * 9 holes)  
 
# You will also need something as thick as 1 mm. This can be wood, plastic or the latest flyers you collected by going out at the weekend. We used a [http://www.neonixie.com/prototyping/ECS1/ecs1.jpg Eurocard] which we broke in Pieces (4 rows * 9 holes)  
  
 
=== Prepare the USB-Plug ===
 
=== Prepare the USB-Plug ===
Indifferent which way you use, you will have to make the usb-plastik part a little smaller....you also will have to get rid of all parts so that it looks like the next picture.
+
Regardless of which way you use, you will have to make the usb-plastic part a little smaller....you also will have to get rid of all parts so that it looks like the next picture.
[[Image:Usb_connector_parts.JPG|200px|right]]
+
[[Image:Usb_connector_parts.JPG|200px|thumb|right|Prepare the USB-Plug]]
 
==== If you are using one from an extender cable ====
 
==== If you are using one from an extender cable ====
 
Best would be to use a grinder. Do not hesitate to destroy the cables. It is recommended to remove everything so that you can solder the cables from the phonesync-cable directly to the pins.
 
Best would be to use a grinder. Do not hesitate to destroy the cables. It is recommended to remove everything so that you can solder the cables from the phonesync-cable directly to the pins.
  
 
==== If you have bought the part directly ====
 
==== If you have bought the part directly ====
Just open the metal-case and use a grinder to make it look like the picture above. You won`t have to remove any glue or cables.
+
Just open the metal-case and use a grinder to make it look like the picture. You won`t have to remove any glue or cables.
  
 
== Checking the cable/plug ==
 
== Checking the cable/plug ==
Line 68: Line 89:
 
In this picture: Green is GND, Yellow is RX (as in "data entering the LSPro") and Orange is TX (as in "data coming from the LSPro"). The not connected terminal is VCC.
 
In this picture: Green is GND, Yellow is RX (as in "data entering the LSPro") and Orange is TX (as in "data coming from the LSPro"). The not connected terminal is VCC.
  
{|
+
<font color=red> When connecting a modified USB type-A female plug like the one shown here to a purchased USB/TTL level adapter,
 +
note that the YELLOW cable shown here (RX = data to be received by the LSPro) connects to the TXD cable (= data transmitted from the attached computer's serial/USB port) which is ORANGE in the recommended  TTL-232R-3V3 cable from FTDI, and LSPro TX (ORANGE here) connects to RXD (YELLOW) from the USB/Serial port of the attached computer.    (Connecting yellow to yellow and orange to orange gives no signal!)  Note that the cable supplied with the SCON-KIT/PRO for the Kurobox/Pro has a crossover of its white and red RX/TX cables so the TX pin at one end connects to the RX pin at the other.</font>
 +
 
 +
 
 +
 
 +
 
 +
{| width=100%
 
|-
 
|-
 
||
 
||
Line 89: Line 116:
 
| style="border:solid 1px white"|Ground (GND)  
 
| style="border:solid 1px white"|Ground (GND)  
 
|}
 
|}
||[[Image:Phone_sync_cables_soldered_to_the_connector.JPG|400px]]
+
||[[Image:Phone_sync_cables_soldered_to_the_connector.JPG|thumb|right|200px|Solder the phone sync cable to the USB-plug]]
 
|}
 
|}
  
(in this case from on top of the profilic chip from this article: [[Use a cheap phone sync cable with the serial port]]).
+
(in this case from on top of the prolific chip from this article: [[Use a cheap phone sync cable with the serial port]]).
  
 
== Using superglue ==
 
== Using superglue ==
[[Image:Serial_cable_LS_Pro_gluing_eurocard_2_connector.JPG|200px]]
+
{|
[[Image:Serial_cable_LS_Pro_glueing_the_eurocard_piece.JPG|200px]]
+
|-
 +
||
 +
[[Image:Serial_cable_LS_Pro_gluing_eurocard_2_connector.JPG|200px|thumb|left|Attach spacer material to bottom of USB plug with superglue]]
 +
||
 +
[[Image:Serial_cable_LS_Pro_glueing_the_eurocard_piece.JPG|200px|thumb|left|Finished adapter plug]]
 +
|}
  
 
= Software Installation =
 
= Software Installation =
 +
==== Change kernelmon script (if needed) ====
 +
 +
Non Stock Firmware users should modify a line in the the /usr/local/sbin/kernelmon script: "cat /proc/<b>driver</b>/kernevnt" to "cat /proc/<b>buffalo</b>/kernevnt"
 +
This is to avoid endless errors in your terminal connection about not being able to write to /proc/driver/kernevnt
 +
 
=== General Settings ===
 
=== General Settings ===
 
Baud: 115200 <br>
 
Baud: 115200 <br>
Line 104: Line 141:
 
Parity: N<br>
 
Parity: N<br>
 
Stopbits: 1<br>
 
Stopbits: 1<br>
 +
Hardware Flow Control: off<br>
 +
Software Flow Control: off<br>
 +
 
==== Windows ====
 
==== Windows ====
 
You need a Windows driver for the Prolific USB-to-Serial adaptor, available at the Prolific Technology Inc Support Site.
 
You need a Windows driver for the Prolific USB-to-Serial adaptor, available at the Prolific Technology Inc Support Site.
 
The cable will show up as COM4.
 
The cable will show up as COM4.
 +
 
==== Linux ====
 
==== Linux ====
 
Plug the USB connector into your Linux box. Start minicom and set the port to /dev/ttyUSB0 115200 8N1. Power up and you will see a '+' printed.
 
Plug the USB connector into your Linux box. Start minicom and set the port to /dev/ttyUSB0 115200 8N1. Power up and you will see a '+' printed.
 +
 +
==== OS X ====
 +
 +
Make sure you have "screen".  Connect the cable and run "screen /dev/tty.usbserial-XXXXX 115200".
  
 
= Have fun! =
 
= Have fun! =
 
Cable is confirmed to work...here, hyperterminal is used in WinXp
 
Cable is confirmed to work...here, hyperterminal is used in WinXp
 
<youtube>zSqxOhQ9q30</youtube>
 
<youtube>zSqxOhQ9q30</youtube>

Latest revision as of 15:38, 18 January 2013

DB-9_Female_PinOut.png
LS-Pro.jpg
Linkstation Pro
Kuro-box pro.jpg
KuroBox Pro

Contents

Introduction

These instructions will work for a KuroBoxPro and Linkstation Mini.

What you can do with serial access

At first: check serial access In fact you can control the UBoot Bootloader.

  • You can change to EM Mode at will without any dirty tricks.
  • One can get diagnostic information from the boot process or while using the Buffalo Updater, and use this to troubleshoot and fix an otherwise unrecoverable box
  • You can look at the linux system of your LS pro without having to flash any custom firmware
  • You can load a kernel + ramdisk via tftp
  • Hey! We connect it because we can!

Serial access isn`t that important for users, but it is very important for developers because they
exactly see what is happening while the LS Pro boots.
The kernel log tells us a little more about the hardware and it allows us to debug a newer kernel.
Without serial that is not possible.

Why it is easy to gain serial access on the LS Pro

Pin  Signal
1 Transmit (TX)
2 Receive (RX)
3 Power (3.3V)*
4 Ground (GND)
Pinout - Ground is on the Right side with the board flipped over like this
Front side of Board shows pinout assignments
Inside of case showing opening/slot for serial port access

Serial access on KuroBoxPro

Find the unpopulated header CN6. The pins TXD, RXD, VCC and GND pins are marked. You can solder on a 4-pin header and use a TTL-232R-3V3. See next section.

The Serial Converter

The serial port signals from the processor are only 3.3V. For proper RS-232 12V signaling, an RS-232 level shifter needs to be added. These are very common in PDA serial cables also, but can be purchased

Models other than KuroPro
Bar.png

If you are attaching a serial header pin onto the main board, you may want to consider:

  • Using the header pin unit with a 90 degree bend, or you might not be able to close the case
  • Soldering it with the pins toward the interior, rather than toward the case. This allows easier access, since if the pins face the case side they would be very close to the metal side. This would make access is so tight that one might end up taking the board out to get plug fitted on the pins.


Build your own LVTTL/RS232 or LVTTL/USB interface

Buy your own TTL Level Shifter

Usage considerations for the TTL-232R-3V3

TTL-232R-3V3 USB to TTL Serial Converter Cable
A very similar TTL/USB converter cable that uses a chip by FTDI (the same chip is used in the SCON-KIT ) can be obtained, but the pinout at the connector end would need to be reassigned: Spec Sheet w/ pinout, wire colors & other info
MM232R.jpg Mouser Part # 895-TTL-232R-3V3 $20.00
4pinheader.gif Mouser Part # 517-929400-01-04 $0.32

A working/tested pinout/wire-color scheme is:

Color Pin Number Signal
yellow 1 TXD
orange 2 RXD
unused 3 VCC
black 4 GND
  • Solder the 4-pin header to the board. Make sure you don't have shorts.
  • You will need to switch wires on the TTL-232R-3V3 cable. Use a sharp object to lift the plastic tabs and carefully pull the wires out. Rearrange them according to the table above (black, empty, orange, yellow, empty, empty) and slide those wires back in. Tape the other wires to make sure they don't short anything.
  • When plugging in the cable, make sure black aligns with GND, yellow with TXD, and orange with RXD.
  • Connect the USB cable to your computer, start a terminal program with the right settings.
  • Turn on the device, you should see output from the bootloader in couple seconds.

Using a USB Plug to form a friction-fit connector (NOT RECOMMENDED)

Pin Header
Bar.png
I blew out a fuse on my KuroBoxPro by using this method, consider soldering in a pin header instead
Ramuk 18:13, 18 August 2007 (CEST) Epilogue- We have seen a 2nd case of frictions pins leading to a fuse-blowing short. The friction-fit method seems to have some consistent risks!
TimSmall 14:03, 13 April 2008 (CDT) Third case... The contact spacing for USB plug are not quite the same as for the Linkstation Serial port, also the width isn't quite the same, so it's easy to short pin-to-pin or pin-to-chassis.. I soldered the serial wires direct to the board instead...
LSPro Board with PinHeader


  1. From the outset, consider using the more secure method, such as soldering a standard or angled 4-pin header instead of the friction-fit method. We now have two well documented cases of this method leading to a blown fuse.
  2. You will need an old USB-plug (Female, Type A). I used two from USB-extender-cables and the rest from female-USB-connectors that i directly ordered in a shop.
  3. You will also need something as thick as 1 mm. This can be wood, plastic or the latest flyers you collected by going out at the weekend. We used a Eurocard which we broke in Pieces (4 rows * 9 holes)

Prepare the USB-Plug

Regardless of which way you use, you will have to make the usb-plastic part a little smaller....you also will have to get rid of all parts so that it looks like the next picture.

Prepare the USB-Plug

If you are using one from an extender cable

Best would be to use a grinder. Do not hesitate to destroy the cables. It is recommended to remove everything so that you can solder the cables from the phonesync-cable directly to the pins.

If you have bought the part directly

Just open the metal-case and use a grinder to make it look like the picture. You won`t have to remove any glue or cables.

Checking the cable/plug

Best with a Voltmeter. To go completely safe test from the pins for the yellow + orange wires. The green one + shield can be tested from the pin on the other side.

Solder the phone sync cable to the USB-plug

You will have both read and write access if you solder it that way.

In this picture: Green is GND, Yellow is RX (as in "data entering the LSPro") and Orange is TX (as in "data coming from the LSPro"). The not connected terminal is VCC.

When connecting a modified USB type-A female plug like the one shown here to a purchased USB/TTL level adapter, note that the YELLOW cable shown here (RX = data to be received by the LSPro) connects to the TXD cable (= data transmitted from the attached computer's serial/USB port) which is ORANGE in the recommended TTL-232R-3V3 cable from FTDI, and LSPro TX (ORANGE here) connects to RXD (YELLOW) from the USB/Serial port of the attached computer. (Connecting yellow to yellow and orange to orange gives no signal!) Note that the cable supplied with the SCON-KIT/PRO for the Kurobox/Pro has a crossover of its white and red RX/TX cables so the TX pin at one end connects to the RX pin at the other.



Pin  Signal
orange Transmit (TX)
yellow Receive (RX)
Power (3.3V)* (VCC)
Green + shield Ground (GND)
Solder the phone sync cable to the USB-plug

(in this case from on top of the prolific chip from this article: Use a cheap phone sync cable with the serial port).

Using superglue

Attach spacer material to bottom of USB plug with superglue
Finished adapter plug

Software Installation

Change kernelmon script (if needed)

Non Stock Firmware users should modify a line in the the /usr/local/sbin/kernelmon script: "cat /proc/driver/kernevnt" to "cat /proc/buffalo/kernevnt" This is to avoid endless errors in your terminal connection about not being able to write to /proc/driver/kernevnt

General Settings

Baud: 115200
Databits: 8
Parity: N
Stopbits: 1
Hardware Flow Control: off
Software Flow Control: off

Windows

You need a Windows driver for the Prolific USB-to-Serial adaptor, available at the Prolific Technology Inc Support Site. The cable will show up as COM4.

Linux

Plug the USB connector into your Linux box. Start minicom and set the port to /dev/ttyUSB0 115200 8N1. Power up and you will see a '+' printed.

OS X

Make sure you have "screen". Connect the cable and run "screen /dev/tty.usbserial-XXXXX 115200".

Have fun!

Cable is confirmed to work...here, hyperterminal is used in WinXp