Skip to content

Code 196

James Sutton edited this page Jan 7, 2017 · 2 revisions

Command 196 - Get Function Version

Unknown, but was sent 8 times before printing a Photo. The Map that is filled is then sent in an internal Android Handler message. Sadly the decompiler failed to decompile the code that handles the incoming HashMap so I'm not sure what it's used for..

Decompiled source investigation:

doSomething(Map<Int, Int> map):
    for (int number : map.keys):
        Bytes[4] bytes
        bytes[0] = 0;
        bytes[1] = 0;
        bytes[2] = (num >> 8) & 255;
        bytes[3] = (num >> 0) & 255;

        response = sendCommand(196, bytes, 4); // 4 is the length of bytes
        if(response == OK):
            map[number] = response.getTwoByteInt(2); // Byte 16+2 = byte 18

Command Code: 196

Example Command Payload

Byte Description Hex Notes
Payload
Byte 1 Unknown.. 00
Byte 2 Unknown.. 00
Byte 3 Unknown.. 00
Byte 4 Unknown.. 08

Example Response Payload

Byte Description Hex Notes
Payload
Byte 12 Return Code 00 See [Return Codes](https://github.com/jpwsutton/instax_api/wiki/Return-Codes)
Byte 13 00 Unknown..
Byte 14 Ejecting 00 (b14 >> 2 )& 1
Byte 15 3a Unknown..
Byte 16 00
Byte 17 08
Byte 18 Thing MSB 00
Byte 19 Thing LSB 00

Example Command Payload Pairs

These command and response payloads were recorded just before a picture was printed. Although they are in an odd order, from looking at the code, they would have been sent in order from 1 to 8. In all cases, only 1-8 is sent, no more no less.

Command Response Notes
00000008 00080000 0
00000005 00050001 1
00000003 00030002 2
00000004 00040001 1
00000001 00010002 2
00000007 00070000 0
00000006 00060000 0
00000002 00020002 2