I took a look at the Mag Tek
Programming Reference Manual , which seems to only contemplate Windows. If that's acceptable to you, then it seems that you will be talking to the device either as a special file or as a COM port.
In the file case, you would probably open the device/file on two channels, one for output and one for input, although I'm not completely certain how well that will work. (A-ShellBASIC doesn't have a file access mode for a bidirectional stream.)
In the COM port case, you would probably want to use
COMIO.SBR . (There is a sample/demo program for it in the 908054 directory of the
EXLIB Repository .)
Assuming that the application is really running in the Linux environment, you'd have to implement the interface either as an SBX that can be called by ATE, or as a service running on a PC that can be accessed by any job on the server. The former scheme seems appropriate if each ATE workstation has it's own mag reader, while the latter would make more sense if a mag reader might be shared by several workstations.
For examples of SBXs called via ATE, see the 907033 directory of the
SOSLIB Repository . Also, check out the
Fn'ATE'SBX() function in the 907010 directory (aka SOSFUNC:) which simplifies calling an SBX remotely via ATE, including syncing the SBX if necessary.
In the case of a service, you'd probably implement it using TCP, i.e. the application on the Linux server would connect to the service via TCP to request a mag read. The service would communicate with the device via the file or serial interface, and respond back to the application via TCP. There are several examples of such TCP "servers" (minus the mag reader part) in the 908025 directory of the EXLIB.
As for the actual commands to control the reader, according to the manual it seems fairly straightforward. Essentially you send it text-based commands to set the configuration and request various operations, including reading a card. And you read back the text-based responses.
Sounds like a fun project! Then again, chances are that the result would be usable by others, more or less as is. So if someone has already implemented such an SBX or server, or has a similar interest, it would be a shame for each to have to develop it separately. If you don't have time to take it on yourself, there might be someone out that willing to take it on as a project for hire. (Maybe even us.)