326

Re: DaVinci Junior cartridge reset

I have noticed one thing that I find interesting.  On a lot of the spool dumps you will see this pattern.  I happened to notice this because the nature spool that CRGPH posted his dump of had these same bytes...  so different spool, different printer, same byte pattern.

spoolLen[]={0xAB, 0x41, 0x01, 0x00};  // Length OFC.
page21[]={0xE3, 0x53, 0x33, 0x54};    // Byte 4 is always 0x54
page22[]={0x25, 0x4D, 0xE1, 0xCE};   // Byte 4 is always 0xCE
page23[]={0xBF, 0xBC, 0x49, 0x76};   //  Byte 4 are always 0x76

Even better byte position 3 seems to encode spool color and/or length.  CRGPH's nature spool had 0x33, 0xE1, and 0x49 in the third byte position, same as my 100m nature spool.  To one up that both of CRGPH's 200m Green spools had byte position 3 reading 0x31, 0xE0, 0x4F.

So that gets us taken care of 6 of the 12 bytes that could checksum the length of the remaining spool.

So we are only looking at bytes 1-2 of pages 21-23 to hash the remaining length.  If we can get a few more dumps posted we may see other similar patterns start to show up.

-Cecil

327 (edited by crcasey 2016-01-23 05:55:07)

Re: DaVinci Junior cartridge reset

Oh one other thing, both of CRGPH's unused 200m rolls had the same EXACT checksums for 200m of filament left (ie 0x030d40 total with 0x030d40 on the spool).

This is also great news, because that means that no identifying number is used in the checksum of a spool.

So any spool could be reset to be 200m factory fresh by writing:

//PAGE 08: 5A 50 50 00
//PAGE 09: 00 35 34 54
PAGE 10: 40 0D 03 00
PAGE 11: 40 0D 03 00
PAGE 20: 40 0D 03 00
PAGE 21: 08 1F 31 54
PAGE 22: 50 B1 E0 CE
PAGE 23: 52 E7 4F 76

After looking a bit closer it may be that code pages 8 and 9 might need to be written as well.  They seem to encode the Color/Length information as well.  I will try both ways tomorrow.

The problem is you still have to figure out the RFID chip password to write this data (Just checked, yes you have to have the password to write).  That meens still snooping the I2C data to get the unlock code.

But it's good for what it is.

-Cecil

328

Re: DaVinci Junior cartridge reset

Well, it worked.

Here is my factory 'natural' spool written with the above code pages, including pages 8 and 9.  I have still not verified that they are needed, but they do no harm.

http://soliforum.com/i/?uUwgdrH.jpg

http://soliforum.com/i/?7t7UTmc.jpg

http://soliforum.com/i/?MuawY7Y.jpg

So there you go folks, any spool can be set back to 200m of 200m.

329

Re: DaVinci Junior cartridge reset

Here is my origional spool, loaded up to be 200m Green.

Hello!
Found chip PN532
Firmware ver. 1.6
Waiting for an ISO14443A Card ...
Found an ISO14443A card
  UID Length: 7 bytes
  UID Value: 0x04 0x01 0x2D 0x22 0x97 0x3C 0x81

Seems to be an NTAG2xx tag (7 byte UID)
PAGE 00: 04 01 2D A0  ..- 
PAGE 01: 22 97 3C 81  "—<�
PAGE 02: 08 48 00 00  .H..
PAGE 03: E1 10 12 00  á...
PAGE 04: 01 03 A0 0C  .. .
PAGE 05: 34 03 00 FE  4..þ
PAGE 06: 00 00 00 00  ....
PAGE 07: 00 00 00 00  ....
PAGE 08: 5A 50 50 00  ZPP.
PAGE 09: 00 35 34 54  .54T
PAGE 10: 40 0D 03 00  @...
PAGE 11: 40 0D 03 00  @...
PAGE 12: D2 00 2D 00  Ò.-.
PAGE 13: 54 48 47 42  THGB
PAGE 14: 30 31 38 36  0186
PAGE 15: 00 00 00 00  ....
PAGE 16: 00 00 00 00  ....
PAGE 17: 34 00 00 00  4...
PAGE 18: 00 00 00 00  ....
PAGE 19: 00 00 00 00  ....
PAGE 20: 40 0D 03 00  @...
PAGE 21: 08 1F 31 54  ..1T
PAGE 22: 50 B1 E0 CE  P±àÎ
PAGE 23: 52 E7 4F 76  RçOv
PAGE 24: 00 00 00 00  ....
PAGE 25: 00 00 00 00  ....
PAGE 26: 00 00 00 00  ....
PAGE 27: 00 00 00 00  ....
PAGE 28: 00 00 00 00  ....
PAGE 29: 00 00 00 00  ....
PAGE 30: 00 00 00 00  ....
PAGE 31: 00 00 00 00  ....
PAGE 32: 00 00 00 00  ....
PAGE 33: 00 00 00 00  ....
PAGE 34: 00 00 00 00  ....
PAGE 35: 00 00 00 00  ....
PAGE 36: 00 00 00 00  ....
PAGE 37: 00 00 00 00  ....
PAGE 38: 00 00 00 00  ....
PAGE 39: 00 00 00 00  ....
PAGE 40: 00 00 00 BD  ...½
PAGE 41: 07 00 00 08  ....
PAGE 42: 80 05 00 00  €...
PAGE 43: 00 00 00 00  ....
PAGE 44: 00 00 00 00  ....

