1 (edited by rhys 2018-02-27 12:33:46)

Topic: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

http://soliforum.com/i/?ZkbtiBb.jpg
Background

One of my many hobby projects over the last couple of months has been implementing the emulating of the PN512 and NTAG213 layers on a PIC32 micro controller And also designing a board that’s a drop in replacement for the existing reader board.

It works!! I've been using this with my printer for a number of weeks and so far all good.

this project consumed many hours like any complex project I encountered my fair share of software bugs, I ended up developing specific tooling to simulate the printer (by replaying capture logs) in order to find and fix some odd issues I encountered.

this was a hobby project likely all my hobby projects this was designed by me for me if people want to buy the PCB that’s just a bonus smile so just putting out there that this exists as an option.

python based tool/module for reading  and writing to the emulated tag can be found here

https://github.com/rhysbryant/readerEmulatorClient.

hardware (assembled PCBs) are available for purchase at the following Online store
https://voltprojectsstore.ecwid.com


So if anyone is interested in this project let me know

Update

board version 2 now available at above store link

One touch UID cycling, simply hold a magnet with in about 1 cm of the board until the led starts flashing to cyclic the tag's UID. and remaining filament. see store for full details

Post's attachments

vNTagReader.zip 8.03 kb, 160 downloads since 2017-11-06 

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

2

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

Very interesting project.  I too have wanted to eliminate all the pn532 type cards and simulate the NTAG213 directly.
Not have the ability to do that, I used the EMUtag, but created a tag data management system that will create the tag data , mark it as used in the database.  Using an android phone, transfer it to the emutag.  My solution runs on a raspberry pi that is connected in my printer.  Put the two solutions and there is a complete solution.

Your system sounds great.  What OS is your tag utility written for?  You said 'buy' it, exactly what are you looking for and what is provided.  Is any open source or open hardware?

3 (edited by rhys 2017-07-29 10:02:00)

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

The tag utility GUI is .net based I've only used it on windows but using mono It may be possible to compile it for other platforms.

I'm creating a command line utility that will be compatible with all platforms, written in golang.

I'm thinking I'll open source the utilities but that this stage not the emulator it's self.

I will sell fully a assembled PCBs with two versions available USB only (no ESP12e module) and USB+WIFI (includes ESP12e module).


Cost would be round the same as EMUtag with Wifi(ESP12e module) and without round $15 cheaper (this covers the time required to flash the ESP12e and cost of the module).

4 (edited by rhys 2017-07-29 12:02:23)

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

mjf55 wrote:

I used the EMUtag, but created a tag data management system that will create the tag data , mark it as used in the database.  Using an android phone, transfer it to the emutag.  My solution runs on a raspberry pi that is connected in my printer.  Put the two solutions and there is a complete solution.

Your tag data management system sounds interesting is this project open source or available somewhere? I would be happy to help add support for my Emulator.

5 (edited by mjf55 2017-07-30 02:18:07)

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

rhys wrote:
mjf55 wrote:

I used the EMUtag, but created a tag data management system that will create the tag data , mark it as used in the database.  Using an android phone, transfer it to the emutag.  My solution runs on a raspberry pi that is connected in my printer.  Put the two solutions and there is a complete solution.

Your tag data management system sounds interesting is this project open source or available somewhere? I would be happy to help add support for my Emulator.

Yes, I have not fully announced it in the forums here, but here it is.  Understand I am an amateur programmer but it works.
https://github.com/mjf55/daVinciJrTagManager

http://www.soliforum.com/post/136910/#p136910

Lets work to combine these two adventures into a great solution.  Add py-threedub and this will be kool.

6

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

rhys wrote:

The tag utility GUI is .net based I've only used it on windows but using mono It may be possible to compile it for other platforms.

I'm creating a command line utility that will be compatible with all platforms, written in golang.

I'm thinking I'll open source the utilities but that this stage not the emulator it's self.

I will sell fully a assembled PCBs with two versions available USB only (no ESP12e module) and USB+WIFI (includes ESP12e module).


Cost would be round the same as EMUtag with Wifi(ESP12e module) and without round $15 cheaper (this covers the time required to flash the ESP12e and cost of the module).

Any chance of configuring an SPI interface to you device?  That way the RPi can talk directly with it. 
The RPi is UART challenged,  meaning that the second (aka console UART)  will need to come from the RPi GPIO pins directly.  If your device had a set of pins at your UART, the a direct connection is also possible.
Just thinking out loud, as I really want to use the RPi.

7

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

The RPi should support the serial CDC the micro controller provides over USB. I'll test this

Alternatively the micro controller's UART interface is accessible
And operates at the same voltage level as the Pi's UART so connecting the Pi to that should work fine.

