• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Communicaton Verification With Sheeva  (Read 3280 times)
stripedtomato
Newbie
*

Karma: 0
Posts: 3


View Profile
« on: March 03, 2010, 09:56:02 PM »

Hello.......Sheeva Newbie here,

This could be either hw or sw. I was not sure, which is why I posted here first.

I have my Sheeva hooked to my host system via the serial/USB cable, and I am using PuTTY to access it.  Is there a way to "ping" the Sheeva through PuTTY to verify it is happy with the connection, and ready to accept commands?  Shouldn't the Sheeva respond in some way back to the host system, even if you type nonsense and hit enter?

When I disconnect the serial/USB cable from the Sheeva, PuTTY responds by saying the connection has been lost, so I know that the connection was OK according to PuTTY, but  I cannot tell if the Sheeva is trying to accept commands because I am not getting any response (good or bad) back from the Sheeva.

Thanks!
Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #1 on: March 04, 2010, 10:27:30 AM »

It's also unclear whether you are running PuTTY from a Unix environment or from Windows.  Further, it not clear what you are trying to use PuTTY for.    (PuTTY is normally used to talk to the Sheeva's console via a serial port reflected through the USB connection.  However, the JTAG interface is also reflected through this connection, and your comments about accepting commands and pinging sort of imply you are trying to access the latter, although I think PuTTY is inappropriate to this task.)

First, have you set up your USB configuration correctly on the host?  Have you reviewed the following:
http://www.openplug.org/plugwiki/index.php/Serial_terminal_program
http://www.openplug.org/plugwiki/index.php/Load_Serial_Drivers_Automatically_Using_udev

After the Plug is booted, the console should present a Login prompt to PuTTY.  What device are you requesting PuTTY connect to?  What serial port parameters are you configuring PuTTY to use?  Note that the speed should be 115200 baud, 8 data bits, 1 stop bits in PuTTY.

In short, we need more information to assist you.
Logged

stripedtomato
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #2 on: March 06, 2010, 05:39:33 PM »

Thanks for your reply restamp.  I was only trying to be brief and was not sure if the added info was important.  Here is more detailed information if it helps:

I was in the process of updating the Ubuntu OS on the Sheeva (GTI version) via LAN when I lost power.  Now I am not able to ping the Sheeva via LAN (Destination Host Unreachable) using the IP address the DHCP server assigned (no, the IP address has not changed) to the Sheeva to be able to restart the update.  I have tried to do both a hard and soft reboot of the Sheeva, but with no luck.  The network lights on the Sheeva do blink so it is seeing the LAN signal, but I believe the LAN driver on the Sheeva has become corrupt.  And yes, the LAN cable is unplugged from the Sheeva when I am using the serial/USB connection.

I am trying to reflash the system to fix the LAN drivers so I can gain LAN connectivity to the Sheeva again and be able to update the Ubuntu OS again.

Since I had not needed to use the serial interface until now, I was not sure if the U-Boot screen came up on it's own when the connection with PuTTY was established, or if I had to invoke the U-Boot screen via a command line using PuTTY.  I did not find any documentation indicating which way to go about obtaining the U-Boot screen, which was the idea behind posting my question.  I have come to find out, that the U-Boot screen will come up on it's own when the Sheeva and PuTTY are properly setup and connected to the host system.

I am using Linux Mint 8 (Helena x64) as my host.

I have setup PuTTY as needed:
  • 115200 Baud rate
  • 8 Data bits encoding each character
  • N Parity (none/no)
  • 1 Stop bit
  • 0 Flow control (none)


I have removed brltty. (Notes for Ubuntu karmic, may be applicable to other versions) You may not get any response on the /dev/ttyUSBx interface(s). In that case, you may need to remove brltty using:
Code:
sudo apt-get remove brltty


I have created the file for loading the serial drivers automatically and rebooted.  (Thanks for the link, I did not know about this one.  Wink )


Using:
Code:
dmesg

I have been able to obtain the following line:
[375087.475359] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0


I have verified ttyUSB0 has loaded in the /dev folder.  It unloads this file when I disconnect the Sheeva, and automatically reloads the file when the Sheeva is plugged back in.

I am still unable to open the serial port, as PuTTY gives me a Fatal Error dialog box indicating this.  I will do some more reading /digging within the forum to see what I am missing.  If you are able to push me in the right direction I would appreciate it.  If I find a solution I will post again in case the information would be useful to someone.


>>03/07 Update<<

After a little more digging I believe I know what the problem is.  http://www.openplug.org/plugwiki/index.php/Serial_terminal_program indicates the FTDI FT2232D provides two serial ports via USB:

  • port 0 (*A) is the JTAG interface
  • port 1 (*B) is the console (/dev/ttyS0 on the plug; default 115200 baud, 8N1, no flow control)

