mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Add more debug logging to rppairing
This commit is contained in:
@@ -99,6 +99,8 @@ impl<'a, R: ReadWrite> RemotePairingClient<'a, R> {
|
|||||||
"startNewSession": true
|
"startNewSession": true
|
||||||
}})
|
}})
|
||||||
.await?;
|
.await?;
|
||||||
|
debug!("Waiting for response from verifyManualPairing");
|
||||||
|
|
||||||
let pairing_data = self.receive_pairing_data().await?;
|
let pairing_data = self.receive_pairing_data().await?;
|
||||||
let pairing_data = match pairing_data.as_str() {
|
let pairing_data = match pairing_data.as_str() {
|
||||||
Some(p) => p,
|
Some(p) => p,
|
||||||
@@ -191,6 +193,7 @@ impl<'a, R: ReadWrite> RemotePairingClient<'a, R> {
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
debug!("Waiting for signbuf response");
|
||||||
self.send_pairing_data(json! {{
|
self.send_pairing_data(json! {{
|
||||||
"data": B64.encode(tlv::serialize_tlv8(&msg)),
|
"data": B64.encode(tlv::serialize_tlv8(&msg)),
|
||||||
"kind": "verifyManualPairing",
|
"kind": "verifyManualPairing",
|
||||||
@@ -209,6 +212,7 @@ impl<'a, R: ReadWrite> RemotePairingClient<'a, R> {
|
|||||||
|
|
||||||
let data = B64.decode(res)?;
|
let data = B64.decode(res)?;
|
||||||
let data = tlv::deserialize_tlv8(&data)?;
|
let data = tlv::deserialize_tlv8(&data)?;
|
||||||
|
debug!("Verify TLV: {data:#?}");
|
||||||
|
|
||||||
// Check if the device responded with an error (which is expected for a new pairing)
|
// Check if the device responded with an error (which is expected for a new pairing)
|
||||||
if data
|
if data
|
||||||
@@ -232,6 +236,7 @@ impl<'a, R: ReadWrite> RemotePairingClient<'a, R> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub async fn attempt_pair_verify(&mut self) -> Result<serde_json::Value, IdeviceError> {
|
pub async fn attempt_pair_verify(&mut self) -> Result<serde_json::Value, IdeviceError> {
|
||||||
|
debug!("Sending attemptPairVerify");
|
||||||
self.send_plain_request(json! {
|
self.send_plain_request(json! {
|
||||||
{
|
{
|
||||||
"request": {
|
"request": {
|
||||||
@@ -247,6 +252,7 @@ impl<'a, R: ReadWrite> RemotePairingClient<'a, R> {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.await?;
|
.await?;
|
||||||
|
debug!("Waiting for attemptPairVerify response");
|
||||||
let response = self.receive_plain_request().await?;
|
let response = self.receive_plain_request().await?;
|
||||||
|
|
||||||
let response = response
|
let response = response
|
||||||
|
|||||||
Reference in New Issue
Block a user