Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>@ Jieqin - great that you got it too :)</p> <p>paste this in your reading thread under the block of</p> <pre><code>else if (data[0] == (byte)0xE7){ Log.i(TAG, "E7"); //work for legacy device... if (data[18] == (byte) 0x0d &amp;&amp; data[19] == (byte) 0x1d) //fixed report </code></pre> <p>to parse your agents answer - and if it works, please rate my hints :)</p> <pre><code>else if (data[18] == (byte) 0x0d &amp;&amp; data[19] == (byte) 0x1f) //mp var report { count = 999; //set invoke id so get correct response invoke = new byte[] { data[6], data[7] }; //write back response (new WriteThread(mFd)).start(); //parse data!! int length = data[21]; Log.i(TAG, "length is " + length); // check data-req-id int report_no = data[25]; int number_of_data_packets = data[29]; //packet_start starts from handle 0 byte int packet_start = 36; final int SYS_DIA_MAP_DATA = 1; final int PULSE_DATA = 2; final int STATUS = 3; for (int i = 0; i &lt; number_of_data_packets; i++) { int obj_handle = data[packet_start+1]; switch (obj_handle) { case SYS_DIA_MAP_DATA: int sys = byteToUnsignedInt(data[packet_start+9]); int dia = byteToUnsignedInt(data[packet_start+11]); int map = byteToUnsignedInt(data[packet_start+13]); Log.i(TAG, "sys is "+ sys); sendMessage(RECEIVED_SYS, sys); Log.i(TAG, "dia is "+ dia); sendMessage(RECEIVED_DIA, dia); Log.i(TAG, "map is "+ map); break; case PULSE_DATA: //parse int pulse = byteToUnsignedInt(data[packet_start+5]); Log.i(TAG, "pulse is " + pulse); sendMessage(RECEIVED_PUL, pulse); break; case STATUS: //need more signal Log.i(TAG, "STATUS"); break; } packet_start += byteToUnsignedInt(data[packet_start+3]) + 4; //4 = ignore beginning four bytes } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload