Attempt to implement working simcard emulator

The BUFLEN is fixed 5 bytes now, which has to be increased.
A timeout has to be implemented, which is smaller than max_waittime.
If the timeout is triggered, the data received in the buffer so far
should be sent to the host computer which is responsible for generating
a response. Without the timeout the max_waittime of the phone would
expire and it would repeat sending the command, so that we do not
have atomary messages anymore.
This commit is contained in:
Christina Quast
2015-03-18 18:41:19 +01:00
parent 69734e9ad9
commit ce296b9def
3 changed files with 84 additions and 37 deletions

View File

@@ -6,7 +6,7 @@
#define DATAIN 2
#define INT 3
#define BUFLEN 64
#define BUFLEN 5
typedef struct ring_buffer
{
uint8_t buf[BUFLEN*2]; // data buffer