How do I get the magic number from a label printer?

I tried sending the status to the printer but, not surprisingly, it failed.