-Cecil

330

Re: DaVinci Junior cartridge reset

Pages 8,9,13,14 do encode color and material. I have a 200m full white spool, 190m red, 140m black and 20m nature. I was able to take pages 20,21,22,23 from the white and write to the red which now reads 200 of 200m and still says it is red. The black on the other hand will not let me do that, it reads "unrecognized". I have not had time to explore it. (Dang this last semester of college!) I'll post my 4 spools for you to look at.

331 (edited by Alien_Ant_Farm 2016-01-23 17:40:44)

Re: DaVinci Junior cartridge reset

White Filament
Pass: B4 A4 13 E1

UID Value: 0x04 0xFC 0xEB 0x32 0xB4 0x42 0x80

Seems to be an NTAG2xx tag (7 byte UID)
PAGE 00: 04 FC EB 9B  .üë›
PAGE 01: 32 B4 42 80  2´B€
PAGE 02: 44 48 00 00  DH..
PAGE 03: E1 10 12 00  á...
PAGE 04: 01 03 A0 0C  .. .
PAGE 05: 34 03 00 FE  4..þ

PAGE 08: 5A 50 57 00  ZPW.
PAGE 09: 00 35 41 4D  .5AM
PAGE 10: 40 0D 03 00  @...
PAGE 11: 40 0D 03 00  @...
PAGE 12: D2 00 2D 00  Ò.-.
PAGE 13: 54 48 47 42  THGB
PAGE 14: 30 32 36 38  0268

PAGE 17: 34 00 00 00  4...

PAGE 20: 40 0D 03 00  @...
PAGE 21: 08 1F 31 54  ..1T
PAGE 22: 50 B1 E0 CE  P±àÎ
PAGE 23: 52 E7 4F 76  RçOv

332

Re: DaVinci Junior cartridge reset

Red
Pass: 18 F4 E1 C4

UID Value: 0x04 0x6B 0x70 0x22 0x9A 0x3D 0x80

Seems to be an NTAG2xx tag (7 byte UID)
PAGE 00: 04 6B 70 97  .kp—
PAGE 01: 22 9A 3D 80  "š=€
PAGE 02: 05 48 00 00  .H..
PAGE 03: E1 10 12 00  á...
PAGE 04: 01 03 A0 0C  .. .
PAGE 05: 34 03 00 FE  4..þ

PAGE 08: 5A 50 32 00  ZP2.
PAGE 09: 00 35 42 44  .5BD
PAGE 10: 40 0D 03 00  @...
PAGE 11: 40 0D 03 00  @...
PAGE 12: D2 00 2D 00  Ò.-.
PAGE 13: 54 48 47 42  THGB
PAGE 14: 30 30 38 34  0084

PAGE 17: 34 00 00 00  4...

PAGE 20: 66 F5 02 00  fõ..
PAGE 21: 2E E7 30 54  .ç0T
PAGE 22: 7E 99 E0 CE  ~™àÎ
PAGE 23: 78 CF 4F 76  xÏOv

333

Re: DaVinci Junior cartridge reset

Black
Pass: F6 0A B4 89

UID Value: 0x04 0x75 0xD2 0x22 0x9A 0x3D 0x80

Seems to be an NTAG2xx tag (7 byte UID)
PAGE 00: 04 75 D2 2B  .uÒ+
PAGE 01: 22 9A 3D 80  "š=€
PAGE 02: 05 48 00 00  .H..
PAGE 03: E1 10 12 00  á...
PAGE 04: 01 03 A0 0C  .. .
PAGE 05: 34 03 00 FE  4..þ

PAGE 08: 5A 50 4B 00  ZPK.
PAGE 09: 00 35 34 52  .54R
PAGE 10: 40 0D 03 00  @...
PAGE 11: 40 0D 03 00  @...
PAGE 12: D2 00 2D 00  Ò.-.
PAGE 13: 54 48 47 42  THGB
PAGE 14: 31 33 36 32  1362

PAGE 17: 34 00 00 00  4...

PAGE 20: 98 25 02 00  ˜%..
PAGE 21: D0 37 30 54  Ð70T
PAGE 22: 08 A9 E1 CE  .©áÎ
PAGE 23: AA 98 48 76  ª˜Hv

334 (edited by Alien_Ant_Farm 2016-01-23 17:43:29)

Re: DaVinci Junior cartridge reset

Clear (Nature)
Pass: 77 78 4E E7

UID Value: 0x04 0x7A 0x61 0x22 0x97 0x3C 0x81

Seems to be an NTAG2xx tag (7 byte UID)
PAGE 00: 04 7A 61 97  .za—
PAGE 01: 22 97 3C 81  "—<?
PAGE 02: 08 48 00 00  .H..
PAGE 03: E1 10 12 00  á...
PAGE 04: 01 03 A0 0C  .. .
PAGE 05: 34 03 00 FE  4..þ

PAGE 08: 5A 50 5A 00  ZPZ.
PAGE 09: 00 35 34 50  .54P
PAGE 10: A0 86 01 00   †..
PAGE 11: A0 86 01 00   †..
PAGE 12: D2 00 2D 00  Ò.-.
PAGE 13: 54 48 47 42  THGB
PAGE 14: 30 39 39 36  0996

PAGE 17: 34 00 00 00  4...

PAGE 20: 0C 4E 00 00  .N..
PAGE 21: 44 5C 32 54  D\2T
PAGE 22: 84 71 E2 CE  „qâÎ
PAGE 23: 1E A0 4A 76  . Jv


Sorry for the mass of post everyone. Keep in mind these are the original read states of my card. I did not edit these. Excluding 0x00 pages and 40 and 41

335 (edited by crcasey 2016-01-23 23:16:23)

Re: DaVinci Junior cartridge reset

Alien_Ant_Farm wrote:

Pages 8,9,13,14 do encode color and material. I have a 200m full white spool, 190m red, 140m black and 20m nature. I was able to take pages 20,21,22,23 from the white and write to the red which now reads 200 of 200m and still says it is red. The black on the other hand will not let me do that, it reads "unrecognized". I have not had time to explore it. (Dang this last semester of college!) I'll post my 4 spools for you to look at.

While I agree that 8 and 9 have to do color coding, and likely material, we have never seen anything factory but PLA so it would be unwise to say the second.  On the other hand 13 is a static value for every spool, and since we know that 14 is not used in any way to checksum the length it can be safely ignored.

My theory on 14 is that it may be coding a lot or batch number.  I am thinking this as we saw in the original dumps the two spools of unused 200m green had different coding in 14.  My other thought is that it could code the temp for the hot end.

So to code the color you have to update 8,9 and byte 3 of 21,22,23.  If you don't code the color change in both places at the same you could well end up 'unrecognized'.

So if you clone 8-11 and 20-23 any spool can become any other spool.  So it looks like if we build a library of these pages from unused spools we can reload as we please.

For myself- being able to reset my chip to 200 of 200, and who cares what color the printer thinks it's using -is all I need to do.  I am calling this solved and ordering me some 'open source' PLA.

-Cecil

336

Re: DaVinci Junior cartridge reset

crcasey wrote:
Alien_Ant_Farm wrote:

Pages 8,9,13,14 do encode color and material. I have a 200m full white spool, 190m red, 140m black and 20m nature. I was able to take pages 20,21,22,23 from the white and write to the red which now reads 200 of 200m and still says it is red. The black on the other hand will not let me do that, it reads "unrecognized". I have not had time to explore it. (Dang this last semester of college!) I'll post my 4 spools for you to look at.

While I agree that 8 and 9 have to do color coding, and likely material, we have never seen anything factory but PLA so it would be unwise to say the second.  On the other hand 13 is a static value for every spool, and since we know that 14 is not used in any way to checksum the length it can be safely ignored.

My theory on 14 is that it may be coding a lot or batch number.  I am thinking this as we saw in the original dumps the two spools of unused 200m green had different coding in 14.  My other thought is that it could code the temp for the hot end.

So to code the color you have to update 8,9 and byte 3 of 21,22,23.  If you don't code the color change in both places at the same you could well end up 'unrecognized'.

So if you clone 8-11 and 20-23 any spool can become any other spool.  So it looks like if we build a library of these pages from unused spools we can reload as we please.

For myself- being able to reset my chip to 200 of 200, and who cares what color the printer thinks it's using -is all I need to do.  I am calling this solved and ordering me some 'open source' PLA.

-Cecil

Agreed! I think material has to be coded somewhere to be open to ABS in future printers with nfc filament tags and the temp maybe on there but I think that has to do with color and is calculated internally (ex: white stock for me is 212 while all my other filaments have been 191).
I am not really following this thread for myself because I can now use my tags indefinitely but really want to find a solution for people who do not have an analyzer to capture the passwords. What analyzer did you use? Has anyone tried the Bus Pirate again with good results?
Also has anyone tried printing with ABS or added a hot bed?

337

Re: DaVinci Junior cartridge reset

I just got the Jr. for xmas, so a total noob at 3D printing, but familiar with G-Code on my homebrew CNC.  Anyway, congratulations to crcasey and Alien_ant_farm for the progress and status!   Is there and 'easy' list of parts and programming needed to accomplish the 200m reset?

ex:
1. get part (nfc reader)
2. use arm/arduino/etc to push code to nfc
3. Print like a free man/person.

I am sure everyone would appreciate a nice writeup or howto on this process.  Thanks again!

338

Re: DaVinci Junior cartridge reset

Also in for a how to and what to buy I have a chip that needs reprogramming.

339

Re: DaVinci Junior cartridge reset

crcasey wrote:

Well, it worked.

Here is my factory 'natural' spool written with the above code pages, including pages 8 and 9.  I have still not verified that they are needed, but they do no harm.

http://soliforum.com/i/?uUwgdrH.jpg

http://soliforum.com/i/?7t7UTmc.jpg

http://soliforum.com/i/?MuawY7Y.jpg

So there you go folks, any spool can be set back to 200m of 200m.

can you list what equipment i need (do no care about the cost) and steps to do it

thanks

340 (edited by crcasey 2016-01-24 05:36:24)

Re: DaVinci Junior cartridge reset

wingnutmedia wrote:

I just got the Jr. for xmas, so a total noob at 3D printing, but familiar with G-Code on my homebrew CNC.  Anyway, congratulations to crcasey and Alien_ant_farm for the progress and status!   Is there and 'easy' list of parts and programming needed to accomplish the 200m reset?

ex:
1. get part (nfc reader)
2. use arm/arduino/etc to push code to nfc
3. Print like a free man/person.

I am sure everyone would appreciate a nice writeup or howto on this process.  Thanks again!


The first thing you need to do is open the left side of your printer, this will give you access to the NFC reader board.  The on board micro controller uses 400KHz I2C to talk to this chip.

The bus pirate is not fast enough and does not have a deep enough buffer to capture the password on the NFC chip.  Saleae logic 4 is about the cheapest logic analyser you would buy, there may be some knock off's of this product.

With that in hand you use the pin out Crgpgh posted to grab the two channels of clock and data.

Pin 2 - Ground
Pin 5 - Data
Pin 6 - Clock

Hook it up, start the logic capture, power up the printer.  In about 10 seconds the capture is done, use the logic software to decode the I2C and search for the value 1B in the data streem.  The following 4 returned bytes are the NFC chip password.  I2C has to do two writes to get a read back, don't get confused.

Now you need an NFC writer, I think the people that have captured dumps here are all using an arduino and the Adafruit NFC shield.  Splicing in Crgpgh's password authentication patch into the Adafruit library.
If you don't know C, this may be beyond your range.

Next you modify the example reader sketch to send the password to the chip, and read and dump the contents of your spool chip.
1
Finally you use a sketch to write the blocks you want back to the RFC chip.  The blocks you want are 8-11 ykamlsand 20-23.  Replacing those blocks from any spool with any other set from another spool will let you clone it.

It may not be as simple as you would wish, but I am sure we could post the hacked library and the sketches somewhere.

Good luck, maybe someone will figure out how to decode the password from the unprotected blocks, then someone could just write a smartphone spool reset program.  In the mean time this is the hack.