On a separate note I've almost finished my python module to interface the Emulator's UART/serial protocol.

This is for adding support to your TagManager

8

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

If the USB CDC will allow the RPi communication with your device without taking up an RPi UART, that is perfect.  The standard UART is used to communicate to the printer itself ( at least in my set up. )
PM Sent

9

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

Nice project!

I tried what I think is a similar thing, but that involved using the ESP8266 as an i2c-mitm.,It did not work out because the ESP8266 sometimes was too slow. My idea was to build a "mining-device" for PACK-codes, but I will not continue with that project.

Good luck!



Good luck!

10

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

Teddyz wrote:

Nice project!

I tried what I think is a similar thing, but that involved using the ESP8266 as an i2c-mitm.,It did not work out because the ESP8266 sometimes was too slow. My idea was to build a "mining-device" for PACK-codes, but I will not continue with that project.

Good luck!



Good luck!

Interesting, originally I starting trying to create the same thing, a device to sniff the AUTH request (mainly because I did not have a logic analyzer at the time). but gave up after finding trying to bit-bang an i2c sniffer in "high level" c code is not going to work. it's not fast enough to catch all the pulses after trying with a ESP8266 and with a atmega328p.  before deciding to emulate the PN512 entirely instead.

11 (edited by mjf55 2017-09-09 05:17:37)

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

I got my emulator from rhys yesterday and I installed it tonight.  It works great.  I have eliminated the EMUtag and the stock PN512 readerand antenna  from my printer.  The emulator just plugs into the cable (J4?) that plugged into the stock pm512 card that was in the spool holder.
All it needs is a microusb cable for power and downloading tag data.
I have it connected to my printers RPi and it connects as ttyACM0.  Only downside to this is the need to patch threedub to use ttyACM1 ( as that how the comes up after the enumeration process.  Maybe I can change the Rasbian enumeration order.)

So, I can:

  • dump the emulator tag data to a file

  • program the emulator tag data from a file ( from my dvjTagManager )

  • the tag data survives a power outage ( no batteries required)

This is about as painless as it gets with xyz using stock firmware.

Nice job Rhys......

EDIT:
I just edited 2 files in threedub (  printers.py and main.py ).  I changed the /dev/ttyAMC0 to /dev/serial/by-id/usb-11fi_2510-1f00 ( your by-id may be different ).  A total of 3 times. 
I reinstalled threedub
Now they both work together,

12

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

mjf55 wrote:

I got my emulator from rhys yesterday and I installed it tonight.  It works great.  I have eliminated the EMUtag and the stock PN512 readerand antenna  from my printer.  The emulator just plugs into the cable (J4?) that plugged into the stock pm512 card that was in the spool holder.
All it needs is a microusb cable for power and downloading tag data.
I have it connected to my printers RPi and it connects as ttyACM0.  Only downside to this is the need to patch threedub to use ttyACM1 ( as that how the comes up after the enumeration process.  Maybe I can change the Rasbian enumeration order.)

So, I can:

  • dump the emulator tag data to a file

  • program the emulator tag data from a file ( from my dvjTagManager )

  • the tag data survives a power outage ( no batteries required)

This is about as painless as it gets with xyz using stock firmware.

Nice job Rhys......

EDIT:
I just edited 2 files in threedub (  printers.py and main.py ).  I changed the /dev/ttyAMC0 to /dev/serial/by-id/usb-11fi_2510-1f00 ( your by-id may be different ).  A total of 3 times. 
I reinstalled threedub
Now they both work together,

Thanks

13

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

I've now put an a ebay listing for the Emulator at
http://www.ebay.com/itm/NFC-Tag-Reader- … 3145261268

14

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

Hello,

Thanks for this great job ! I don't know if XYZ Printing plans it but they should reward your idea as they will sell more and more printers if we can use the supplies we want.

Just to make sure I correctly understand the solution:
1. You need an emulator including a WiFi device (ESP-12), a USB Link (to a RPi) and a direct connection to the printer ? If so, what is the purpose of the WiFi device ?
2. Is the solution making live emulation (i.e. during printing and unattended) or is it necessary to enter commands ?

I see you provide the link for the partial assembly of Emulator but can you also include a link for the full one (with EST-12) please ? Do you also include the binary code in order to be able to reprogram the module in case of a failure ? What will happens for future software releases ? Can the purchaser directly upgrade the module ?

Thanks in advance.

TPE

15

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

tpe wrote:

Hello,

Thanks for this great job ! I don't know if XYZ Printing plans it but they should reward your idea as they will sell more and more printers if we can use the supplies we want.

Just to make sure I correctly understand the solution:
1. You need an emulator including a WiFi device (ESP-12), a USB Link (to a RPi) and a direct connection to the printer ? If so, what is the purpose of the WiFi device ?
2. Is the solution making live emulation (i.e. during printing and unattended) or is it necessary to enter commands ?

I see you provide the link for the partial assembly of Emulator but can you also include a link for the full one (with EST-12) please ? Do you also include the binary code in order to be able to reprogram the module in case of a failure ? What will happens for future software releases ? Can the purchaser directly upgrade the module ?

Thanks in advance.

TPE

RPi or any other computer to upload the tag data is required (USB power still is required to run the module)

I originally I was going to offer 2 versions:

  • ESP

  • USB Only

One where the tag data could be updated over WIFI (using a web interface) and the other over USB using a utilty.

Unless there is demand for it I've moving away from that idea. I'm currently only offering a USB Only version.
I'm slowly removing references to it having WI-FI or ESP to avoid confusion.

Instead I plan on adding support for upload/download and other utilities for this Emulator to my Web interface project referenced in my other thread (that project works with most platforms windows/Linux etc).

I will offer downloads of the firmware for the micro controller on the board. It can be updated over USB using a microchip utility that I'll provide a link to when I put up the firmware.


tpe wrote:

Is the solution making live emulation.

Yes, it behaves the same way as the original reader board and tag combined.

Hope this answers all your questions. if not please let me know

16

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

Thanks a lot for all these details. Now, it's clear for me that this solution is perfect for me (as I'm already a Microchip user, I have a PicKit3).

Just another question (last one I think): is it working on DaVinci Mini as well as Junior ? I own a mini and I understood that the it's the same filament as the junior (see http://www.megauk.com/3d-printer-filaments.php) so I think the answer is "Yes" but I want to be sure wink

Once again, great job !

17 (edited by rhys 2017-09-11 12:38:46)

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

tpe wrote:

Thanks a lot for all these details. Now, it's clear for me that this solution is perfect for me (as I'm already a Microchip user, I have a PicKit3).

Just another question (last one I think): is it working on DaVinci Mini as well as Junior ? I own a mini and I understood that the it's the same filament as the junior (see http://www.megauk.com/3d-printer-filaments.php) so I think the answer is "Yes" but I want to be sure wink

Once again, great job !


I don't know if the reader board is the same  form factor as the DaVinci jr can you take photos and measure the board? Does it look the same the the green board in my first post?

18

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

I'll let you know asap.

19

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

tpe wrote:

I'll let you know asap.

Hello,

Here is the card inside the filament...
http://soliforum.com/i/?6waqQ7N.jpg

and the one inside the printer.
http://soliforum.com/i/?Of1sqa4.jpg

Do you have the same on the junior ? I volunteer to test wink

20

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

tpe wrote:
tpe wrote:

I'll let you know asap.

Hello,

Here is the card inside the filament...
http://soliforum.com/i/?6waqQ7N.jpg

and the one inside the printer.
http://soliforum.com/i/?Of1sqa4.jpg

Do you have the same on the junior ? I volunteer to test wink

That's a good start antenna is the same. Can you get a photo of the board the that board plugs into please.

21

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

I looked up the mini w fcc id ( actually found a picture of the label) 
Here is the internal photos of the nfc cards. https://fccid.io/2AB9W-NFC001/Internal- … 696040.pdf 
They are the same as the jr.

22

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

mjf55 wrote:

I looked up the mini w fcc id ( actually found a picture of the label) 
Here is the internal photos of the nfc cards. https://fccid.io/2AB9W-NFC001/Internal- … 696040.pdf 
They are the same as the jr.

Yep looks identical. I had tried searching for teardown photos and found nothing.
Looking for the FCC records seems to be the way to go.

Thanks

23

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

Here is a photo of the logic board. As number of wires are different between the antenna and the NFC connector, i guess there is another card somewhere.
http://soliforum.com/i/?FMQqG7C.jpg

Here is a focus on the NFC connector
http://soliforum.com/i/?Jqvx4OI.jpg

Looking for a way to access this intermediate card.

24

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

And here is photos of the module.

Recto
http://soliforum.com/i/?43vVlxU.jpg

Verso
http://soliforum.com/i/?RgAmEcp.jpg

25

Re: Davinci Jr/Mini emulating the NFC reader and tag on demand UID cycling

tpe wrote:

And here is photos of the module.

Recto


Verso

I note the new board is labeled j5 instead of j4
the j5 appears to be all SMD where as the j4 has some through hole components.

however the size looks the same.
the only issue maybe the placement of the USB port on my board.
if USB port placement is an I will consider re-spinning the board to better fit the mini and send you an updated version to test.