HSM9000 host command (NG/NH) to decrypt encrypted PIN - encryption

I need to get the Clear PIN for a card using HSM. I have used (EE/EF) command to get the encrypted PIN using PIN Offset method, and supplying its o/p to NG command to get the decrypted clear PIN value.
I am able to run both command and get the o/p however, Clear PIN value is incorrect.
Could I get some help here please.

Related

PIC Microcontroller with GSM module

How do I get a caller identity from sim900 using pic16f877A microcontroller meanwhile, I can make call, send SMS and answer calls but I want to be able to compare an incoming call identity with a predefined on in my program. My compiler if Mikroc. Thanks
You need to give AT+CLIP=1\r command to enable additional caller information.
Once you issue this command, any incoming call will be notified in the following format,
RING
+CLIP:+911234567890
Now just extract the number after +CLIP: to compare against pre-stored numbers.

How could I take my HC05 Module out of AT Command Mode without disconnecting the Arduino?

I am trying to program my HC05 module on my Arduino Uno to change to different names based on different conditions.
I've got it to change the name while it is in AT Command Mode, and have setup a relay to cut the 5V for 1 second to put the module into AT Command Mode, but now I need to know how to take the module out of AT Command Mode without disconnecting the Arduino from the power.
I've tried completely disconnecting the power from the Arduino while it is in AT Com Mode and then putting everything back, but it recognises that it was last in AT Command Mode
What is the command to get out of AT Command Mode?
In your bluetooth module you must have an enable pin, check where it is connected if it is connected to HIGH the module is in AT command mode.

How to send a non-character byte through terminal program

I would like to know if there is a way to send a non-character byte through a terminal emulator. Bytes with values from 0 to 127 are (mostly) represented by characters on a keyboard (example: a, b,c...A,B,C.. 1,2,3..!,#,#..). But how can I type and send something that corresponds to a byte with value 137 for instance? I would like to send these types of "non-characters" over a serial connection to an arduino using a terminal program. I am currently using teraterm, but other terminal emulators might be fine too. BTW, the arduino code for receiving these bytes is working fine.
You can use send the character that you want by using the Alt key.
Alt+137 will display the character ë. If you send that, the arduino will receive the appropriate byte.

RSSI determination using HM-10

I am using an arduino with HM-10 Bluetooth module. I am able to detect other HM-10(slave) in the vicinity of HM-10(master). In HM-10 datasheet AT+RSSI? command is mentioned which i tried with all possible combinations, but i am unable to extract the rssi value. Is there any way such that i can determine the rssi value using arduino on serial monitor. Any relevant code other than the command will be appreciated.
thanks in advance.
According to the "datasheet", "This command only used by Remote device query when connected."
Basically, to get this to work, you will need to set your slave to remote control mode with the AT command
AT+MODE2
Then, connect your master and slave. After this is done, you should be able to send the master the command "AT+RSSI?", it will send it to the slave, which will pick it up now that is in remote control mode. The slave will then reply with its RSSI value.

Check the mode of a pin

There is anyway to check the mode of a pin ?
like digitalRead(somePin) returns high or low
so some function the returns input or output
Im using arduino mega 2560...
The Arduino library doesn't provide a function to read the mode of a pin. It is possible to read a mode however, and if you like you can review this documentation:Atmel-2549
Reading a pin state will involve you having to figure out a port and register to read your mode from. This isn't recommended because the pin and port configuration will likely change between versions of micro-controllers. If you try to do something invalid to your hardware through your program you could end up with a fried microchip.
It would probably be best to store the mode as a variable to check what mode the pin in question has been set to.

Resources