cancel
Showing results for 
Search instead for 
Did you mean: 

how to make serial communication?

Uyalç.1
Associate II

Hi,

I bought ST25RU3993-EVAL board.I want to reading tag's id. Can I make serial communication? I write console "minicom" .Then i set baudrate=3000000 and 8N1 and no flow control. But there is no text in terminal. How to make serial communication?

1 ACCEPTED SOLUTION

Accepted Solutions
Cedric Dalban
ST Employee

Hello Uyalc,

all these checks (pretuning, autotuning, output power, receive gain management, ...) are quite easy to handle and modify with the Windows GUI.

Unfortunately there is no equivalent of such GUI on Linux, you will have set all parameters manually.

pretuning:

The current demoEvalAPI.c does not contains such feature demo code.

Please find attached STUHFL_demoInteractive.c (based on v2.1.0) updated with pre-tuning function (menu 't').

Nota: depending on the selected pre-tuning algo you will have to play on resetFreqsTuning() value as a seed.

autotuning:

  STUHFL_T_ST25RU3993_Gen2Inventory_Cfg invGen2Cfg;

  invGen2Cfg.autoTuningAlgo = TUNING_ALGO_FAST;  // FAST is OK, for the time being MEDIUM is a bit too long for autotuning (will be significantly improved in next release)

  invGen2Cfg.autoTuningInterval = 7;

  invGen2Cfg.autoTuningLevel = 20;

  SetGen2InventoryCfg(&invGen2Cfg);

parameters:

  your parameters seem to be relatively ok,

  with session S2, better to targetDepletionmode to  invGen2Cfg.targetDepletionMode = true;

  I can see you are using custom frequency, better would be you use full profile frequencies range

receive gain monitoring:

you have to set the sensitivity value (TxRxCfg.rxSensitivity) such as the tags are seen (increase sensitivity) but noise is not polluting (decrease sensitivity).

Nota: all the tuning related features will be significantly improved in releases above 2.1.0.

hoping all of this helps.

regards,

Cedric.

View solution in original post

11 REPLIES 11
Cedric Dalban
ST Employee

Hello Uyalc,

On the PCB you find on the left side a pin called "UART LOG". This is the TX pin of a UART, which can be used to send out from the FW logging or debug information.

Please use this UART pin (together with a GND pin) for logging and debugging.

A example of howto would be the following code from main.c

LOG("FW Version = %02d.%02d.%02d.%02d\n",FW_VERSION_MAJOR, FW_VERSION_MINOR, FW_VERSION_MICRO, FW_VERSION_BUILD);

This code prints on the log UART the version number information at startup of the board.

best regards,

Cedric

PS: cf the threads https://community.st.com/s/question/0D53W000004GWECSA4/st25ru3993eval-is-there-a-way-to-use-uart-for-debugging-so-i-can-see-output-of-printf-function

and https://community.st.com/s/question/0D50X0000CCscLGSQZ/uart-connection-of-st25ru3993-eval

Uyalç.1
Associate II

other rfid readers can print it into a text document when it connects to the computer and then reads the tags. Is this possible in my model?

Cedric Dalban
ST Employee

Hello Uyalc,

There is indeed a feature in the GUI that allows such tag list.

In the GUI menu enable the "Trace Browser" feature (menu -> View -> Trace Browser), there you see all found TAG information during scan (cf attached) in a csv format.

This can be easily copied and paste to a .txt or .csv file.

best regards,

Cedric.

0693W000000XMOGQA4.jpg

Uyalç.1
Associate II

Hello,

We would like to get the id of the tags that are scanned by the antenna through serial port. Is is possible to get the data with using ST25RU's UART LOG PIN directly without using the program on windows?

Cedric Dalban
ST Employee

Hello Uyalc,

I must admit I am a bit confused about the request.

Indeed if you are not using the GUI, the only way you have to pilot the EVAL board is through an application (as STUHFL_Demo) based on STUHFL API.

This API provides 2 functions (Gen2_Inventory() & InventoryRunnerStart()) to launch inventories, the number of tags is then available in field "tagListSize" of structure STUHFL_T_Inventory_Data and the tag list is available in field "tagList" of same structure.

