Table of Contents

Advertisement

ACR890
All-in-One Mobile
Smart Card Terminal
Reference Manual V1.03
Subject to change without prior notice
info@acs.com.hk
www.acs.com.hk

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ACR890 and is the answer not in the manual?

Questions and answers

Summary of Contents for Advanced Card ACR890

  • Page 1 ACR890 All-in-One Mobile Smart Card Terminal Reference Manual V1.03 Subject to change without prior notice info@acs.com.hk www.acs.com.hk...
  • Page 2: Table Of Contents

    11.0. Firmware APIs ....................... 40 11.1. Get firmware version ......................40 12.0. Thermal Printer APIs ..................... 41 12.1. Open the printer port ......................41 12.2. Close the printer port ......................42 Page 2 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 3 19.0. Power Management APIs ..................87 19.1. Set system sleep timeout ..................... 87 19.2. Get system sleep time ......................87 19.3. Enable or disable system auto sleep ................... 88 Page 3 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 4 Table 2 : MIFARE 4K Memory Map ...................... 11 Table 3 : MIFARE Ultralight Memory Map .................... 12 Table 4 : Track Data State Bits Table ....................79 Page 4 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 5: Introduction

    This state-of-art product offers faster processing speed, large memory and portability. This Reference Manual describes the API (Application Programming Interface) calls developed specifically for the ACR890 terminal. Application software developers can make use of these APIs to develop their smart-card related applications.
  • Page 6: Features

    Real-time Clock (RTC) with independent backup battery 4 LED Status Indicators Built-in Speaker • Compliant with the following standards: ISO 7816 ISO 14443 ISO 7811 USB Full Speed RoHS 2 Page 6 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 7: File And Directory Structure

    3.0. File and Directory Structure File Name Functional System Description acs_api.h Host API header acs_errno.h Host API returned error number defines libacs_api.so Target API shared library Page 7 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 8: Pseudo Apdu Commands For Contactless Interface

    To get the serial number of the connected PICC: UINT8 GET_UID[5]={FFh, CAh, 00h, 00h, 00h} Example 2: To get the ATS of the connected ISO 14443 A PICC UINT8 GET_ATS[5]={FFh, CAh, 01h, 00h, 00h}; Page 8 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 9: Picc Commands (T=Cl Emulation) For Mifare® Classic 1K/4K Memory Cards

    Example: Load a key {FF FF FF FF FF FFh} into the key location 00h. APDU = {FF 82 00 00 06 FF FF FF FF FF FFh} Page 9 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 10: Authentication For Mifare Classic 1K/4K

    Response Data Out Result Load Authentication Keys Response Codes Results SW1 SW2 Meaning Success 90 00h The operation is completed successfully. Error 63 00h The operation has failed. Page 10 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 11: Table 1: Mifare 1K Memory Map

    Sector 32 80h ~ 8Eh Sector 33 90h ~ 9Eh 2 KB Sector 38 E0h ~ EEh Sector 39 F0h ~ FEh Table 2: MIFARE 4K Memory Map Page 11 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 12: Table 3: Mifare Ultralight Memory Map

    Data32 Data33 Data34 Data35 Data read/write Data36 Data37 Data38 Data39 Data read/write Data40 Data41 Data42 Data43 Data read/write Data44 Data45 Data46 Data47 Table 3: MIFARE Ultralight Memory Map Page 12 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 13: Read Binary Blocks

    APDU = {FF B0 00 Example 3: Read 16 bytes from binary Page (MIFARE Ultralight) (Pages 4, 5, 6 and 7 will be read) APDU = {FF B0 00 Page 13 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 14: Update Binary Blocks

    10 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0Fh} Example 2: Update the binary block of MIFARE Ultralight with Data {00 01 02 03h} APDU = {FF D6 00 04 00 01 02 03h} Page 14 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 15: Value Block Operation (Increment, Decrement, Store)

    Response Data Out Result Value Block Operation Response Codes Results SW1 SW2 Meaning Success 90 00h The operation is completed successfully. Error 63 00h The operation has failed. Page 15 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 16: Read Value Block

    Example 2: Decimal 1 = {00h, 00h, 00h, 01h} Value Read Value Block Response Codes Results SW1 SW2 Meaning Success 90 00h The operation is completed successfully. Error 63 00h The operation has failed. Page 16 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 17: Copy Value Block

    APDU = {FF D7 06h} Example 4: Increment the value block by “5” APDU = {FF D7 00 00 00 05h} Answer: 90 00h [$9000] Page 17 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 18: Keypad Apis

    Parameters None. Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 18 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 19: Get Current Keypad State

    The mode value to Input; Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 19 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 20: Get Power Button Working Mode

    = %d\n",(int)m); ret = kpd_state_get(&key_Point,5000); //read key press within 5s printf("Type: %d, Code: %d\n", key_Point.type, key_Point.code); mode = CMD_ONOFFMODE; pwrbtn_set_mode(mode); //set current powerkey working mode PowerKey Mode Page 20 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 21 //obtain current powerkey working mode printf("m3 = %d\n",(int)m); ret = kpd_close(); printf("ret = %d\n", ret); return 0; Page 21 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 22: Backlight Control Apis

    = backlight_get(&state); //call api to get backlight state if(0 == ret) {//show out the backlight state you get just now. printf("brightness=%d.max_brightness=%d,fb_power=%d,actual_brightn ess=%d", state.brightness,state.max_brightness,state.fb_power,state.actual_bri ghtness); return ret; Page 22 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 23: Set Backlight Level

    Library Use libacs_api.so Example Code int main(void) int ret; enum bl_level level = BACKLIGHT_LEVEL_4; ret = backlight_set(level); //call api to set the level of backlight brightness. return ret; Page 23 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 24: Battery And Charger Apis

    { //print the battery state you get just now. printf("ifdc = %d, ifbattery = %d, chargerstate = %d, batt_voltage = %d, batt_voltage_max batt_voltage_min batt_volpercent %d\n", state.ifdc, state.ifbattery,state.chargerstate, state.batt_voltage, state.batt_voltage_max, state.batt_voltage_min, state.batt_volpercent); return ret; Page 24 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 25: Led Control Apis

    The state of the specified LED Return value If successful, the return value is 0. If failed, the return value is -1 or -2. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 25 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 26: Get Led's Blinking Status

    //call API to set blue led blink on for 100ms and blink off for 900ms periodically. ret = led_set_state(led, stat); if(0 != ret) printf( " Set led blink state failed !, ret = %d\n", ret); return ret; Page 26 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 27: Gprs Module Power Management Apis

    Parameter None. Return Value If successful, the return value is EGPRS_SUCCEEDED. If failed, the return value is ENODEV or EGPRS_POWER_ON_FAILED. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 27 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 28: Power Off Gprs

    Parameters None. Return Value If successful, the return value is EGPRS_SUCCEEDED. If failed, the return value is ENODEV or EGPRS_POWER_OFF_FAILED. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 28 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 29: Set Pppd Connect Parameter

    The proper netmask if needed Return Value If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 29 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 30: Set Pppd Dialer Parameter

    The APN of mobile network operator support. Return Value If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 30 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 31: Start Up Pppd Process

    9.5. Start up pppd process This function starts the pppd dial process. void ppp_on(void). Parameters None. Return Value None. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 31 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 32: Turn Off Pppd Process

    != 0) printf(“no exist /dev/ttyUSB2\n”); return -1; set_ppp_param(“*99***1#”, “0.0.0.0”, “0.0.0.0”, “255.255.255.0”); if(ret != 0) printf("set ppp param Failed!\n); gprs_power_off(); return -1; ret = set_dialer_param(“IP”, “3gnet”); if(ret != 0) Page 32 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 33 = %d\n”,count); ret = system(“ ifconfig | grep ‘ppp0’ ”); if(ret == 0) system(“cp /etc/ppp/resolv.conf /etc/resolv.conf”); break; sleep(1); count++; if(count > 15) printf(“Timeout!!!\n”); break; return 0; Page 33 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 34: Transmit One At Command

    The length of RecvBuffer Return Value If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 34 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 35: Get Imei Serial Number

    IMEI_SN Failed, ret = %d\n”,ret); gprs_power_off(); return -1; printf(“IMEI Serial Number = %s\n”, IMEI_Buf); ret = gprs_power_off(); if(ret != EGPRS_SUCCEEDED) printf(“gprs power off Failed!\n”); return -1; return 0; Page 35 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 36: Audio (Alsa) Apis

    {//print the volume state you get just now. printf("max volume is %ld\nmin volume is %ld\n, left volume is %ld\nright volume is %ld\n", stat.max_vol, state.min_vol, stat.left_vol, stat.right_vol); return ret; Page 36 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 37: Set System Audio Volume

    18). Return value If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 37 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 38: Sound Playback

    If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Example Code int main(void) int ret; ret = sound_play ("./Niose.wav");//call api to play a specified audio file return ret; Page 38 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 39: Speaker Sound Control

    If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Example Code int main(void) int ret; ret = speaker_onoff(1);//call api to sound on speaker. return ret; Page 39 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 40: Firmware Apis

    = get_acr890_version(&version); if(ret == 0) { printf(“Major = %d\n”, version.major); printf(“Minor = %d\n”, version.minor); printf(“Revision = %d\n”, version.revision); return ret; Page 40 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 41: Thermal Printer Apis

    Parameters None. Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_OPEN_ERR. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 41 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 42: Close The Printer Port

    Parameter None. Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_CLOSE_ERR. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 42 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 43: Reset The Printer

    Parameter None. Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_RESET_ERR. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 43 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 44: Feed Paper To Printer

    The paper space to be fed (ranges from 0 to 255, space is equal to nr_len * 0.125, in Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_FPAPER_ERR. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 44 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 45: Set Line Space In Standard Mode

    Paper space to be fed, range from 0 to 255, space is equal to nr_len * 0.125 (in mm) Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_SETLINE_SPACE. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 45 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 46: Print String In Standard Mode

    Null terminated string of characters to be printed Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_STRPRINT_SM. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 46 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 47: Print String In

    [in] data Pointer to the array of characters to be printed [in] size Size of the array of characters to be printed (range from 1 to 490 bytes) Page 47 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 48 Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_STRPRINT_PM. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 48 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 49: Print Data Array In Standard Mode

    Size of the array of characters to be printed in bytes Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_DATAPRINT_PM. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 49 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 50: Print Data Array In

    Size of the array of characters to be printed (range from 1 to 490 in bytes) Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_DATAPRINT_PM. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 50 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 51: Print An Image

    1 and 384 (inclusive). Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_IMAGEPRINT. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 51 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 52: Get Status Of The Printer

    //standard mode printing printer_printStrSM(szcom); PRT_PAGE_MODE_PARAM param; memset(&param,0,sizeof(param)); //Page mode printing param.HorizontalOrigin_X = 50; param.VerticalOrigin_Y = 50; param.PrintWidth_X = 100; param.PrintHeight_Y = 150; param.ucLineSpace = 25; nRet = printer_status_get(); Page 52 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 53 -1; printer_printStrSM("ABCDEFGFH"); //printing and change new line printer_page_feed(100); printer_printStrSM("BBBBBB"); printer_pintStrSM("CCCCC"); nRet = pinter_status_get(); if(nRet !=PRINTER_READY) printf("ACR890_Printer_PrintStrSM nRet = [%x]\n",nRet); return -1; //Reset and cache flush ACR890_Printer_close(); i++; sleep(1); Page 53 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 54: Initialize Freetype Library

    A path to the font file Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_INITFREE_ERR. Requirements Header Declared in lib_freetype.h. Library Use libacs_printer.so. Page 54 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 55: Set The Character Size

    The character height, in integer pixels. Valid range is 11-16. Return Values If successful, the return value is SUCCESS. If failed the return value is ETHP_SETSIZE_ERR. Requirements Header Declared in lib_freetype.h. Library Use libacs_printer.so. Page 55 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 56: Get Glyph Image And Printing

    Size of the array of characters to be printed in bytes. Return Values If successful, the return value is SUCCESS. If failed, the return value is ETHP_IMAGEPRINT. Requirements Header Declared in lib_freetype.h. Library Use libacs_printer.so. Page 56 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 57: Release Freetype Library

    This function releases the freetype library. This function is designed to print non-English fonts. Note: Supported in firmware v1.1.5 and later only. void freetype_release(void) Parameters None. Return Values None. Requirements Header Declared in lib_freetype.h. Library Use libacs_printer.so. Page 57 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 58: Wireless Lan Module Control Apis

    Parameter None. Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 58 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 59: Power Off Wireless Lan Module

    Parameter None. Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 59 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 60: Contact Smart Card Reader Apis

    Parameter None. Return values If successful, the return value is 0. If failed, the return value is -ENODEV. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 60 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 61: Close The Contact Card Reader Module

    Parameter None. Return values If successful, the return value is 0. If failed, the return value is -ENODEV. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 61 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 62: Check If A Contact Card Is Present

    If successful, the return value is 0 (card is present). If failed, the return value is ≠ 0 (card is not present). Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 62 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 63: Power On A Contact Smart Card

    The returned ATR length Return values If successful, the return value is 0. If failed, the return value is ≠ 0. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 63 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 64: Power Off A Contact Smart Card

    The index ID of specified slot (IFD). Return values If successful, the return value is 0. If failed, the return value is ≠ 0. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 64 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 65: Send Pps To Contact Smart Card

    The fi and di value. Return Values If successful, the return value is 0. If failed, the return value is ≠ 0. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 65 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 66: Contact Smart Card Apdu Transfer

    == ret) printf("Found card in slot %d!\n", idx); ret = icc_power_on(idx, atr, &mlen); if(0 == ret) printf("ATR "); for(i = 0; i < mlen; i++) printf("%02X ",atr[i]); printf("\n"); Page 66 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 67 = 0; I < rxlen; i++) printf("%02X ",rxcmd[i]); printf("\n"); ret = icc_power_off(idx); else printf(“Power on card %d failed!\n”, idx); else printf("No card in slot %d!\n", idx); icc_close(); return ret; Page 67 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 68: Contactless Reader Apis

    Parameter None. Return values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 68 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 69: Close The Contactless Reader Module

    Parameter None. Return Value If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 69 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 70: Read A Contactless Card

    Note: This function does not apply to FeliCa cards. You can use the FeliCa polling command to get the card info (see Example 2 in Contactless card reader antenna control). Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 70 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 71: Activate The Contactless Card

    This function does not apply to FeliCa cards. Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h. Library Use libacs_api.so. Page 71 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 72: Deactivate The Contactless Card

    Parameter None. Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 72 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 73: Contactless Card Data Transfer

    Note: Maximum size of response buffer is 272 bytes. Hence, the storage size of *resp string container MUST be greater than 272 bytes. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 73 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 74: Felica Card Data Transfer

    *resp string container MUST be greater than 272 bytes (see Example 2 in Contactless card reader antenna control). Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 74 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 75: Contactless Card Reader Antenna Control

    = 0; unsigned char buf[36]; unsigned int len = 0; struct picc_card info; picc_open(); picc_field_ctrl(1); rv = picc_poll_card(&info); if(!rv) printf("Card uid[%d]:: ",info.uidlength); for(i=0;i<info.uidlength;i++) printf("%02x ",info.uid[i]); printf("\n"); else Page 75 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 76 = %d\n",rv); picc_power_off(); picc_field_ctrl(0); picc_close(); return 0; 2. For FeliCa #include <stdio.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #include <unistd.h> #include <sys/types.h> #include <string.h> #include <errno.h> #include <sys/ioctl.h> Page 76 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 77 == 8) printf( "Send Request Service\n"); memcpy( &reqservice[2], uid, 8); txlen = 17; rxlen = 272; rv = picc_felica_transmit(reqservice,txlen,rxbuf,&rxlen); if(!rv) printf("Command: "); for(i=0;i<txlen;i++) printf("%02x ",reqservice[i]); printf("\n"); printf("Response: "); Page 77 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 78 ",rxbuf[i]); printf("\n\n"); else printf("picc_felica_transmit fail, return code = %d\n",rv); picc_field_ctrl(0); picc_close(); return 0; Page 78 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 79: Magnetic Stripes Card Apis

    Track #1 data End Byte Error Bit 1 Track #1 data Parity Error Bit 0 Track #1 data Start Byte Error Table 4: Track Data State Bits Table Page 79 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 80: Version 1.03

    #1 data : \n"); for(i = 0; i < sizeof(tMSRData. track_data1); i++) printf(“0x%02X ”, tMSRData. track_data1[i]); printf(“\n”); else printf("track 1 error : "); PRINT_MSR_ERROR(tMSRData.track_state); printf("\n"); return ret; Page 80 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 81: Error Code Description Apis

    *acs_err(const int errno_code) Parameters [in] errno_code The error number to parse Return values A parsed string for an error number. Requirements Header Declared in acs_api.h Library Use libacs_api.so Page 81 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 82: Ini File Parser Apis

    = get_a_ini_key_value (“lcd”, “brightness”, key_value); //call api to get brightness value if(0 == ret) {//show out the brighness you get from ini file just now. printf("[lcd]\nbrightness=%s\n”, key_value); return ret; Page 82 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 83: Set A Ini Keyword Value

    Use libacs_api.so Example Code int main(void) int ret; ret = set_a_ini_key_value (“lcd”, “brightness”, 3); //call api to set brightness value to 3 in the ini file. return ret; Page 83 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 84: Add A Ini Keyword

    If failed, the return value is -1. Requirements Header Declared in acs_api.h Library Use libacs_api.so Example Code int main(void) int ret; ret = add_a_ini_key_value (“lcd”, “brightness”, 3); return ret; Page 84 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 85: Set Hardware Value According To All Keywords In /Etc/Config.ini

    This function sets all hardware according to all keyword value in .ini file (/etc/config.ini). void ini_init_hw_all(void); Parameters None. Return Value None. Requirements Header Declared in acs_api.h Library Use libacs_api.so Example Code int main(void) ini_init_hw_all(); return 0; Page 85 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 86: Set Hardware Value According To The Specified Keyword

    Declared in acs_api.h Library Use libacs_api.so Example Code int main(void) int ret; ret = record_set_to_hw (“lcd”, “brightness”, 3); //call api to set brightness value to 3 return ret; Page 86 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 87: Power Management Apis

    19.2. Get system sleep time This function gets the device idle time. Unsigned int pm_sleep_timeout_get(void) Return Values The value of the device’s idle time Requirements Header Declared in acs_api.h. Library Use libacs_api.so. Page 87 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 88: Enable Or Disable System Auto Sleep

    To resume the device to normal working status, short press the power button. Return Values If successful, the return value is 0. If failed, the return value is -1. Requirements Header Declared in acs_api.h. Library Use libacs_api.so. Page 88 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 89: Version 1.03

    */ … wifi_pwr_off(); /* when wifi power off the device will switch to deep sleep mode, and auto sleep is reenable */ return 0; Page 89 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...
  • Page 90 /* disable device auto go to sleep mode, and you can short press power button make device go to sleep mode*/ pm_sleep_enable(0); return 0; Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries. Page 90 of 90 ACR890 – Reference Manual info@acs.com.hk www.acs.com.hk Version 1.03...

Table of Contents