Vlatko Kosturjak (@k0st) and Dobrica Pavlinusic (@dpavlin) Droidcon Zagreb, 28th of April, 2016
45 minutes
char peer0_0[] = {
0xa1, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b,
0xff, 0xa1, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00,
0x7b, 0xff };
tshark -r pcap1.pcap -T fields -e data
tshark -r pcap1.pcap -T fields -e data | grep a17 | less
a17b8e0000000009ff
a17b8e0000000009ff
a17b8e0000000009ff
a17b00000000007bff
a17b00000000007bff
a17b00000000007bff
Let's pray to the demo gods
She wants it back now :)
su
setprop service.adb.tcp.port 5555
stop adbd
start adbd
adb tcpip 5555
adb connect 192.168.0.101:5555
sbSerialPort port = driver.getPort(0);
port.open(connection);
try {
port.setBaudRate(115200);
byte buffer[] = new byte[16];
int numBytesRead = port.read(buffer, 1000);
Log.d(TAG, "Read " + numBytesRead + " bytes.");
} catch (IOException e) {
} finally {
port.close();
}
cordova platform add android
cordova plugin add https://github.com/xseignard/cordovarduino.git
cordova run android --device
$(document).ready(function(){
$("#connect_button").click(function(){
serial.requestPermission(
function success(){
// BaudRate for many Chips: 115200, Sometimes arduino: 9600
var opts = {"baudRate":115200, "dataBits":8, "stopBits":1, "parity":0, "dtr":false}
serial.open(opts,
function success(){
alert("Success");
}, function error(evt){
alert("Error");
}
);
},
function error(evt){
alert("Error");
}
);
});
});
Let's pray to the demo gods