MultiDrive – free backup, clone & wipe disk utility from Atola Technology

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: How do I change diagnostic level /x in C program
PostPosted: October 7th, 2009, 11:17 
Offline

Joined: October 7th, 2009, 10:39
Posts: 1
Location: Pune-Maharashtra-India
I am currently working on some kind of low level HDD diag and recovery tool project.
I have built RS232-TTL converter and connected HDD using it. Now Trying to build a GUI tool to communicate to HDD and do requested things.


Till Now I am successful in writing C code for sending single byte diagnostic commands to Seagate SATA drive. BUt when I am sending a multibyte command like "/1", it is giving me output like "Input Command Error".

I am using BYTE array to scan user input and passing char * pointer to that array to my function which writes that string to COM port i.e HDD.

Note : All diagnostic commands are working properly while connected with HyperTerminal or Putty.

Is anybody having any idea, suggestion for this.

-ADITYA


Top
 Profile  
 
 Post subject: Re: How do I change diagnostic level /x in C program
PostPosted: October 7th, 2009, 16:02 
Offline

Joined: July 18th, 2006, 3:05
Posts: 7476
Location: ITALY
Introduce a delay between characters sent and lines.


Top
 Profile  
 
 Post subject: Re: How do I change diagnostic level /x in C program
PostPosted: October 8th, 2009, 4:24 
Offline
User avatar

Joined: May 5th, 2004, 20:06
Posts: 2782
Location: England
you do need a delay. You also (as I found with my machine) need the GND connected or you get bullsh1t echo

_________________
All went well until I plugged the drive in.


Top
 Profile  
 
 Post subject: Re: How do I change diagnostic level /x in C program
PostPosted: October 8th, 2009, 5:34 
Offline

Joined: August 19th, 2009, 2:24
Posts: 7
Location: India
Hurray!

the problem is resolved as line feed is added to data to be written
(scanf( ) omits the \n so i added it explicitly) :D


Top
 Profile  
 
 Post subject: Re: How do I change diagnostic level /x in C program
PostPosted: October 9th, 2009, 4:11 
Offline
User avatar

Joined: May 5th, 2004, 20:06
Posts: 2782
Location: England
thats the easy bit :P

_________________
All went well until I plugged the drive in.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: Majestic-12 [Bot] and 71 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group