{"id":33,"date":"2017-09-13T22:24:04","date_gmt":"2017-09-13T22:24:04","guid":{"rendered":"http:\/\/www.haxtom.com\/?p=33"},"modified":"2017-09-14T07:50:15","modified_gmt":"2017-09-14T07:50:15","slug":"recube-story-of-cube3-hack-part-2","status":"publish","type":"post","link":"http:\/\/www.haxtom.com\/?p=33","title":{"rendered":"ReCube: Story of Cube3 hack part 2"},"content":{"rendered":"<p>Further hacking work went to step were I had to find how firmware uses cartridges memories. So I check possible text outputs and I have found:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Logs_view.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-35\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Logs_view-300x53.jpg\" alt=\"\" width=\"300\" height=\"53\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Logs_view-300x53.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Logs_view.jpg 575w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Especially this one: &#8220;UpdateCartridgeQntCheckPresent: eWriteCartridgeStatus=%i&#8221; was very promising. Actually all this logs was also visible via UART terminal.<\/p>\n<p>So when I went to function which called this log file, I was sure that one of the called functions there do a memory writing magic:<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/WriteQuantity_function.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-37\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/WriteQuantity_function-300x70.png\" alt=\"\" width=\"300\" height=\"70\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/WriteQuantity_function-300x70.png 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/WriteQuantity_function-768x180.png 768w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/WriteQuantity_function.png 907w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>To understand how reading and writing to secured memory is working I read carefully (few times \ud83d\ude42 ) documentation for DS1963S:<\/p>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Read_auth_page.jpg\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-39\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Read_auth_page-268x300.jpg\" alt=\"\" width=\"268\" height=\"300\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Read_auth_page-268x300.jpg 268w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/Read_auth_page.jpg 676w\" sizes=\"(max-width: 268px) 100vw, 268px\" \/><\/a><\/p>\n<p>It was very hard but crucial to find all responsible functions used during writing of current quantity. Generally printer is using 2 banks of cartridge memory, both have 32 bytes length. Bank 0 consist information about material type, material color and max amount of cartridge. All of this information is additionally secured with special checksum. Bank 1 have only information about current quantity status.<\/p>\n<p>It took me around 1 month to find how to read cartridges memories, 1 week more to find how to write them and 2 month more to find how to calculate checksum. Finally I have constructed ReCube v1, special tool to &#8220;refill&#8221; Cube3 cartridges:<\/p>\n<p><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/IMG_20170912_230732.jpg\"><img loading=\"lazy\" class=\"size-medium wp-image-16 aligncenter\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/IMG_20170912_230732-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/IMG_20170912_230732-300x225.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/IMG_20170912_230732-768x576.jpg 768w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/IMG_20170912_230732-1024x768.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/recube_v1_opened.jpg\"><img loading=\"lazy\" class=\"size-medium wp-image-43 aligncenter\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/recube_v1_opened-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/recube_v1_opened-300x225.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/recube_v1_opened-768x576.jpg 768w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/recube_v1_opened-1024x768.jpg 1024w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>This small &#8220;stick&#8221; is based on Arduino Nano and is able to &#8220;refill&#8221; fully cartridge with just 1-click or much more via UART console. Some short movie showing enhanced possibilities of this device you can find here:<\/p>\n<p><iframe loading=\"lazy\" width=\"680\" height=\"383\" src=\"https:\/\/www.youtube.com\/embed\/1i8q5caeBGY?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>I decided to share Light version of this device and you can find it here:\u00a0<a href=\"http:\/\/adf.ly\/1o9ihC\">RecubeV1<\/a><\/p>\n<p>In given zip you have all needed files, binaries together with KiCad project for PCB board and STL file for cover.<\/p>\n<p>Read carefully Readme.txt file \ud83d\ude09 and if you like it do not forget to donate.\u00a0Paypal Link: <a href=\"https:\/\/www.paypal.me\/tomuro\">Tomuro<\/a><\/p>\n<p>Here is schematic:<\/p>\n<p><a href=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/ReCube_schematic.jpg\"><img loading=\"lazy\" class=\"size-medium wp-image-46 aligncenter\" src=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/ReCube_schematic-300x293.jpg\" alt=\"\" width=\"300\" height=\"293\" srcset=\"http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/ReCube_schematic-300x293.jpg 300w, http:\/\/www.haxtom.com\/wp-content\/uploads\/2017\/09\/ReCube_schematic.jpg 644w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>And part list:<\/p>\n<p>R1, R2 &#8211; 1k<\/p>\n<p>R3 &#8211; 100k<\/p>\n<p>R4 &#8211; 4,7k<\/p>\n<p>D3 &#8211; LSG_T670<\/p>\n<p>SW1 &#8211; micro, tact switch SMD 2,5 mm<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Further hacking work went to step were I had to find how firmware uses cartridges memories. So I check possible text outputs and I have found: Especially this one: &#8220;UpdateCartridgeQntCheckPresent: eWriteCartridgeStatus=%i&#8221; was very promising. Actually all this logs was also visible via UART terminal. So when I went to function which called this log file,&#8230; <\/p>\n<div class=\"read-more navbutton\"><a href=\"http:\/\/www.haxtom.com\/?p=33\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":34,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[8,4,7,3,9],"_links":{"self":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts\/33"}],"collection":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=33"}],"version-history":[{"count":10,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions"}],"predecessor-version":[{"id":49,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/posts\/33\/revisions\/49"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=\/wp\/v2\/media\/34"}],"wp:attachment":[{"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=33"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=33"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.haxtom.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=33"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}