EL03-CRW Command Set

I have written a program using the information in the EL03_CRW_Commands pdf, but, most of the advanced commands don’t seem to be working. The ones that work for me are the RESET, ABORT, and a basic WRITE. If during a WRITE, an error occurs during writing, one or more tracks on the card cannot be read or modified. Maybe I am not issuing the commands correctly, I will continue experimentation.

The device is still a most enjoyable playground

Thanks

I did some research and discovered something interesting that seems to explain a few things.

The advanced commands I included in my program were based on an assumption the encoder was MSE-630A compatible. But, I discovered the MSE-630T specifications along with a manual.

The ‘T’ version seems to support only the most fundamental commands, where the ‘A’ version supports the track erase, track format density, raw data read, and raw data write commands. It also allows access to the LED’s and buzzer and writes Hi-Coercivity and Lo-Co cards.

It seems only logical to me, the real difference in versions would be the firmware inside the encoder. So now my mission is to acquire an ‘A’ version to examine (hopefully to download the firmware from it’s 2 8952’s)

Hey,

I hate to be a newb here, but I am in the same boat. I bought the sparkfun mag. card reader/writer and can only get this program to read cards. I can see the command set but I don’t know how to really use that. I do have hyper terminal but I’m a bit confused.

Right now, my primary need is to copy a track 2 and 3 line to a card. If you can get this to write, can you PM me or tell me how to make it erase a track and/or write the track.

When I go to write I get an error mess.

I can’t find anything else for this program or similar serial port type program.

Thanks so much,

I’m stuck right now

Jules

Hey Meta,

So I’m sure you can debunk my stupidity upfront. I have a card with data on track 2,3. I simply want to erase that or write over it.

When you try to erase data how do you do that?

and

When writing, I am connecting to the device and typing in the data in track field 2 and then hit write. Then I get “error!” even though it can read any card I run through it.

So anything you can throw me as to how you’re doing the most basic things would be an enormous help.

Thanks

Jules

I am using hyperterminal since the program SF offers just reads cards for me. Here’s what I’m having a problem with and I’m going to put the other variables on the table.

Problem:

With Hyperterminal correctly setup - 9600, 8bit, 1stop, (flow control hardware- I dtk if this is correct but I assume so): the device says connected but does not allow me to type anything in. So I can not type anything into the terminal.

Fun Facts:

–This is a serial device with a ps/2 female/male end. So it’s a 3 headed item, I have the serial plugged into my dell laptop and I have a Ps/2 to USB connector on for I think is power. I don’t know if this might confuse or have a data conflict.

I know the serial is “for output”, so if I already know what I want to erase and copy to tracks, should I abandon the serial part?

So that is the only other variable, I’m pretty sure the ports work and this is almost setup to work. I don’t know if I need something else to dump into hyperterminal or what, but my keyboard does not actually show up in the terminal.

thanks so much,

Jules

I have written a program in VB6 to interact with the encoder. To write, data packets must be correctly formatted or you will get an error.

Since they must contain unprintable characters Hyperterminal will not work. Writing to High Coercivity cards doesn’t work either since the encoder is a Low Coercivity only writer.

The data packet must begin with the STX (Start of Transmission) character or Hexadecimal 02 and terminate with the ETX (End of transmission) character or Hexadecimal 03.

The rest is fairly straightforward. This is the structure

STX

W%

Track1Data

?;

Track2Data

?+

Track3Data

?

ETX

Send this as one continuous string of data (replacing STX, ETX and the track data) and it will over write the existing data on a LO-CO card with standard formatting on all 3 tracks.

This is the Write button event handler code from my VB program:

'----------------------------------------------------------
Private Sub cmdWrite_Click()
  Dim TmpStr As String
  
  TmpStr = Chr$(2) & "W%" & txtTrack1.Text & "?;" & txtTrack2.Text & "?+" & txtTrack3.Text & "?" & Chr$(3)
  MSComm1.Output = TmpStr
End Sub
'----------------------------------------------------------

txtTrack1.Text, txtTrack2.Text, and, txtTrack3.Text are edit boxes.

MSComm1 is a comm port activex control.

I have also used this method with MsAccess and as a web page (using vbScript and Javascript)

here is some of the code used in a web page:

'This is the comm port activex object definition 
[<]OBJECT CLASSID="clsid:648A5600-2C6E-101B-82B6-000000000014" id=MSComm1[>]
[<]/OBJECT[>]

[<]SCRIPT LANGUAGE=vbscript[>]
'These are the vba constant definitions needed for vbscript
Public Const vbMSCommEvReceive = 2
Public Const vbMSCommEvSend = 1
Public Const vbMSCommEvCTS = 3
Public Const vbMSCommEvDSR = 4
Public Const vbMSCommEvCD = 5
Public Const vbMSCommEvRing = 6
Public Const vbMSCommEvEOF = 7

Public Const vbMSCommErBreak = 1001
Public Const vbMSCommErCTSTO = 1002
Public Const vbMSCommErDSRTO = 1003
Public Const vbMSCommErFrame = 1004
Public Const vbMSCommErOverrun = 1005
Public Const vbMSCommErCDTO = 1006
Public Const vbMSCommErRxOver = 1007
Public Const vbMSCommErRxParity = 1008
Public Const vbMSCommErTxFull = 1009

[The input button onclick subroutine comes next]
[<]/SCRIPT[>]

[<]SCRIPT ID=EventHandlersVBS LANGUAGE=vbscript[>]
This is the event handler for the control.
Sub MSComm1_OnComm
  Select Case MSComm1.CommEvent
  ' Errors
    Case comEventBreak     ' A Break was received.
    Case comEventFrame     ' Framing Error
    Case comEventOverrun   ' Data Lost.
    Case comEventRxOver    ' Receive buffer overflow.
    Case comEventRxParity  ' Parity Error.
    Case comEventTxFull    ' Transmit buffer full.
    Case comEventDCB       ' Unexpected error retrieving DCB Events
    Case comEvCD           ' Change in the CD line.
    Case comEvCTS          ' Change in the CTS line.
    Case comEvDSR          ' Change in the DSR line.
    Case comEvRing         ' Change in the Ring Indicator.
    Case comEvReceive      ' Received RThreshold # of chars.
'      Call CommandProcessing
    Case comEvSend         ' SThreshold number of characters in the xmit buffer.
    Case comEvEOF          ' An EOF charater was found in the input stream
  End Select
End Sub
[<]/SCRIPT[>]

the subroutine is nearly identical to the one I posted previously except for the input field references. They should be something like this:

document.Track1Data.value

document.Track2Data.value

document.Track3Data.value

each one referring to a textarea input definition in the html