uFCoder 2.62
Loading...
Searching...
No Matches
uFR Online Reader specific commands

Functions related to uFR Online series readers only, specifically targetting the embedded ESP32 MCU. More...

Functions

UFR_STATUS DL_API EspChangeReaderPasswordM (UFR_HANDLE hndUFR, uint8_t *old_password, uint8_t *new_password)
 Multi reader support. It defines/changes password which I used for:
 
UFR_STATUS DL_API EspGetIOStateM (UFR_HANDLE hndUFR, uint8_t *state)
 Multi reader support. Function returns 6 bytes array of uint8_t that represented IO pins logic level state.
 
UFR_STATUS DL_API EspGetReaderSerialNumberM (UFR_HANDLE hndUFR, uint32_t *lpulSerialNumber)
 Multi reader support. Returns uFR Online reader serial number as a pointer to 4 byte value.
 
UFR_STATUS DL_API EspGetReaderTimeM (UFR_HANDLE hndUFR, uint8_t *time)
 Multi reader support. Function returns 6 bytes array of uint8_t that represents current date and time into uFR Online RTC.
 
UFR_STATUS DL_API EspReaderEepromReadM (UFR_HANDLE hndUFR, uint8_t *data, uint32_t address, uint32_t size)
 Multi reader support. Function returns array of data read from EEPROM of uFR Online. Maximal length of the array is 128 bytes.
 
UFR_STATUS DL_API EspReaderEepromWriteM (UFR_HANDLE hndUFR, uint8_t *data, uint32_t address, uint32_t size, uint8_t *password)
 Multi reader support. Function writes array of data into EEPROM of uFR Online. Maximal length of the array is 128 bytes. Function requires a password which is 8 bytes. Factory password is “11111111” (0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31).
 
UFR_STATUS DL_API EspReaderResetM (UFR_HANDLE hndUFR)
 Multi reader support. Physical reset of uFR reader communication port.
 
UFR_STATUS DL_API EspSetDisplayDataM (UFR_HANDLE hndUFR, uint8_t *display_data, uint8_t data_length, uint16_t duration)
 Multi reader support. Function enables sending data to the uFR Online. A string of data contains information about the intensity of color in each cell of the LED indication. Each cell has three LEDs (red, green and blue). For each cell of the three bytes is necessary. The first byte indicates the intensity of the green color, the second byte indicates the intensity of the red color, and the third byte indicates the intensity of blue color. For example, if the display has 2 cells, an array contains 6 bytes. Value of intensity is in the range from 0 to 255. On uFR Online, there are 2 cells.From firmware version 2.7.6, RGB LEDs can be connected to pin 5 of P5 connector (GPIO connector - ESP pin 18). First 6 bytes in display_data array will be sent to internal RGB LEDs, additional bytes will be sent to external connected RGB. There is no limit for number of external cells. Array data example: 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF First 6 bytes will be sent to internal RGB and additional 3 bytes will be sent to first cell of external RGB.
 
UFR_STATUS DL_API EspSetIOStateM (UFR_HANDLE hndUFR, uint8_t pin, uint8_t state)
 Multi reader support. Function sets uFR Online IO pin state.
 
UFR_STATUS DL_API EspSetReaderTimeM (UFR_HANDLE hndUFR, uint8_t *password, uint8_t *time)
 Multi reader support. Function sets the date and time into uFR Online RTC. Function requires the 8 bytes password entry to set date and time. Date and time are represented into a 6 bytes array in the same way as in EspGetReaderTime function. Factory password is “11111111” (0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31).
 
UFR_STATUS DL_API EspSetTransparentReaderM (UFR_HANDLE hndUFR, uint8_t reader)
 Multi reader support. Function sets uFR Online transparent reader.
 

Detailed Description

Functions related to uFR Online series readers only, specifically targetting the embedded ESP32 MCU.

Function Documentation

◆ EspChangeReaderPasswordM()

UFR_STATUS DL_API EspChangeReaderPasswordM ( UFR_HANDLE hndUFR,
uint8_t * old_password,
uint8_t * new_password )

Multi reader support. It defines/changes password which I used for:

  • Writing in EEPROM
  • Setting date/time of RTC
Parameters
hndUFRhandle of the uFR device
old_passwordpointer to the 8 bytes array containing current password
new_passwordpointer to the 8 bytes array containing new password
Returns
Operation status

◆ EspGetIOStateM()

UFR_STATUS DL_API EspGetIOStateM ( UFR_HANDLE hndUFR,
uint8_t * state )

Multi reader support. Function returns 6 bytes array of uint8_t that represented IO pins logic level state.

Parameters
hndUFRhandle of the uFR device
statepointer to the 6 bytes array containing IO pins states
Returns
Operation status

◆ EspGetReaderSerialNumberM()

UFR_STATUS DL_API EspGetReaderSerialNumberM ( UFR_HANDLE hndUFR,
uint32_t * lpulSerialNumber )

