- Install Expo as global package (
npm i -g expo expo-cli
) - Install React-native as global package (
npm i -g react-native-cli
) - Install other packages (
npm i
) - Link UDP native dependency (
react-native link react-native-udp
) - Run app using ExpoCLI (
expo start --lan
) - Install Expo app on your phone
- Run Expo and scan QRCode
- check WiFi name - drones network has specific name
- check Bluetooth device name - Xbox pad has specific name
- add Xbox pad key schema presentation
- add Xbox pad configuration
There was used very simple algorithm for most commands. I need subtract all bytes from each other. Example:
const _ = messageWithoutChecksum = Buffer.from('ff087e3f403f90121200', 'hex');
const checksum = Buffer.from([ _[0] - _[1] - _[2] - _[3] - _[4] - _[5] - _[6] - _[7] - _[8] - _[9] ])[0];
// checksum === 0x07
I found only 2 exceptions to this relationship:
- calibration command (
ff087e3f403fd0121200cb
) - stop command (
ff087e3f403f901212a069
)