How to restart transaction from the beginning in emv transaction - payment

I want to know that is there any specific command available by using which I can send the terminal a command and the terminal will start to communicate with the android device from the beginning of the transaction. Suppose, terminal is sending me the following APDU request when it first communicate with the android payment app: 00A404000E325041592E5359532E444446303100 . Then if I want to ask the terminal to send again this apdu request then what Should I send to the terminal in response to this apdu request. Like I want the following scenario:
terminal send apdu req to device : 00A404000E325041592E5359532E444446303100
device send some command to terminal : XX
then the terminal sending apdu req to the device : 00A404000E325041592E5359532E444446303100
what will be the value of XX ?

You can not do this my friend. There are some predefined steps for an EMV transactions defined by EMV. So to achieve the worldwide interoperability, the card and terminal both must behave in same manner as defined by EMV.
Here your wish is to indicate the terminal to resend the command that you want. Since terminal's flow is as per EMV it can't be done.
So if you want to restart your transaction then you have to physically remove the card from terminal. After power off only, terminal will again follow the same transaction flow. You can not alter the terminal flow by any how. Flow is following :
Application Selection
Initiate Processing Option
Read Application Data
Processing Restriction
Card Holder Verification
Offline Data Authentication
Terminal Risk Management
Terminal Action Analysis
Card Action Analysis 1
Online processing
Card Action Analysis 2
Completion
Issuer Scrip Processing

Related

Read timeout after GPO

I'm building an EMV relay to educate myself on the protocol, but have hit a roadblock with the GET PROCESSING OPTIONS (GPO) command. Both SELECT(PPSE) and SELECT(AID) pass through fine, but my connection to the card times-out when I transceive a GPO command.
This happens both with a PN532 chip on an Arduino and Terminal Emulation on Android using the inbuild NFC chip.
I thought that the card might have some anti-relay system that is detecting the latency added by my relay, however a Proxmark sniffing a real transaction also failed to record any command-response pairs after the GPO command was issued, however the payment went through so (presumably) more packets were sent.
What could happen to my Visa Debit card after the issuing of the GPO command that means the card both entirely fails to respond to ISO-14443 compliant chips, that also hides any further communication from a proxmark, while still enabling communication to a real payment terminal?

Communicating with LeLink OBD-II BLE device in Nissan Leaf with Core Bluetooth

Hi this OBD BLE device (https://www.amazon.com/LELink-Bluetooth-Energy-OBD-II-Diagnostic/dp/B00QJRYMFC) is the one I'm using to connect over bluetooth my own iPhone. I have been able to find the right service and the characteristic to write to and to set notify value to true. However, I'm very confused as to what kind of commands I'm supposed to be sending to it. There's a list of mixed instructions online about how ELM327 devices are supposed to receive "PIDs" but also I'm confused if I should be using the list of AT commands.
First time I sent "DP\r" (an AT command) to the write characteristic and got back "DP ?" so I'm guessing it was not understood by the device.
Second time, I was following one PDF which said I should send in Mode followed by PID number so I sent in "01 00\r" which was replied with "NO DATA". I'm guessing this second command might have been better because at least I received something back instead of "?".
Would anybody know what to do in this situation? Thank you
I'm also searching for information regarding the same thing. While surfing on the internet I got a PDF with the command list to be sent to ELM327 devices and another site with info on how to use those commands in simple. So as for the details in this site "DP\r" would not work instead you would need to send "ATDP\r" as every command starts with "AT".
and I suppose that this also will be a useful PDF.

How to send APDU's via SMS to a java card applet?

I want to perform RMI , to an applet via SMS. My applet will process an APDU sent via the SMS and it will call a method depending on the APDU. I cannot find a method to achieve this.As per my reserch this depends on the card manufacturer and is not supported by all OS's. Is there any framework or technique which can help us to achieve the required result ?
#Abhirup Ghosh: This is possible, search for NowSMS and Open Kannel.
Using these tools and GSM Modem, i have created utility that sends SMS to JAVACARD applet which processes the sms and gets the APDU in it.
You have to change your SMS Class and TYPE so that the OS of card treat it as envelope and pass it to the JAVACARD application.
You can also refer this paper:
http://www.ijsrp.org/research-paper-0415/ijsrp-p4024.pdf

How to receive incoming SMS notification in linux?

I have programmed a D-Link GSM modem on a windows machine to send and receive SMS, for testing I used Hyperterminal.
In windows the connection manager initiates the COMx ports, modem uses one unlisted COMx port through which I can send an SMS, and through a listed NMEA port I receive incoming SMS, calls like +CMTI: "ME", 11 or RING +CLIP: XXXXXXXXXXXX
I'm successfully interpreting the message and programming it to my requirements in windows. While trying the same in linux(Fedora), I see the modem initialises /dev/ttyUSB0 and /dev/ttyUSB1 as the two newly identified devices. I use minicom to set the device ports and communicate AT commands to the same.
In both the devices (/dev/ttyUSB0 and /dev/ttyUSB1) I'm not receiving unsolicited AT result code like +CMTI indication whenever I'm expecting a new SMS. FYI I've set the CNMI setting according to the manual and several other combinations.
A strange thing is that I'm able to see RING when I'm calling but not +CLIP: <callerinfo>. Similarly I'm not getting ++PSBEARER: XX, Y or +CMTI: "ME", XX
The only alternative solution is to poll the UNREAD messages at regular intervals, which is generally a bad design. Please tell me if I'm doing anything wrong with regards to the configuration, should I change some thing else apart from these?
RING is the only UR code you can assume that will always come without any specific configuration (just because this is such an old relic that it just behaves that way...). For all other UR codes, you must explicit enable each and every one of them, e.g. AT+CLIP=1, etc, otherwise they will not be enabled. And enabling those are per serial interface, e.g. running AT+CLIP=1 on /dev/ttyUSB0 will not make +CPLIP: ... be printed on /dev/ttyUSB1.
So when you get them on windows the connection manager, it must be because it has those included in it init strings. Minicom I think defaults to no init string or possibly just a very classical one like ATS0=0 E1Q0V1.

bluetooth moduled couldn't get command and send response

I am doing an embedded Bluetooth project using RN-42 and Cerebot MX7cK (a microcontroller board using pic32).
The first step is that the microcontroller has to send "$$$" to let RN-42 go to command mode, and RN-42 will reply with "CMD".
I have successfully send "$$$" to RN-42 through UART. But I couldn't get any response from RN-42. It seems that the RN-42 just ignores my command, so it does not reply anything.
On the uer manual of RN-42, it says the flow control is disabled. But then it says flow control is enabled. I tried both way-with rts and cts enabled and disables. They behave the same way. In both way, I could send "$$$" to RN-42, but couldn't get any rely.

Resources