Since I am needing to access the console (port 1) the ttyS0 file in my /dev should be recognized (an un X'ed icon).  The ttyS0 file is there but has the X'ed icon.  So if I am understanding things correctly, the problem is the ttyS0 file does not seem to be loading (during boot of the host system?) which (I think) is why PuTTY is not being allowed to connect to the Sheeva.

The ttyUSB0 un X'ed icon is showing, which is a good thing I think.

Here is the result of my dmesg, if it helps.  The ttyS0 file is not showing up as being loaded:
Code:
[ 9146.600024] usb 4-1: new full speed USB device using uhci_hcd and address 4
[ 9146.878171] usb 4-1: configuration #1 chosen from 1 choice
[ 9146.886362] usb 4-1: Ignoring serial port reserved for JTAG
[ 9146.891160] ftdi_sio 4-1:1.1: FTDI USB Serial Device converter detected
[ 9146.891205] usb 4-1: Detected FT2232C
[ 9146.891209] usb 4-1: Number of endpoints 2
[ 9146.891213] usb 4-1: Endpoint 1 MaxPacketSize 64
[ 9146.891216] usb 4-1: Endpoint 2 MaxPacketSize 64
[ 9146.891219] usb 4-1: Setting MaxPacketSize 64
[ 9146.892124] usb 4-1: FTDI USB Serial Device converter now attached to ttyUSB0

I did follow the instructions in the post I found here: http://openplug.org/plugforum/index.php?topic=2.0 (see reply's six, seven and eight.)

But ttyS0 still does not load / recognize the Sheeva, so PuTTY and U-Boot will not connect.  I'll keep looking around the forum for solutions and will post back here if I find anything.

Let me know if anyone has any ideas, or knows of a post which will help.
« Last Edit: March 07, 2010, 10:39:17 AM by stripedtomato » Logged

restamp
Global Moderator
Sr. Member
*****

Karma: 4
Posts: 273


View Profile
« Reply #3 on: March 08, 2010, 04:04:41 PM »

Since you were in the process of trying to update the OS when your power failed, I suspect you do not have a good uImage (kernel) on your Plug.  It probably contains a partially loaded one.

Do you have a /dev/ttyUSB1 that appears and disappears along with the /dev/ttyUSB0 entry?  This is the console device.  If it is present, connect to it with Putty, and then hit the reset on your Plug.  (If you power cycle it, you'll have to quickly reconnect with Putty.)  See if you see any Uboot output on /dev/ttyUSB1.  If so, your Uboot is intact, but it is probably failing when it tries to load the uImage.  If not, that is hosed too.

If the Uboot is intact, you can probably reload your uImage either by booting from a thumb drive or by doing a net boot.  There are wiki articles that describe how to do this.

If the Uboot is not intact, or you just want to start from scratch, you can use one of the Sheeva Installers to get back to a known good load.  These use the JTAG hardware to reflash the NAND memory with a known-good Uboot, Uboot environment, uImage, and root file system.  The one I used last can be found here.  I think rooster also has one in beta testing, but I'm not sure if it has been released yet, so I'll let him comment if he wants to.  Personally, I would run one of the Installers and be done with it - unless you have some things you need to save, to me that would seem the easiest approach for bringing your Plug back to life.

Good luck and let us know how you fare.
Logged

stripedtomato
Newbie
*

Karma: 0
Posts: 3


View Profile
« Reply #4 on: March 14, 2010, 05:55:07 PM »

Sorry I have not responded sooner, but I travel for a living.

Because of the power loss I am not sure of all of the problems the Sheeva may have, so I figure it is best to just reload and start over.  A good thing to learn how to do anyway I guess.

I am not able to access the Sheeva via PuTTY when the Sheeva is plugged into the host system because the drivers do not seem to be loading:

/dev/ttyS0 - X'ed icon present (used to access the JTAG interface for Uboot re-installation)
/dev/ttyS1 - X'ed icon present (used to access the JTAG interface for Uboot re-installation)
/dev/ttyUSB0 - Present with no X'ed icon (used to access the console to reload the OS via a USB thumb drive attached to the Sheeva)
/dev/ttyUSB1 - No icon present (used to access the console to reload the OS via a USB thumb drive attached to the Sheeva)
/dev/sheevaplug icon - Present with link arrow icon

Is there a reason the ttyS0 & ttyS1 drivers are not loading automatically when the Sheeva is plugged in?  Are they possibly damaged because of the power being lost during the last good connection?

I did already have the Uboot image which you suggested to use, and I have also prepped a USB drive for the OS installation.  I think I will be fine, once I can communicate with the Sheeva.
Logged

Pages: [1]
Print
Jump to: