APDU request through NFC in iPhone 6? - ios

Using an android mobile device I could read the card details(authorized by the client with touch id) from iphone6, for payment transaction through NFC. I got it working through the APDU request.
APDU request
Send : 00 A4 04 00 07 A0 00 00 00 03 10 10 00
and response
Response: 6F 39 84 07 A0 00 00 00 03 10 10 A5 2E 9F 38 1B 9F 66 04 9F 02 06 9F 03 06 9F 1A 02 95 05 5F 2A 02 9A 03 9C 01 9F 37 04 9F 4E 14 BF 0C 0D 9F 4D 02 14 01 9F 5A 05 11 08 40 08 40 90 00
Now my concern is, can I send the same APDU request from iPhone 6 through NFC or some other means to get the appropriate response from another iPhone 6? Is it possible?
Though I can understand that NFC chip in iPhone6 does not allow iPhone-Iphone NFC communication, this question clearly states that THERE IS NO WAY to read passive NFC tags using an iPhone6. Okay, but there are comments saying it might be possible after september2014?
There must be some way to do this, Please do give out your thoughts on this. Thanks.

As I pointed out in this thread, the iPhone6 is not designed for Discovery mode or to act as a master in Peer-to-peer mode. You can however use a mobile NFC reader to proxy NFC data between 2 iPhones. Flomio offers a line of mobile and PC compatible NFC readers that you may consider.
Also worth mentioning, there's another option in reading unique data off the iPhone6 that may address your needs as well. Check this thread for details.

Related

Is posible to get Beacon advert in IOS without using the 0x004c Apple Company Identifier

I have developed an Android app in order to get data from a iBeacon, as I could get the raw data I had no problems doing it, but in IOS it is not posible and it seems as if it was no posible to receive packets which don't have Apple Company Identifier 0x004c into the advert. Is posible to receive adverts from devices which advert using other Company Identifiers?
If it is posible, would be posible to receive the Company Identifier code?
I wasn't able to find anything in the documentation provided by Apple or searching in several forums.
Any idea will be really welcome.
The sniffer capture the following:
Nordic Semiconductors' Company Identifier:
+----------------------------------------------------+----------------- - - -
| Packet sniffer frame header |
+----+-------------+-------------------------+-------+
|info| Packet nbr. | Time stamp | Length| Packet data
+----+-------------+-------------------------+-------+----------------- - - -
| 01 | 0C 00 00 00 | 49 12 27 44 00 00 00 00 | 30 00 | 2F D6 BE 89 8E 40 24 4E A0 C3 8B 04 FF 02 01 04 1A FF 59 00 02 15 01 12 23 34 45 56 67 78 89 9A AB BC CD DE EF F0 00 01 00 01 BB BA 88 BA 37 A5
+----+-------------+-------------------------+-------+----------------- - - -
Apple's Company Identifier:
+----------------------------------------------------+----------------- - - -
| Packet sniffer frame header |
+----+-------------+-------------------------+-------+
|info| Packet nbr. | Time stamp | Length| Packet data
+----+-------------+-------------------------+-------+----------------- - - -
| 01 | 01 00 00 00 | ED 07 68 00 00 00 00 00 | 30 00 | 2F D6 BE 89 8E 40 24 E4 98 E6 3C 1B 5D 02 01 1A 1A FF 4C 00 02 15 01 12 23 34 45 56 67 78 89 9A AB BC CD DE EF F0 00 00 00 00 C5 E8 19 24 3A A5
+----+-------------+-------------------------+-------+----------------- - - -
Regards
Iván
No, it is not possible to read the raw bytes of a beacon advertisement in iOS using CoreBluetooth or otherwise access the company code or other fields. You can only get the fields provided by CoreLocation, basically the three part beacon identifier. See here: http://developer.radiusnetworks.com/2013/10/21/corebluetooth-doesnt-let-you-see-ibeacons.html
Experimentation shows that CoreLocation APIs will only detect beacon advertisements with a company code of 0x00ff or less -- the most significant byte must be zero.
Instead CoreLocation try to use the CoreBluetooth Framework.
You should have all the BLE information here:
- (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI.

iBeacon on iOS8 not working properly?

I'm running iOS8 beta 5 on an iPhone 4S and can't get iBeacon monitoring / ranging to work reliably. I initially get one call to didDetermineState telling me I'm out of the beacon region, but then I never get any more calls even if I'm obviously inside or outside the beacon region. On the initial call to didDetermineState, I don't get a call to didExitRegion, which seems wrong as well.
Has anyone experience this? I have granted Always authorization
Did you try with the Airlocate sample code provided by Apple?
https://developer.apple.com/library/ios/samplecode/airlocate/introduction/intro.html
Try this, it should work although I tried it and even with that "proved" code I can't range or monitor anything.
Further more I found this interesting web with theoretically all you need to take account in order to get to work with iBeacons in IOS 8:
http://nevan.net/2014/09/core-location-manager-changes-in-ios-8/
But your problem I think it's because the format of your adverts isn't Apple one's. You have to modify the Company identifier code in order to set this 0x004C, which matches with the Apple's one.
I had Nordic's Company Identifier:
+----------------------------------------------------+----------------- - - -
| Packet sniffer frame header |
+----+-------------+-------------------------+-------+
|info| Packet nbr. | Time stamp | Length| Packet data
+----+-------------+-------------------------+-------+----------------- - - -
| 01 | 0C 00 00 00 | 49 12 27 44 00 00 00 00 | 30 00 | 2F D6 BE 89 8E 40 24 4E A0 C3 8B 04 FF 02 01 04 1A FF **59 00** 02 15 01 12 23 34 45 56 67 78 89 9A AB BC CD DE EF F0 00 01 00 01 BB BA 88 BA 37 A5
+----+-------------+-------------------------+-------+----------------- - - -
And you need:
+----------------------------------------------------+----------------- - - -
| Packet sniffer frame header |
+----+-------------+-------------------------+-------+
|info| Packet nbr. | Time stamp | Length| Packet data
+----+-------------+-------------------------+-------+----------------- - - -
| 01 | 01 00 00 00 | ED 07 68 00 00 00 00 00 | 30 00 | 2F D6 BE 89 8E 40 24 E4 98 E6 3C 1B 5D 02 01 1A 1A FF **4C 00** 02 15 01 12 23 34 45 56 67 78 89 9A AB BC CD DE EF F0 00 00 00 00 C5 E8 19 24 3A A5
+----+-------------+-------------------------+-------+----------------- - - -
I have put between ** ** the hex numbers you should modify.
Now it works perfect for me.
Regards.

What kind of checksum algorithm?

i trying to comunicate with an bluetooth device and already have the commando codes. the problem is i think theres is a checksum algorithm implemented and i dont know which one. Already tried some algorithms but without success. Here are some commando codes as hex array:
C0 54 07 00 01 00 00 01 10 02 FA
C0 54 07 00 01 00 00 02 10 02 22
C0 54 07 00 00 00 00 02 10 02 0C
C0 54 07 01 00 00 00 02 10 02 AC
C0 54 07 01 00 00 01 02 10 02 56
C0 54 07 01 00 00 01 02 10 03 F0
C0 54 07 01 00 00 01 02 11 03 88
The first 3 bytes are always the same so i dont think hey are included in the calculation. Must be the adress or something similar. The 7 Bytes in the middle: the adjacent byte arrays are always differ in just one byte. I captured the commandos with wireshark while i changed one parameter after another on the device successively. On the device are 7 function. That indicates that each of the 7 bytes should be for one different parameter. The last byte shold be a checksum, i think. because its always a different one. I i would appreciate if somebody can help!

4 byte checksum, sum32 algorithm for Epson printers

I'm programming a low level communication with an Epson tm-t88iv thermal printer on a Linux device, which receives only hexadecimal packages. I have read the manual trying to understand how the checksum is built but i can't manage to recreate it.
the manual says that the checksum are 4 bytes representing the 2 bytes sum of all the data in the package sent.
I have currently four working examples I found by listening to a port on a windows computer with a different program. the last 4 hexadecimals are the checksum (03 marks the end of the data and is included in the checksum calculation, according to the manual).
02 AC 00 01 1C 00 00 03 30 30 43 45
02 AC 00 00 1C 80 80 1C 00 00 1C 00 00 1C 03 30 32 32 31
02 AD 07 01 1C 00 00 1C 31 30 03 30 31 35 33
02 AD 00 00 1C 80 80 1C 00 00 1C 00 00 1C 03 30 32 32 32
I have read somewhere that there is a sum32 algorithm but i can't find any example of it or how to program it.
Wow, this is a bad algorithm! If someone else finds himself trying to understand Epson's terrible low-level communication manual, this is how the check-sum is done:
The checksum base is 30 30 30 30
Sum in hexadecimals all of the data package (for example, 02+89+00+00+1C+80+80+1C+00+01+1C+09+0C+1C+03 = 214)
Then separate the result digit by digit, if its a letter add 1 to the value (for example B2 would be 2|1|4).
sum it to the checksum base number by number starting from right to left (this would be a checksum of 30 32 31 34).
Note: It works perfectly, but for some reason the examples I posted above don't seem to match so much. They are all the printers response, but slightly after it got a hardware problem and had to be reformatted by technical support, so maybe it got fixed.
I hope it helps somebody somewhere.

Delphi 7 turn off creation of DDP files

How do you turn off the feature or stop the creation of all the .ddp files for your Delphi 7 forms? I read something about removing the designdgm60.bpl, but is that the only way? It seems that there was another way I can't remember any longer.
Update: I tried renaming the designdgm70.bpl and that just creates a ton of program errors.
Also, I'm using Delphi 7.2 on one computer and there is no design tab I can see unless its covered by something in CnWizards. 7.2 definitely creates the ddp files though.
DDP files are for Delphi diagrams (DDP stands for Delphi Diagram Portfolio) in Delphi 6-7. Delphi 5 used the DTI extension for this.
DDP files can have meaningful information. They don't get compiled into .DCU/.EXE./... as they are for documentation purposes only.
Did you create diagrams of components on your form/datamodule? I used to do that (to explain structure to co-workers) so I was actually really happy with the DDP files.
Before deleting them, inspect them to see if they contain documentation you want to keep.
You can safely delete them if they are 51 bytes long and the TDUMP of it looks like this:
000000: 07 18 44 45 4C 50 48 49 2E 44 49 41 47 52 41 4D ..DELPHI.DIAGRAM
000010: 2E 50 4F 52 54 46 4F 4C 49 4F 0F 00 00 E0 40 02 .PORTFOLIO....#.
000020: 01 09 06 09 55 6E 74 69 74 6C 65 64 31 06 00 02 ....Untitled1...
000030: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
I suppose that it's impossible to turn off .ddp creation in IDE by built-in methods, but DDevExtensions tool includes this option (File Cleaner)
You can install DDevExtensions which is free.
There is an option which you can check that automatically deletes .ddp files.

Resources