-
Notifications
You must be signed in to change notification settings - Fork 22
Printer Send Photo
James Sutton edited this page Jan 13, 2017
·
1 revision
This is by far the most complicated payload to figure out.
What I know so far:
It seems that the SP-2 can only receive messages of a specified size. It requires a value that is received from the 79 - Printer Specifications message payload (Bytes 28 & 29) The specified size is calculated the following way:
numberOfMessages = ((height x width) x 3) / maxImageSize
i = ((600 x 800) x 3) / 60000
i = 1440000 / 60000
i = 24
From this, we can also identify that the size of an image once encoded is (height x width) x 3
| Byte | Description | Hex | Notes |
| Payload | |||
| Byte 1 | Sequence No. MSB | 00 | The sequence Number of this payload from 0 to `numberOfMessages - 1` |
| Byte 2 | Sequence No. MSB+1 | 00 | |
| Byte 3 | Sequence No. MSB+2 | 00 | |
| Byte 4 | Sequence No. LSB | 00 | |
| Byte 5 to n-4 | Image Chunk Payload | .. | |
| Byte | Description | Hex | Notes |
| Payload - Header | |||
| 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.. | |
| Payload - Main | |||
| Byte 16 | 00 | ||
| Byte 17 | 00 | ||
| Byte 18 | 00 | ||
| Byte 19 | 02 | ||