I bought an USB RFID reader/writer module from local store, it is not well known and branded, It connect to computer with USB port , and i want to write a program for it in Linux Ubuntu.
I find out (from CD with module) it use:
Silicon Laboratories CP210x USB to RS232 serial adaptor
I install the Driver from CD on Ubuntu and i compiled and run the example C++ file is in this link.
Now i want to send charachter message to it and receive proper massage from it but the example just send HEX value and if i put char in ioctl, it wont work, i tried this:
static const char HELLO3[] = "Howdy";
ret_val = ioctl(fd, HELLO3, &gpio);
cout << ret_val ;
It(ioctl) only get long unsigned int
, I guess this integers should be in library but i don't know how to use them. How can i send massage to device and receive massage like response from it ?
The datasheet is not in English but it have some example for c# it is like :
serialport.writeline("W0abcdef65\r\n");
It mean write abcdef65
on Block 0 and it receive Msg0000001
which means the command run perfectly. How can i get same functionality in C or C++ in Linux.
PS :
1-The library or driver is in the same folder as example link in github which i mentioned before.
2-The device works properly with the application carried with its package in Windows but i want to program it in Linux with C++ or C.
Best Answer
Read the readme files for the headers on Github
Readme.Serial
.I guess you will have find another way.