2018-04-09 04:34 AM
Hi, i am using CR95H RFID CLICK module with raspberry pi3.I am using UART for communication.
I connected,
SSI_1 => GND
SSI_0 => GND
TX => RX
RX => TX
VIN => 3.3X
GND => GND.
for waking up i am sending 0x00 and then i send echo cmd but i didnt any response.can any one help me out i new to these modules
#include<bcm2835.h>
#include <string.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <termios.h>#include <sys/ioctl.h>#include<stdio.h>uint8_t buf2[11],buf1;void send_data(uint8_t buf1)
{ int fd; fd = open('/dev/ttyS0', O_RDWR, O_NOCTTY); fd = write(fd, &buf1, 11); if (fd == -1) { printf('failed to write the file');}
usleep(100000); close(fd);}void recv_data()
{ int fd; fd = open('/dev/ttyS0', O_RDWR, O_NOCTTY); if (fd == -1) { printf('failed to open the file');}
fd = read(fd, buf2, 17); if(buf2[0]==0x55) { printf('ECHO'); } printf('%x', buf2); close(fd);}
int main(void){ bcm2835_init(); delay(10); send_data(0x00); usleep(10); for(int i=0;i<10;i++) { send_data(0x55); recv_data(); delay(50); } }Solved! Go to Solution.
2018-04-23 02:44 AM
Hello John,
For your information the default baud rate set on the CR95HF is 57600 bps.
Can you please tell which baud rate is programmed for the UART communication.
Are you sure that you will comply with the specs for your negative pulse sent on IRQIN/RX pin.RegardsPB2018-04-09 07:22 AM
That's not an STM32 - so why didyou post this in the STM32 forum?
EDIT
Moved by moderator to
https://community.st.com/community/st25-nfcrfid-tags-and-readers
>2018-04-09 07:44 AM
... with raspberry pi3. I am using UART for communication ...
So are you familiar with using the Raspberry Pi serial comms in general?
2018-04-23 02:44 AM
Hello John,
For your information the default baud rate set on the CR95HF is 57600 bps.
Can you please tell which baud rate is programmed for the UART communication.
Are you sure that you will comply with the specs for your negative pulse sent on IRQIN/RX pin.RegardsPB