Fongwah S9 NFC Reader

I’m actually working on a device using a NFC chip from ST. Unfortunately, this chip is not using the ISO-14443 norms but the less usual ISO-15693 one. As a consequence the NFC reader I had were not compatible with this norms. I found a solution (there are not a lot) in Amazon to covert this need. The Fongwah S9 NFC Reader. I made this post to share my test experience of this device.

Precision: this is not a post made for Fongwah, I really have to crash my head on this device and the purpose of this post is to save your time. The fondwah S9 is a nice tool with a multi-language (on top of C library) SDK but it is delivered with no easy documentations, broken links and no reference on ISO-15693 support… I was a bit disappointed once the box opened.

First steps

The first step was to get the information about the product. The product page is not indicating the ISO-15693 support but it is. The SDK link on the SDK DONWLOAD tab is broken. To get the SDK you will have to click on Service & Support and find the icon where to click for downloading.

Once you have the SDK you can start playing with the NFC reader. You have pre-built tools for Windows. The most complete one is S9.exe. Unfortunately I did not find the source code of this tool. As it is the most complete it would be the more interesting to read.

If you want to try a ISO-15693 card, you first need to select this type of card in the S9.exe tool by clicking on the last entry in the left menu. Once this done you can run the tool under the ISO-15693 menu entry (ICode-2). This tool access the first blocks of the NFC memory an prove it works.

Run the SDK

The next step was, for me, to use the SDK to create a custom application able to access the entire NFC memory blocks and not only the 32 first one.

I choose to use the SDK on Linux (Centos7) as is was the more convenient for me in terms of development environment for x86 C. The Linux SDK comes with a demo example “easy” to compile.

“easy” because as all of this SDK, it may have been package between 23:50 and 23:59 just before the coder become evil monster and the quality of the delivery is corresponding to this emergency.

The first thing to take into account is the library path in the make file. It is actually linked to the local directory where the file since to be an ARM target instead of a x86 target. So you need to change a bit the Makefile:

GCC:= gcc
SONAME:=X86-lib/64bit/libS8_64.so
SRC:=*.c
all:
	cp $(SONAME) /lib/
	$(GCC) -fPIC -o demo -g $(SRC) $(SONAME)
clean:
	rm -rf demo *~

Once done you can compile the demo example and run it. You will find in the menu an entry named ICODE2. This entry is corresponding to an ISO-15693. You need to position the NFC reader in front of the NFC device before validating you choice. There is no scan just an immediate read. The application normally returns the NFC device ID.

I’ve seen the kernel HID module crashing multiple times during these first test. So be careful, there are no more information than what you can read on dmesg and the demo application will partially stop working. So you enventualy have to unplug/plug the reader to restore the situation. By the way it is quite stable even if the kernel trace report regular issue.

ISO-15693 Support

The ISO-15639 support is really limited. The first limitation is related to the accessible memory. I was expecting at least the 1024 first bytes accessible as the protocol uses a 8bits address and 32b blocks. For real only the 256 first byte are accessible.

It is not possible to read more than a block at a time and the driver/reader response time is a bit slow so you will need about 100ms per block read.

Only the basic command code are supported with no way to extend the support to other code. On a hand the library is easy to use with high level functions in another hand you can do nothing out of the existing functions.

I’ve spend 4-5 hours investigating the driver low-level (and private) functions to hack the driver and add extended nfc code. Unfortunately the NFC protocol implementation is done at the firmware level (even if this sounds dummy). As a consequence you have no link between what has been passed to the USB and what will be sent over the air. A protocol extension requires a firmware change and a library upgrade.

I’ve contacted Fongwah company to confirm this and see what they are proposing. Apparently they can make custom code for you if you order a large volume of readers. This is not my case. The quickly answered to my email.

Conclusion

The Fongwah NFC reader is a good product, the SDK quality if good and easy if you do not take a look in details on the code provided (if you do that and, like me, you consider code as art and code beauty is the purpose of you life, you will have eyes weepings tears of blood, I promise).

It works well if you strictly use it for the NFC device it has been made for and you will not be able to do anything more than what it has made for. So I recommend to read the SDK documentation before buying it for developing NFC stuff.

2 thoughts on “Fongwah S9 NFC Reader

  1. Hi! I have a problem with the function fw_write, always return nonzero, I mean, a value that means that something it´s wrong. Could you help me? Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.