Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length



Pages: [1]
  Print  
Author Topic: Response of WF command  (Read 592 times)
khyati
Newbie
*
Posts: 17


View Profile
« on: October 28, 2009, 03:36:55 AM »

Hi,

we are writing 264 bytes in usb drive. (1000 times)

For writing data, in usb drive we follow this sequence :
command from controller:          WF 0>108<cr>
response from usbwiz:              !00<cr>
command:                              264 bytes of data
response:                               $00000108<cr>          /// retry thrice for this response
-----------------------------------------------------------------------------------------
During this, after about  400 times, following problem appears frequently:
USB wiz stops giving response of $00000108<cr>

What can be the reason?

Logged
GHI_Support
Administrator
Hero Member
*****
Posts: 1252


View Profile
« Reply #1 on: October 28, 2009, 08:27:16 AM »

If after sometime it stops, then you might be missing some data while writing or similar situations...
For example:
command from controller:          WF 0>108<cr>
response from usbwiz:              !00<cr>
command:                              (264-5) bytes of data
USBwiz is not responding because it is waiting for five more byte.
When it stops responding, try to send some data and see if it responds eventually.
Logged
khyati
Newbie
*
Posts: 17


View Profile
« Reply #2 on: October 30, 2009, 06:27:48 AM »


By going through some previous replies of yours,
We tried to write 100 bytes at a time (instead of 264.. as your buffer size is 128).

We tried to write extra bytes whenever error occures, but still we don’t get proper response message from USB Wiz.
 
Instead of writing 264 bytes at once, we do it in following manner:

1)   Write 100 bytes of data and get response from USB wiz
2)   Again write 100 bytes and get reply
3)   Write rest of the 64 bytes and get reply

Sill sometimes, there is some improper reponse from USBwiz.
It responds as follow:
         (In Hex) -   Byte 1 – 0xFF
               Byte 2 – 0x42
               Byte 3 – 0x60
               Byte 4 – 0x1B

Would you please guide in this matter?
Logged
GHI_Support
Administrator
Hero Member
*****
Posts: 1252


View Profile
« Reply #3 on: October 30, 2009, 08:44:23 AM »

Quote
We tried to write 100 bytes at a time (instead of 264.. as your buffer size is 128).
Actually, it is more. The recommendation for 100 bytes at a time was so you do no loose much data in case pf power loos or other issues. You can write any amount you like.

Quote
Sill sometimes, there is some improper reponse from USBwiz.
Does it respond with weird characters or never responds?
Maybe power is dropping and you are loosing communications.
Logged
Pages: [1]
  Print  
 
Jump to: