So I want to see if I can get the heart rate data the ring itself is collecting. There's some way to configure the interval (and enable it) but that was already done by me in the app and I just want to get the existing data off of it.
There's a `ReadHeartRateReq` and corresponding `ReadHeartRateRsp` to investigate.
```java
public class ReadHeartRateReq extends BaseReqCmd {
private byte[] data;
public ReadHeartRateReq(long j) {
super((byte) 21);
this.data = DataParseUtils.intToByteArray((int) j);
}
@Override // com.oudmon.ble.base.communication.req.BaseReqCmd
protected byte[] getSubData() {
return this.data;
}
}
```
So packet type is `21`, and we include an int worth of "date". Looks like a simple "packing" of a 4 byte int into a bytes in LSB. Maybe this int is the current unix timestamp.
Hard to tell from reading the code, Jadx seems to struggle with Kotlin heavy code that is used in this bit of the Android app. I think it's the unix timestamp because it's used for determining the time of some of the resulting response data as well. Bit weird that this isn't using year/month/day/hour/minute fields like the sport detail response, but maybe that's just tech debt.
Tried using now's timestamp and got `bytearray(b'\x15\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x14')` which I think is an error response.
If I use midnight from today's date I get a lot of data! Possibly this is all data ever because I set the month wrong before, but we'll see once I decode this.
```python
bytearray(b'\x15\x00\x18\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x002')
bytearray(b'\x15\x01\x80\xad\xb6f\x00\x00\x00\x00\x00\x00\x00\x00\x00_')
bytearray(b'\x15\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x17')
bytearray(b'\x15\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x18')
bytearray(b'\x15\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x19')
bytearray(b'\x15\x05\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1a')
bytearray(b'\x15\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1b')
bytearray(b'\x15\x07\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1c')
bytearray(b'\x15\x08\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d')
bytearray(b'\x15\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1e')
bytearray(b'\x15\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1f')
bytearray(b'\x15\x0b\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00 ')
bytearray(b'\x15\x0c\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00!')
bytearray(b'\x15\r\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"')
bytearray(b'\x15\x0e\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00#')
bytearray(b'\x15\x0f\x00\x00Y\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00}')
bytearray(b'\x15\x10\x00k\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x90')
bytearray(b'\x15\x11`\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00k\xf1')
bytearray(b"\x15\x12\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\'")
bytearray(b'\x15\x13\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00P\x00\x00x')
bytearray(b'\x15\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00F\x00\x00\x00o')
bytearray(b'\x15\x15\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00*')
bytearray(b'\x15\x16\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00+')
bytearray(b'\x15\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00,')kj
```