Is there anything on your side that forbids you to print the tags from this list ?

best regards,

Cedric.

Uyalç.1
Associate II

Yes, I understood what you said. I connected Raspberry Pi and Eval board via USB. It reads the tags beautifully. I can also see their ID, but they don't read the same number of times. Suppose there are 8 RFID tags. The first 10 seconds read them all. Then it reads 6 tags. How can I optimize this?

Cedric Dalban
ST Employee

Well,

this optimization is really depending on your configuration (tags distance, tag position, board, antenna, environment, noise, ...),

you have plenty of parameters you can play with to find the best combination:

  • Use single Target (A or B) with session S2 or S3
  • Use coding Miller 4 or 8
  • Pre-tune antenna before inventory
  • enable autotuning feature
  • enable adaptive Q
  • use as much as possible different frequencies (frequency hoping must be the highest, do not stay on a single freq)
  • increase output power
  • Monitor receive gain (find the best compromise between ability to communicate with tags and manage environment noise)

hoping this helps,

regards,

Cedric.

Uyalç.1
Associate II

 TxRxCfg.rxSensitivity = 19;

  TxRxCfg.txOutputLevel = 0;

  invGen2Cfg.adaptiveQEnable = true;

  invGen2Cfg.adjustOptions = 0;

  invGen2Cfg.minQ = 0; // ------------------

  invGen2Cfg.maxQ = 4;

  invGen2Cfg.autoTuningAlgo = TUNING_ALGO_MEDIUM;

  invGen2Cfg.adaptiveSensitivityEnable = true;

  invGen2Cfg.session = GEN2_SESSION_S2;

  invGen2Cfg.toggleTarget = true;

  invGen2Cfg.target = GEN2_TARGET_B;

  invGen2Cfg.targetDepletionMode = false; // -----------------

  gen2ProtocolCfg.tari = GEN2_TARI_25_00;

  gen2ProtocolCfg.blf = GEN2_LF_256;

  gen2ProtocolCfg.coding = GEN2_COD_MILLER8;

  invData.tagListSizeMax = 10;

  invGen2Cfg.autoTuningAlgo = TUNING_ALGO_MEDIUM;

  invGen2Cfg.sel = 0;

freqCustom.frequency = 866900;

I applied these changes on demoEvalAPI.c. But again I did not get any results.How I change "Pre-tune antenna before inventory", "enable autotuning feature", "increase output power" and "Monitor receive gain" ? Are these changes in demoEvalAPI.c or other function? I bought antenna (A0025). I want to read 10 tags 3 meters away. Please help me...

Cedric Dalban
ST Employee

Hello Uyalc,

all these checks (pretuning, autotuning, output power, receive gain management, ...) are quite easy to handle and modify with the Windows GUI.

Unfortunately there is no equivalent of such GUI on Linux, you will have set all parameters manually.

pretuning:

The current demoEvalAPI.c does not contains such feature demo code.

Please find attached STUHFL_demoInteractive.c (based on v2.1.0) updated with pre-tuning function (menu 't').

Nota: depending on the selected pre-tuning algo you will have to play on resetFreqsTuning() value as a seed.

autotuning:

  STUHFL_T_ST25RU3993_Gen2Inventory_Cfg invGen2Cfg;

  invGen2Cfg.autoTuningAlgo = TUNING_ALGO_FAST;  // FAST is OK, for the time being MEDIUM is a bit too long for autotuning (will be significantly improved in next release)

  invGen2Cfg.autoTuningInterval = 7;

  invGen2Cfg.autoTuningLevel = 20;

  SetGen2InventoryCfg(&invGen2Cfg);

parameters:

  your parameters seem to be relatively ok,

  with session S2, better to targetDepletionmode to  invGen2Cfg.targetDepletionMode = true;

  I can see you are using custom frequency, better would be you use full profile frequencies range

receive gain monitoring:

you have to set the sensitivity value (TxRxCfg.rxSensitivity) such as the tags are seen (increase sensitivity) but noise is not polluting (decrease sensitivity).

Nota: all the tuning related features will be significantly improved in releases above 2.1.0.

hoping all of this helps.

regards,

Cedric.