Code 2: PC Software
The PC software is pretty lame, but it works. It’s written in VB6 and talks to the Teensy as if it were a USB COMM port. So it’s much quicker than a standard COM port, but overall the speed is nowhere near what you’d get if you rewrote it in C or something. If you do, let us know and we’ll post your work.
The present read write speed is as follows:
- 25-30 seconds to read an entire 2MB card
- 75 seconds to erase/write an entire 2MB card.
Which really isn’t that bad considering 4096 10mS page erases would take 40 seconds anyway. Let’s start with an overview of the tool
Fig 8 – The XYRW Software Tool
There’s the screenshot, with the interesting bits numbered. Like most of the tools you get from OS, this one has some low-level debug features you’ll probably never use. But at least you can rip into the code and look at how each crappy function works.
- Open COM button attaches to the Teensy using the USB COM port you fill in next to this button. Or dies ungracefully if no Teensy is found.
- Close COM. Not really needed, but in some cases you can hang stuff if you don’t release your ports.
- COM Indicator. Green if the USB COM port is successfully attached. Red if not.
- Init/Get Status. Gets the DataFlash card status, and clear’s the card’s command buffer. Also clears the tool’s internal memory buffer to all 00′s. Used mostly to see if a card is attached, but the tool also parses out the status value sent back by the card to determine what the size of the DF card is. The Xyron cards usually have an “all good” status of $AC, meaning 2MB in additon to being all good.
- The number of pages parsed out of the status byte
- The bytes per page parsed out of the status byte.
- Get the page designated in the text box next door, and stick it in the proper location in the tool’s internal buffer.
- Buffer Status. Red if blank, green if even a single page has been retrieved.
- GET ALL. Probably your most common usage. Counts from 0 to the number of pages designated by the status, and fetches each one in turn. You can watch the page count and status bar update. The BREAK button stops the fetch, keeping the data in memory that’s already been fetched. Get status again to clear the internal buffer.
- Writes entire buffer to the file designated, even if it’s only holding one page and is 2MB of 00′s.
- Loads the file to the tool’s buffer, overwriting anything that’s already there.
- Writes the specified page from the tool’s buffer to the DataFlash Card. First, the page (and only that page) is erased. Then the data is loaded and flashed to that page only.
- WRITE ALL. Your other most common usage. Steps through each page in the buffer and writes them all to the DataFlash. Break interrupts the writing process, leaving all completed pages as-is.
There you have it. Very basic stuff.
We’d love to develop a full-featured “card editor” tool, where you can just drag & drop your pics right in, but we’ve still got to figure out the format of the cards. In order to do THAT, we needed some low-level tool in order to do test reads and writes. So here it is.
At this point, you’ve endured enough punishment to earn your reward. The schematic and PCB layout are above, and here’s the source and executables for each of the software tools.
Teensyduino Sketch and Precompiled Hex File for the Reader Firmware
VB6 Project and Executable of XYRW Read/Write Tool
Of course, the Teensyduino sketch could be ported to the big boy WINAVR version with relative ease. The XYRW tool would need to be rewritten entirely to port to C or .NET, but it’s a chore that can be left to the future when we have some greater abilities with the device.
As we mentioned, the next task is to determine the format of the data on the card. All of you are welcome, of course, to take a crack at it. The email for this project is XDR at openschemes dotcom if you’d like to get in touch or contribute.
If you have any Xyron cards, you can easily read them in and begin investigating with a hex editor. Our final gift to you (for those who don’t have an XDR but just love hex) is a couple of bin files from a test card we’ve made. A blank card simply contains all $FF’s, so that’s not interesting. What we’re posting here are two card images written with the chalkboard font and several test phrases.
The first test image has 56 enties: First, each capital letter saved as it’s own entry, then A-Y (Z wouldn’t fit – too long), then each lowercase letter as it’s own entry, then a-z in lowercase. Finally, two test messages: The first in CAPS, the second in LOWERCASE. Hax0r respect goes out to the first one to decode the test messages, as evidenced by your posting it in a comment. Extra 733t points if you can link to an image rendering the test messages – remember folks, we believe we are looking for black & white bitmaps. BTW – The space reported by disc maker is 106/215 blocks remaining.
The second test image will help decode the FAT table. First, there are ten entires containing only the capital letter “A” in increasing lengths in Chalkboard Font. For example: A, AA, AAA… Next, the same sequence using Distressed Font. Finally, three random pics from the “Starter Disc”, #5, 15, and 34 – chosen for their variable length, and named “e”, “o”, and “H” due to the weird way they are indexed by the Disc Maker. The remaining space on test image 2 is reported as 122/215.
Here are the Openschemes Xyron Test Discs
These test discs are made by us, they are not Xyron discs. However, they do contain images and artwork from Xyron so if they ask us to take them down, we will. Hopefully it should not take long to decode the disc format and begin generating our OWN stuff in an awesome printing frenzy. Personally, we just wanted a way to datestamp lab notebooks, and look where that got us.
Until next time – happy scheming!