Finally, the more unused spools we dump the larger the set of 'blanks' we can clone from.  So sniff those new spools of PLA, once you know what they smell like, read the chip and post the data here.  The last reason to dump the fresh spool is that it fixes one variable of the encryption hash of the length to a known number.  To put it another way, it would greatly simplify hunting for the keys to not need a I2C logic  sniffer.

Let me be clear here i am not the source of this hack the 1B hack was prior work of another hacker.

Thanks!

-Cecil

341 (edited by crcasey 2016-01-24 03:15:37)

Re: DaVinci Junior cartridge reset

Here is a dump of the hacked adafruit library and a couple of code examples, one read, one write.

Don't blame me for how ugly it is.  I just wanted it working.

-C

Post's attachments

Hacked_Lib_CodeEx.zip 62.7 kb, 77 downloads since 2016-01-24 

You don't have the permssions to download the attachments of this post.

342

Re: DaVinci Junior cartridge reset

Thank you both for posting all of that great information. I was looking for both pieces of that since I am a beginner in all of this stuff. I think with that I should be able to make some progress.

343

Re: DaVinci Junior cartridge reset

Cecil,
Thanks for the code library.  I have a couple arduino laying around and I grabbed the Ardifruit NFC from the local Microcenter.  I ordered an ebay generic Saleae 24Mhz 8ch analyzer and will wait for that to arrive.  I will post after I get it all up and going.

344 (edited by crcasey 2016-01-24 05:42:57)

Re: DaVinci Junior cartridge reset

Well the trick on the library was only to add the function to the header file.

Then you are not going to get this to compile whthout that in the right place.

Get C 101.

-C

345

Re: DaVinci Junior cartridge reset

The files have been configured to using the adafruit reader/writer in the shield configuration mostly for the uno.

If that is not how you are accessing that chip you will need to re-comment some lines in the file.

-C

346

Re: DaVinci Junior cartridge reset

Bozotclown1970 wrote:

Thank you both for posting all of that great information. I was looking for both pieces of that since I am a beginner in all of this stuff. I think with that I should be able to make some progress.

I hope it helps us all.  That is the way it works.  Each building on the other.

347

Re: DaVinci Junior cartridge reset

Is this logic sniffer acceptable for this application?

http://www.aliexpress.com/snapshot/7265 … 8109899508

348

Re: DaVinci Junior cartridge reset

wingnutmedia wrote:

Cecil,
Thanks for the code library.  I have a couple arduino laying around and I grabbed the Ardifruit NFC from the local Microcenter.  I ordered an ebay generic Saleae 24Mhz 8ch analyzer and will wait for that to arrive.  I will post after I get it all up and going.


Its not mine, it comes from Adafruit and our fellow hackers here.  I didn't do any thing new.

I did look at old dumps and find where we could copy things place to place without breaking the internal software, but I believe that more will come with dumps of unused spools.

-C

349 (edited by crcasey 2016-01-24 07:24:13)

Re: DaVinci Junior cartridge reset

greatone76 wrote:

Is this logic sniffer acceptable for this application?

http://www.aliexpress.com/snapshot/7265 … 8109899508

Yes it works, I would say so, but you are using their software, that sends code to that chip to do what you want. 

A side donation to them may be a good idea.

K here it is.  A lot of third source hardware is available, but it needs the host software to make what we want done, well done.

And a lot of the third sources of hardware are hurting the software developers of this logic sniffer software.

Send them a buck or two if you find you save it on spools.

Strangely they will not let us do that at this time.  If they change this I will update you all on this post.

Give back, if you can.

Now more than Enough preaching.

-C

350

Re: DaVinci Junior cartridge reset

Attacking the problem from a different point of view. I know someone earlier had discussed emulating the pn512 Chip. At this point we have all sorts of images for the rfid chips, so what if we did the emulation? Apparently the Atmel will do 400Khz I2C (http://forum.arduino.cc/index.php?topic=16793.0) We have the communication protocols for the pn512 (https://www.nxp.com/documents/data_sheet/PN512.pdf)  I haven't seen what Address the pn512 is at on the i2c bus but I'm sure that has been sniffed already. Soooo, (and I am slowly trying to get all this together myself) given all the chip info we have already, how about programming an atmel (arduino) to respond as the pn512 with specifically the data we want it to? Better yet tie in a Bluetooth interface so you can hide the whole mess inside the Junior and make changes with your smart phone? Some additional benefits could be, presenting different UID's to the Junior and collecting all the passwords so you can get the password for a chip without having to ever read it except from your nfc reader on your phone, or if someone would like to know the passwords for their chip. Maybe I'm insane, but does it sound feasible to anyone else?