@objc.typedSelector(b"v@:@^vQ")
def rfcommChannelData_data_length_(self, channel, data, length):
print(f"DATA::{data}")
@objc.typedSelector(b'v@:@@I')
def rfcommChannelWriteComplete_refcon_status_(self, rfcommChannel, refcon, status):
if status == 0: # kIOReturnSuccess
print("Data sent successfully.")
else:
print("Failed to send data.")
I've tried a lot of way, rfcomm channel can connect and open successfully, also I can send the data to my device and get the call back in delegate method(rfcommChannelWriteComplete_refconstatus), but the read data always failed, I don't know how to trigger the rfcommChannelData_datalength method, am I miss something?
sorry I am a begineer here,
I've tried a lot of way, rfcomm channel can connect and open successfully, also I can send the data to my device and get the call back in delegate method(rfcommChannelWriteComplete_refconstatus), but the read data always failed, I don't know how to trigger the rfcommChannelData_datalength method, am I miss something?