Multi reader support. Returns uFR Online reader serial number as a pointer to 4 byte value.

Parameters
hndUFRhandle of the uFR device
lpulSerialNumberpointer to lpulSerialNumber variable. “lpulSerialNumber “ as result holds 4 byte serial number value.
Returns
Operation status

◆ EspGetReaderTimeM()

UFR_STATUS DL_API EspGetReaderTimeM ( UFR_HANDLE hndUFR,
uint8_t * time )

Multi reader support. Function returns 6 bytes array of uint8_t that represents current date and time into uFR Online RTC.

  • Byte 0 represent year (current year - 2000)
  • Byte 1 represent month (1 - 12)
  • Byte 2 represent day of the month (1 - 31)
  • Byte 3 represent hour (0 - 23)
  • Byte 4 represent minute (0 - 59)
  • Byte 5 represent second (0 - 59)
Parameters
hndUFRhandle of the uFR device
timepointer to the 6 bytes array containing date and time representation
Returns
Operation status

◆ EspReaderEepromReadM()

UFR_STATUS DL_API EspReaderEepromReadM ( UFR_HANDLE hndUFR,
uint8_t * data,
uint32_t address,
uint32_t size )

Multi reader support. Function returns array of data read from EEPROM of uFR Online. Maximal length of the array is 128 bytes.

Parameters
hndUFRhandle of the uFR device
datapointer to array containing data from EEPROM
addressaddress of first data
sizelength of array
Returns
Operation status

◆ EspReaderEepromWriteM()

UFR_STATUS DL_API EspReaderEepromWriteM ( UFR_HANDLE hndUFR,
uint8_t * data,
uint32_t address,
uint32_t size,
uint8_t * password )

Multi reader support. Function writes array of data into EEPROM of uFR Online. Maximal length of the array is 128 bytes. Function requires a password which is 8 bytes. Factory password is “11111111” (0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31).

Parameters
hndUFRhandle of the uFR device
datapointer to array containing data from EEPROM
addressaddress of first data
sizelength of array
passwordpointer to array containing password
Returns
Operation status

◆ EspReaderResetM()

UFR_STATUS DL_API EspReaderResetM ( UFR_HANDLE hndUFR)

Multi reader support. Physical reset of uFR reader communication port.

Parameters
hndUFRhandle of the uFR device
Returns
Operation status

◆ EspSetDisplayDataM()

UFR_STATUS DL_API EspSetDisplayDataM ( UFR_HANDLE hndUFR,
uint8_t * display_data,
uint8_t data_length,
uint16_t duration )

Multi reader support. Function enables sending data to the uFR Online. A string of data contains information about the intensity of color in each cell of the LED indication. Each cell has three LEDs (red, green and blue). For each cell of the three bytes is necessary. The first byte indicates the intensity of the green color, the second byte indicates the intensity of the red color, and the third byte indicates the intensity of blue color. For example, if the display has 2 cells, an array contains 6 bytes. Value of intensity is in the range from 0 to 255. On uFR Online, there are 2 cells.From firmware version 2.7.6, RGB LEDs can be connected to pin 5 of P5 connector (GPIO connector - ESP pin 18). First 6 bytes in display_data array will be sent to internal RGB LEDs, additional bytes will be sent to external connected RGB. There is no limit for number of external cells. Array data example: 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF First 6 bytes will be sent to internal RGB and additional 3 bytes will be sent to first cell of external RGB.

Parameters
hndUFRhandle of the uFR device
display_datapointer to data array
data_lengthnumber of bytes into array
durationnumber of milliseconds to light. if value is 0, then rgb will light infinitely
Returns
Operation status

◆ EspSetIOStateM()

UFR_STATUS DL_API EspSetIOStateM ( UFR_HANDLE hndUFR,
uint8_t pin,
uint8_t state )

Multi reader support. Function sets uFR Online IO pin state.

Parameters
hndUFRhandle of the uFR device
pinIO pin number (1 - 6)
stateIO pin state 0 - low level, 1 - high level, 2 - input
Returns
Operation status

◆ EspSetReaderTimeM()

UFR_STATUS DL_API EspSetReaderTimeM ( UFR_HANDLE hndUFR,
uint8_t * password,
uint8_t * time )

Multi reader support. Function sets the date and time into uFR Online RTC. Function requires the 8 bytes password entry to set date and time. Date and time are represented into a 6 bytes array in the same way as in EspGetReaderTime function. Factory password is “11111111” (0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31, 0x31).

Parameters
hndUFRhandle of the uFR device
passwordpointer to the 8 bytes array containing password
timepointer to the 6 bytes array containing date and time representation
Returns
Operation status

◆ EspSetTransparentReaderM()

UFR_STATUS DL_API EspSetTransparentReaderM ( UFR_HANDLE hndUFR,
uint8_t reader )

Multi reader support. Function sets uFR Online transparent reader.

Parameters
hndUFRhandle of the uFR device
readerTransparent reader number
Returns
Operation status