I spent a few hours today looking into the image format.. I cheated to discover the message, its in plain text at the end of the file. I assume the letters are mapped to the corresponding letter in the font which would explain why it was readable.
I couldnt quite figure out the FAT table, but I found two that look quite similar. One at the very beginning, starting after the first 4 bytes. (set your hex editor to show 14 bytes across and you’ll see the pattern). Then, after the initial bunch of FFs and 00s, you’ll see a bunch more series of bytes with a repeating 20 FF, then the chars “SAVE”. I believe this marks the end of the FAT.
Beginning immediately afterwards is some bitmap data. I couldnt quite figure out the stride.
I did discover the preview images, which are stored with 13 leading and trailing FFs, in a 104 x 31 PBM-type format (1 bit per pixel, left to right, top to bottom).
Before the preview image is what the message looks like in the keyboard tool, like “54. abcdefghijkl”.
I assume the actual bitmap begins immediately after the preview image, but again, I was not able to figure out the interleave or stride.
-David
Hey, very nice work! We also spent some time working out the FAT (XAT?) table, the results are posted on the main page. And we agree, the actual bitmap data must be interleaved somehow. Our best guess so far is that it’s a variable number of columns, to make the data transfer between the card and printer driver easy – as you know, it prints from side to side so physically it seems as if it’s just dumping vertical print data to the print head as the X-axis is incremented
The secret messages are
“xxx xxxx xxxxxxx xxx xxxxxx xx xx” and
“xxxxx xxx xxxxxx”
Top work, David! The real prize is rendering these messages as a bitmap. It looks like it will be a race between us!
Also, using “strings” on the executable for the xdr program reveals an embedded copy of ImageMagick (hmm I don’t see the required copyright notice….).. I’d be willing to be their image format is one of those supported by IM.
The actual bitmap that is printed seems to be interleaved is my best guess. Try as I might to figure out the stride I can’t get anything sensible; but it’s clearly a regular pattern.
I note also that IM does have an interleave command, which would be convenient.
[...] (6) Site Sponsors Recent Commentsopenschemes on Hacking the Xyron Design Runner Chapter 1: Homebrew USB Card Reader/WriterDavid M. on Hacking the Xyron Design Runner Chapter 1: Homebrew USB Card Reader/WriterDavid M. on [...]
Anyone noticed the free xyron programming software from printdreams.com?
It’s mentioned in the article. XDR PC-Link. BTW, it saves as bitmap images and does not interleave the data until (presumably) it xfer’s to their reader. So it’s no help in decoding the image format, but is a nice target for what a good open source project should be able to do.
As the owner of a XDR and noticing that they are appearing to discontinue the item in the stores (no ink cartridges, clearances on the discs, etc), I would really appreciate any more information on the aforementioned “reader” for the PC link software… as in how to avoid having to buy one! Also, if there is an ink jet cartridge out there that is compatible to the one the XDR uses. I’ve read this thread and the one on “space” and will continue to check in to see if you brilliant minds have made more progress! Thanks!
Well we sure hope to give you what you want to know. Our reader is based on Teensy, but is probably compatible with any Atmega Arduino clone. As for the inkjet cart – you’ve got the right idea.. It costs an arm and a leg and will certainly kill this device if it’s completely discontinued.
What we do know is that the inkjet hardware in the XDR is made by Lexmark. So we are hoping that it’s some sort of standard Lex cartridge.. But short of buying every one we can find and looking at them, we’ve got no ideas on how to determine if a suitable replacement exists..
hhmmm.. I have a lexmark printer… I’ll check to see if that cartridge fits and let you know. Thanks for that information!
Did the lexmark ink cart fit?
really wanted to write down a small mgssaee in order to thank you for some of the wonderful techniques you are giving at this website. My rather long internet look up has at the end been paid with awesome content to exchange with my company. I would point out that many of us website visitors actually are undoubtedly lucky to be in a notable network with so many marvellous people with valuable pointers. I feel very privileged to have discovered your entire website page and look forward to so many more excellent moments reading here. Thanks a lot once more for all the details.
pls i”ll like to know how i can get this product for buying . i based in nigeria. and i have a demand for an orget installation,thanks
The printer? Amazon. Teensy? PJRC.com
How is the crafts industry in Nigeria, anyway? All I ever hear is that it’s filled with rich princes who simply can’t get their money out.
Just bought a XDR on clearance and am finding out fast that the ink cartridges are scarce & expensive. Was anyone ever able to determine if there was a Lexmark cartridge that is interchangable?
We never got a chance to properly research it, actually. If you get a chance to look in to it, it would sure help everyone if you could post your findings!
Hi, I hope this isn’t too late to help people. After doing some research, I have found that the ink for the XDR is a *slightly* modified Lexmark 32/34 (the only difference between 32 and 34 is the initial ink level from the factory…34 has more). I figured this out by comparing the shape, size, pattern and holes under the label, and the design of the contact pads on the back to images of different lexmark cartridges I found on the internet.
The modification is in the tabs that stick up from the bottom of the top the cartridge (that sounds confusing, just look at a cartridge or find an image, its obvious – they are the only protruding things on the top of the cartridge). The standard lexmark cartridge has two tabs that are next to each other, but the left tab on the XDR cartridge is offset by a few millimeters.
This is not a big deal – you will need to do one of two things: 1) file down/cut the offset tab off your new ink cartridge or 2) carefully file down/cut the piece of plastic blocking the insertion of a standard cartridge inside your XDR
Alternatively, the standard lexmark 32/34 cartridges are very easy to refill, and refill kits cost less than a new off brand cartridge. This means the XDR catrdige should be just as easy. I took the label off mine, and all the refill holes are right where they should be. Just google “refill lexmark 32″ and you’ll find numerous pages explaining how to do it. It is possible that the XDR cartridges are designed to NOT be refillable – I am not sure.
I have not confirmed this info yet. I currently have a half full XDR cartridge, and I ordered a generic “compatible” lexmark 32 cartridge and a refill kit today. I could be wrong – its possible the XDR uses different software or another method to detect rouge cartridges, but I don’t think so.
I am planning on using the XDR a lot, so I should know about refill-ability soon. As soon as the new cartridge arrives, I’ll file off the left tab and see if it works. I’ll make a new post with my results.
One last thought – lexmark does not make single color cartridges like this. I think the color ones (red and green) were custom made for the XDR. Assuming both the new cartridge as well as refilling XDR methods work, this means to get color you’ll either need to buy 1 original XDR color and keep refilling it, or take your chances refilling a black cartridge with color ink (bleh). I am pretty sure the color cartridges won’t work (although I don’t know) – I think their contacts on the back and computer chips on the inside are different.
Thanks for this blog! This is what inspired me to dig out my XDR again and start fiddling!