Java convert string hex values to byte[], recreating this obj-c functionality
问题 I am making an app that communicates with a specific Bluetooth Low Energy device. It requires a specific handshake and this is all working perfectly in Objective-C for iOS , however, I am having trouble recreating this functionality in Java Any thoughts greatly appreciated! WORKING Objective-C code: uint8_t bytes[] = {0x04,0x08,0x0F,0x66,0x99,0x41,0x52,0x43,0x55,0xAA}; NSData *data = [NSData dataWithBytes:bytes length:sizeof(bytes)]; [_btDevice writeValue:data forCharacteristic: