Advertisement
bugblue

Untitled

Jan 13th, 2015
395
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.16 KB | None | 0 0
  1. Dymo LabelManager Wireless PNP protocol
  2. as Dymo has a labelmanager wireless it would be nice to print to it in a very simple way.
  3. How to reverse engineer this protocol:
  4. Create with dymo label 1 label with all letters (A-Z) and numbers (0-9).
  5. Print this label and sniff the network.
  6. Create with dymo label 1 label without letters
  7. Print this label and sniff the network.
  8.  
  9. After printing we get the following:
  10. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  11. 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
  12. 1b 43 00 1b 44 00 16 16 16 16 16 16 16 16 16 16 .C..D...........
  13. 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ................
  14. 16 16 16 16 16 16 16 1b 44 00 16 16 16 16 16 16 ........D.......
  15. 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ................
  16. 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ................
  17. 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ................
  18. 16 16 16 16 1b 42 0e 1b 44 01 16 10 16 1e 1b 44 .....B..D......D
  19. 02 16 1f 80 16 1f e0 16 1f fc 16 1f ff 1b 44 03 ..............D.
  20. 16 03 ff c0 1b 42 0f 1b 44 02 16 ff f8 16 1f fe .....B..D.......
  21. 1b 44 03 16 07 ff c0 16 03 ff f0 16 03 ff fc 1b .D..............
  22. 44 04 16 03 ff ff 80 16 03 f3 ff e0 16 03 f0 7f D...............
  23. f8 16 03 f0 1f ff 1b 44 05 16 03 f0 03 ff c0 16 .......D........
  24. 03 f0 00 ff f8 16 03 f0 00 3f f8 16 03 f0 00 07 .........?......
  25. f8 16 03 f0 00 3f f8 16 03 f0 00 ff f8 16 03 f0 .....?..........
  26. 07 ff f8 16 03 f0 3f ff f8 16 03 f0 ff ff f8 16 ......?.........
  27. 03 f7 ff ff e0 16 03 ff ff ff 80 1b 44 04 16 03 ............D...
  28. ff ff fc 16 07 ff ff f0 16 1f ff ff 80 1b 44 03 ..............D.
  29. 16 ff ff fc 1b 42 0e 1b 44 04 16 07 ff ff f0 16 .....B..D.......
  30. 1f ff ff 80 1b 44 03 16 1f ff fe 16 1f ff f0 16 .....D..........
  31. 1f ff 80 1b 44 02 16 1f fe 16 1f f0 16 1f c0 1b ....D...........
  32. 44 01 16 1e 16 10 1b 44 00 16 16 16 16 16 16 16 D......D........
  33. 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 ................
  34.  
  35. and much more.
  36.  
  37. Time to write this out in lines:
  38. 1b 43 00
  39. 1b 44 00 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
  40. This is the 'A'
  41. 1b 42 0e
  42. 1b 44 01 16 10 16 1e
  43. 1b 44 02 16 1f 80 16 1f e0 16 1f fc 16 1f ff
  44. 1b 44 03 16 03 ff c0
  45. 1b 42 0f
  46. 1b 44 02 16 ff f8 16 1f fe
  47. 1b 44 03 16 07 ff c0 16 03 ff f0 16 03 ff fc
  48. 1b 44 04 16 03 ff ff 80 16 03 f3 ff e0 16 03 f0 7f f8 16 03 f0 1f ff
  49. 1b 44 05 16 03 f0 03 ff c0 16 03 f0 00 ff f8 16 03 f0 00 3f f8 16 03 f0 00 07 f8 16 03 f0 00 3f f8 16 03 f0 00 ff f8 16 03 f0 07 ff f8 16 03 f0 3f ff f8 16 03 f0 ff ff f8 16 03 f7 ff ff e0 16 03 ff ff ff 80
  50. 1b 44 04 16 03 ff ff fc 16 07 ff ff f0 16 1f ff ff 80
  51. 1b 44 03 16 ff ff fc
  52. 1b 42 0e
  53. 1b 44 04 16 07 ff ff f0 16 1f ff ff 80
  54. 1b 44 03 16 1f ff fe 16 1f ff f0 16 1f ff 80
  55. 1b 44 02 16 1f fe 16 1f f0 16 1f c0
  56. 1b 44 01 16 1e 16 10
  57. This is the 'B'
  58. 1b 44 00 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16 16
  59. 1b 44 06 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f ff ff ff ff f8 16 1f 80 03 f0 01 f8 16 1f 80 03 f0 01 f8 16 1f 80 03 f0 01
  60. f8 16 1f 80 03 f0 01 f8 16 1f 80 03 f0 01 f8 16 1f 80 03 f0 01 f8 16 1f 80 07 f8 01 f8 16 1f 80 07 f8 03 f8 16 1f c0 0f fc 03 f8 16 1f c0 1f bf 07 f8 16 1f e0 1f bf ff f8 16 1f f0 7f 1f ff f0 16 0f ff ff 1f ff f0 16 0f ff fe 0f ff e0 16
  61. 0f ff fe 07 ff e0 16 07 ff fc 07 ff c0 16 03 ff f8 01 ff 80
  62. 1b 44 05 16 01 ff f0 00 7e
  63. 1b 42 0f
  64. 1b 44 02 16 ff e0 16 3f 80
  65.  
  66. Mmm that's almost too easy.
  67. 1b 44 00 16 16 16.. is a space, which probably means that 16 is 'newline' and that it feeds to the next line of pixels.
  68.  
  69. Some thoughts:
  70. 1b 44 04 16 03 ff ff 80 16 03 f3 ff e0 16 03 f0 7f f8 16 03 f0 1f ff
  71. ^^ ^^ ^^ ^^
  72. 1b 44 03 16 07 ff c0 16 03 ff f0 16 03 ff fc
  73. ^^ ^^ ^^
  74.  
  75. Thanks, now we know that after 1b 44 the next number gives out how much bytes there are to describe the pixels. It wouldn't be some totally simple pixelart right?
  76.  
  77. Let's test it (only reading the 1b 44 xx lines and splitting every line at byte 16 and than print hex2bin and replace 0 with ' ' for readability):
  78.  
  79. character A:
  80. 1
  81. 1111
  82. 111111
  83. 11111111
  84. 11111111111
  85. 1111111111111
  86. 111111111111
  87. 1111111111111
  88. 111111111111
  89. 1111111111111
  90. 11111111111111
  91. 1111111111111111
  92. 1111111111111111111
  93. 111111 1111111111111
  94. 111111 111111111111
  95. 111111 1111111111111
  96. 111111 111111111111
  97. 111111 1111111111111
  98. 111111 11111111111
  99. 111111 11111111
  100. 111111 11111111111
  101. 111111 1111111111111
  102. 111111 1111111111111111
  103. 111111 1111111111111111111
  104. 111111 111111111111111111111
  105. 111111 1111111111111111111111
  106. 111111111111111111111111111
  107. 111111111111111111111111
  108. 11111111111111111111111
  109. 1111111111111111111111
  110. 1111111111111111111111
  111. 11111111111111111111111
  112. 1111111111111111111111
  113. 11111111111111111111
  114. 11111111111111111
  115. 11111111111111
  116. 111111111111
  117. 111111111
  118. 1111111
  119. 1111
  120. 1
  121.  
  122. there is something funny. It should be aligned a little bit nicer. What does 1b 42 do?
  123.  
  124. 1b 42 0e
  125. [..] leg of 'A'
  126. 1b 42 0f
  127. [..] main body of 'A'
  128. 1b 42 0e
  129. [..] leg of 'A'
  130.  
  131. That would mean that 1b 42 xx is the ident from the left? Let's test it by adding 8 spaces in front:
  132.  
  133. 1
  134. 1111
  135. 111111
  136. 11111111
  137. 11111111111
  138. 1111111111111
  139. 111111111111
  140. 1111111111111
  141. 111111111111
  142. 1111111111111
  143. 11111111111111
  144. 1111111111111111
  145. 1111111111111111111
  146. 111111 1111111111111
  147. 111111 111111111111
  148. 111111 1111111111111
  149. 111111 111111111111
  150. 111111 1111111111111
  151. 111111 11111111111
  152. 111111 11111111
  153. 111111 11111111111
  154. 111111 1111111111111
  155. 111111 1111111111111111
  156. 111111 1111111111111111111
  157. 111111 111111111111111111111
  158. 111111 1111111111111111111111
  159. 111111111111111111111111111
  160. 111111111111111111111111
  161. 11111111111111111111111
  162. 1111111111111111111111
  163. 1111111111111111111111
  164. 11111111111111111111111
  165. 1111111111111111111111
  166. 11111111111111111111
  167. 11111111111111111
  168. 11111111111111
  169. 111111111111
  170. 111111111
  171. 1111111
  172. 1111
  173. 1
  174.  
  175. That's it.
  176.  
  177. To recap:
  178. 1b 43 xx is only at the start, probably some tape identifier.
  179.  
  180. 1b 45 and
  181. 1b 51 are at the end. It will cut after one of these commands. (the wireless PnP is equiped with a autocutter).
  182.  
  183. 1b 42 xx is the ident. For 9mm tape it starts at 0d, as the max tape is 24mm it would be about 0 there. Have to test it.
  184. 1b 44 xx 16 <data> 16 <data> is how to transfer the bitmap and with xx you define the width.
  185.  
  186. That was a nice simple protocol.
  187. Now I can make my embedded stuff print out on those labels in an automated process without installing cups on a 'fat' machine. Thank you Dymo.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement