Byte [] value=https://bbs.csdn.net/topics/new byte [5].
The value of [0]=1;
If (recordId<10) {
Int a=Integer. The valueOf (recordId. ToString ());
The value [1]=(byte) ((byte) a + '0');
The value [2]=0;
The value [3]=0;
The value [4]=0;
}
MPresenter. WriteCharacteristicValue (BLEConfig. SVR_UUID, BLEConfig CONTROL_UUID, value);
This is the inside of the Java code to the
NSData * data;
If (number & lt; 10) {
Nsstrings * strData=https://bbs.csdn.net/topics/[nsstrings stringWithFormat: @ 0% "01 d," number].
NSLog (@ "% @", strData);
NSArray
For (NSInteger I=0; I
UInt8 byte=(UInt8) strtoul ([obj UTF8String], 0 16th);
Bytes=byte;
}
NSLog (@ "% s", bytes);
Data=https://bbs.csdn.net/topics/[NSData dataWithBytes: bytes length: dataArr. Count];
}
[self. Peripheral writeValue: data? ForCharacteristic: self. WritedongtaiCharacteristic type: CBCharacteristicWriteWithResponse];
This is my turn of oc