SL:Network Users und SL:Identive NFC: Unterschied zwischen den Seiten

Aus Doc-Wiki
(Unterschied zwischen Seiten)
Zur Navigation springen Zur Suche springen
imported>Burghardt
(Die Seite wurde neu angelegt: „ One basic idea was to work with the "normal" user accounts. The local computers are ''not'' prepared to work this way yet. But we have some pre-preparation, up u…“)
 
imported>Arne.bochem
(Add information about MIFARE cards.)
 
Zeile 1: Zeile 1:
  +
The Sensorlab has an [http://www.identivenfc.com/en/nfc-software-development-kit-sdk/nfc-solutions-development-kit-sdk.htm Identive NFC SDK], which includes three NFC readers. Drivers can be found on the [http://www.identive-group.com/products-and-solutions/identification-products/mobility-solutions/mobile-readers/scl3711-contactless-usb-smart-card-reader Identive] website. This page contains some information about using the hardware.
   
  +
To use it on Linux, it is required to install some additional software. Debian packages can be found in the sensorlab AFS directory: documents/Hardware/IdentiveNFC/
One basic idea was to work with the "normal" user accounts. The local computers are ''not'' prepared to work this way yet. But we have some pre-preparation, up until now we have:
 
   
  +
To install them, as root:
=== a user named <code>sensorlab</code> ===
 
sensorlab@login:~$ id
 
uid=13433(sensorlab) gid=913(tmg) groups=913(tmg),6172(senslab),1093888628(AfsPag-336a74)
 
   
  +
dpkg -i libusb_0.1.12-1_i386.deb
=== a ''group'' named <code>senslab</code> ===
 
  +
dpkg -i pcsc-lite_1.8.11-1_i386.deb
dn: cn=senslab,ou=groups,dc=informatik,dc=uni-goettingen,dc=de
 
...
 
memberUid: sensorlab
 
memberUid: ashah
 
memberUid: oalfandi
 
memberUid: brosenne
 
memberUid: kellner
 
   
  +
Once installed, the proprietary driver has to be installed:
This list may get extended with userids of students on request...
 
   
  +
tar -xvzf scx371x_2.11_linux_32bit.tar.gz
=== the user has a home directory ~sensorlab ===
 
  +
cd scx37*
sensorlab@login:~$ pwd
 
  +
sh ./install.sh
/afs/informatik.uni-goettingen.de/user/s/sensorlab
 
   
  +
The usbdetach program found in the USBDetach folder will also be necessary. Either recompile it or copy it as is:
=== obligatory home page ===
 
http://user.informatik.uni-goettingen.de/~sensorlab/
 
   
  +
cp USBDetach/usbdetach /usr/bin
The account "sensorlab" should '''not''' be used by any member of the group "senslab". Instead use your own account - that's what group membership is for!
 
  +
chown root.root /usr/bin/usbdetach
  +
chmod 755 /usr/bin/usbdetach
   
  +
After everything is set up, attach the NFC reader. After attaching it, first we have to detach it from the kernel's default driver, because the proprietary driver doesn't do this for us, which is unfortunate and leads to odd error messages. To do this, first run "lsusb", look for "SCM Microsystems, Inc." and copy the device ID (format: ????:????). Then run "usbdetach -d YOURDEVICEID -i 0 -f", e.g.:
== See also ==
 
* [[SL:tmg94]] -- ESXi Server for hosting Virtual Machines
 
* [[SL:Virtual Machines]]
 
* [[SL:Remote Access]] -- reach in from the outside world
 
* [[SL:Topology]] -- the network address ranges, machine names...
 
* [[SL:Network_Users]]
 
   
  +
lsusb
  +
usbdetach -d 04e6:5591 -i 0 -f
   
  +
Now, pcscd can be started to make use of the NFC reader:
[[Category:Sensorlab]]
 
  +
  +
LD_LIBRARY_PATH=/usr/local/lib LIBCCID_ifdLogLevel=0x000F /usr/local/sbin/pcscd --foreground --debug
  +
  +
If you bring an NFC tag (one of the included tags or a student ID for example) close to the reader, you should get output similar to this:
  +
  +
27319699 eventhandler.c:407:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
  +
00000019 eventhandler.c:422:EHStatusHandlerThread() Card inserted into SCL3711 Reader and NFC Device 00 00
  +
00000017 Card ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A
  +
00400075 eventhandler.c:481:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED
  +
  +
Using the included "ISO14443A - TOPAZ 512" tags will lead to a segfault. (It might be nice if we wrote our own driver that doesn't.)
  +
  +
For MIFARE cards, data can be retrieved using nfc-mfclassif from the [http://nfc-tools.org/index.php?title=Libnfc:nfc-mfclassic nfc-tools] package:
  +
  +
nfc-mfclassic r a nfc-card.a nfc-keys f
  +
nfc-mfclassic r b nfc-card.b nfc-keys f
  +
  +
This will write the contents to nfc-card.a and nfc-card.b while using the keys provided in nfc-keys. Keys for an existing MIFARE card can be easily extracted using the mfoc tool.

Version vom 8. Januar 2015, 10:52 Uhr

The Sensorlab has an Identive NFC SDK, which includes three NFC readers. Drivers can be found on the Identive website. This page contains some information about using the hardware.

To use it on Linux, it is required to install some additional software. Debian packages can be found in the sensorlab AFS directory: documents/Hardware/IdentiveNFC/

To install them, as root:

dpkg -i libusb_0.1.12-1_i386.deb
dpkg -i pcsc-lite_1.8.11-1_i386.deb

Once installed, the proprietary driver has to be installed:

tar -xvzf scx371x_2.11_linux_32bit.tar.gz
cd scx37*
sh ./install.sh

The usbdetach program found in the USBDetach folder will also be necessary. Either recompile it or copy it as is:

cp USBDetach/usbdetach /usr/bin
chown root.root /usr/bin/usbdetach
chmod 755 /usr/bin/usbdetach

After everything is set up, attach the NFC reader. After attaching it, first we have to detach it from the kernel's default driver, because the proprietary driver doesn't do this for us, which is unfortunate and leads to odd error messages. To do this, first run "lsusb", look for "SCM Microsystems, Inc." and copy the device ID (format: ????:????). Then run "usbdetach -d YOURDEVICEID -i 0 -f", e.g.:

lsusb
usbdetach -d 04e6:5591 -i 0 -f

Now, pcscd can be started to make use of the NFC reader:

LD_LIBRARY_PATH=/usr/local/lib LIBCCID_ifdLogLevel=0x000F /usr/local/sbin/pcscd --foreground --debug

If you bring an NFC tag (one of the included tags or a student ID for example) close to the reader, you should get output similar to this:

27319699 eventhandler.c:407:EHStatusHandlerThread() powerState: POWER_STATE_POWERED
00000019 eventhandler.c:422:EHStatusHandlerThread() Card inserted into SCL3711 Reader and NFC Device 00 00
00000017 Card ATR: 3B 8F 80 01 80 4F 0C A0 00 00 03 06 03 00 01 00 00 00 00 6A 
00400075 eventhandler.c:481:EHStatusHandlerThread() powerState: POWER_STATE_UNPOWERED

Using the included "ISO14443A - TOPAZ 512" tags will lead to a segfault. (It might be nice if we wrote our own driver that doesn't.)

For MIFARE cards, data can be retrieved using nfc-mfclassif from the nfc-tools package:

nfc-mfclassic r a nfc-card.a nfc-keys f
nfc-mfclassic r b nfc-card.b nfc-keys f

This will write the contents to nfc-card.a and nfc-card.b while using the keys provided in nfc-keys. Keys for an existing MIFARE card can be easily extracted using the mfoc tool.