Android Developer SDK
At last, PandwaRF has an Android SDK. The library is called gollum. You can include this library module to your Android project and develop your own application to drive your PandwaRF.
Complete PandwaRF API documentation can be found here.
In your project build.gradle, add the Repo Read URL for PandwaRF Gollum Android Lib:
allprojects {
repositories {
...
maven {
// Repo Read URL for PandwaRF Gollum Android Lib
url "https://mymavenrepo.com/repo/l8uzsKQuWwYGByPmlbZ4/"
}
}
}
In your application Module build.gradle, provide the gradle dependency: nrftoolbox
dependencies {
...
// Gollum Lib components
implementation 'de.greenrobot:eventbus:2.4.1'
implementation 'com.comthings.pandwarf:nrftoolbox:{x.y.z}'
implementation 'com.comthings.pandwarf:gollum:{x.y.z}'
...
}
All PandwaRF methods are accessible using a singleton instance of GollumDongle class.
GollumDongle.getInstance(getActivity()).setBleManagerAppCallbacks(bleManagerCallbacks);
GollumDongle.getInstance(getActivity()).searchDevice(new ScannerListener() {
@Override
public void onSignalNewDevice(final ExtendedBluetoothDevice device) {
...
GollumDongle.getInstance(getActivity()).openDevice(device, true, false, bleManagerCallbacks);
...
}
@Override
public void onSignalUpdateDevice(ExtendedBluetoothDevice device) {
}
@Override
public void onSignalEndScan(Exception e) {
}
});
GollumDongle.getInstance(getActivity()).stopSearchDevice();
GollumDongle.getInstance(getActivity()).openDevice(device, true, false, bleManagerCallbacks);
GollumDongle.getInstance(getActivity()).closeDevice();
in your activity onPause() method
@Override
protected void onPause() {
...
// If you want to keep BLE background connection
if (!isKeepConnectionInBackgroundEnabled()) {
Log.d(TAG, "BLE connection pause, going to background");
// Warning: Do not call this if connected in USB
GollumDongle.getInstance(getParent()).pause();
}
...
in your activity onResume() method
@Override
protected void onResume() {
...
// If you want to resume BLE background connection
if (!isKeepConnectionInBackgroundEnabled()) {
Log.d(TAG, "Auto reconnect - onResume() - to last BLE mac address");
GollumDongle.getInstance(this).reconnect("");
}
...
GollumDongle.getInstance(getActivity()).setUsbManagerAppCallbacks(usbManagerCallbacks);
When USB is connected/disconnected, the following methods are called
public void onUsbDeviceConnected(String deviceName);
public void onUsbDeviceDisconnected(String deviceName);
Do not call the pause() method if you are connected in USB.
@Override
protected void onPause() {
...
// Warning: Do not call pause() if connected in USB
//GollumDongle.getInstance(getParent()).pause();
...
in your activity onDestroy() method
@Override
protected void onDestroy() {
...
GollumDongle.getInstance(this).destroy();
...
GollumDongle.getInstance(getActivity()).txSetup(freq, mod, datarate);
// txSend() takes an ASCII buffer as input
// 1 byte = 2 hex digits ==> Eg. "0xAB0F" is stored in data[] as [0x41, 0x42, 0x30, 0x46, ...]
byte[] data = { 0x41, 0x42, 0x30, 0x46, ... };
GollumDongle.getInstance(getActivity()).txSend(data.getBytes(), data.getBytes().length / 2, true);
Receive from background task:
GollumDongle.getInstance(getActivity()).rxSetup(freq, mod, drate, frameLength);
while(true) {
byte[] bufferHex = new byte[frameLength]; // Hex buffer : range [0x00 to 0xFF]
rx_size = GollumDongle.getInstance(getActivity()).rxListen(bufferHex , frameLength);
// Convert buffer to ASCII. Since 1 byte is coded in 2 ASCII digits, bufferAsciiStr size = bufferHex size * 2
String bufferAsciiStr = Utils.byteArrayToHexString(bufferHex, rx_size);
}
Receive from UI thread:
GollumDongle.getInstance(getActivity()).rxSetup(freq, mod, drate, frameLength, new GollumCallbackGetInteger() {
@Override
public void done(int result) {
Log.d(TAG, "rxSetup finished: " + result);
while (true) {
byte[] bufferHex = new byte[frameLength]; // Local Hex buffer : range [0x00 to 0xFF]
rx_size = GollumDongle.getInstance(getActivity()).rxListen(bufferHex, frameLength, new GollumCallbackGetInteger() {
@Override
public void done(int result) {
Log.d(TAG, "rxListen finished: " + rx_size);
}
});
}
}
});
// Set the delay between each RSSI packet
GollumDongle.getInstance(getActivity()).rfSpecanSetPktDelay(0, progress, new GollumCallbackGetInteger() {
@Override
public void done(int integer) {
Log.d(TAG, "Delay between 2 SpecAn packets set");
}
});
...
// Kick the SpecAn
GollumDongle.getInstance(getActivity()).rfSpecanStart(0, (int) (basefreqMHz * MHZ_TO_HZ), incHz, specchans, measInterval);
...
// Store data (do this from background thread)
while (true) {
// Array to store RSSI values
byte[] rssi_buffer = new byte[specchans];
int numRssiMeas = GollumDongle.getInstance(activity).rfSpecanGetRssi(rssi_buffer, specchans);
// Now display the data...
...
}
...
// Stop the SpecAn
GollumDongle.getInstance(getActivity()).rfSpecanStop(0, new GollumCallbackGetInteger() {
@Override
public void done(int integer) {
Log.d(TAG, "SpecAn successfully stopped");
}
});
GollumDongle.getInstance(getActivity()).rfBruteForceAttackStart(0, 433000000, 5000, 0x30,
8, 0, 100, // CodeWord: 8 bits, starts brute from index 0 to 100
5, true, 100, // repeat each frame 5 times, use Little Endian for transmission, 100ms interframe
0x8E, 0xEE, 0x00, 0x00, // Symbols encoding
4, "80000000", // Synchro word
new GollumCallbackGetInteger() {
@Override
public void done(int result) {
Log.d(TAG, "Brute Force successfully started");
}
});
...
// Get Brute Force status: do this from background thread
GollumDongle.getInstance(activity).rfBruteForceAttackStatusUpdate(0, new GollumCallbackGetInteger() {
@Override
public void done(int status) {
Log.d(TAG, "New Brute force Status update: " + status);
}
});
...
GollumDongle.getInstance(activity).rfBruteForceAttackStop(0, new GollumCallbackGetInteger() {
@Override
public void done(int result) {
Log.d(TAG, "Brute Force finished: " + result);
}
});
PandwaRF API documentation can be found here.
- Spectrum Analyzer sample application
- RX/TX sample application
- JavaScript sample application
Questions or need help? Get in touch or open an Issue!
Project Information
- PandwaRF Home
- General Overview
- Technical Overview
- Possible Applications
- Development Status
- Requirements
PandwaRF Android Application (Normal Mode)
- Quick Start
- Navigation
- Navigation on Tablet
- Android Permissions
- Activity states
- Kaiju account connection
- Kaiju delete account
- Scan
- Bus Service
- Rx/Tx
- Kaiju Analysis
- Rolling code analysis & generation
- Rx Data Rate Measurement
- Spectrum Analyzer
- RF Power Amplifiers
- RF Brute Force
- RF Brute Force Tutorial
- RF Brute Force Session Import Tutorial
- RF Brute Force De Bruijn
- Protocols
- Jamming
- JavaScript
- FW Update
- Dev Mode
- USB Connection
- Pairing/Bonding
- Keeloq Secure Decrypt
- Get PandwaRF Gov App
PandwaRF Android Application (Dev Mode)
- BLE Perf measurement
- CC1111 RF registers direct access
- BLE Errors
- Bus Service Extended
- BLE Parameters
Marauder Android Application
iOS Application
Linux
Hardware
- Architecture
- Power Management
- Buttons
- LEDs Indication States
- Schematics
- Programming
- Battery
- Antennas
- PandwaRF Bare Settings
- FW releases Nordic
- FW releases CC1111
For developers
- Scripting with JavaScript
- JavaScript Functions Mapping
- Scripting with Python
- BLE Services & Characteristics
- CC1111 RfCat Commands
- PandwaRF Android SDK
- PandwaRF Android API
- RX Data Post Rest API
- Software and available applications
Support
- User Guides
- FAQ
- Tested Devices
- Known Issues
- BLE connection issues
- How to clear secure pairing
- How to report an issue
- PandwaRF test procedure
- Recovery mode
- PandwaRF Device Bounty
- Product return information
- Discord Server
- Forum (legacy)
- Chat (legacy)
- Privacy Policy
- Terms & Conditions
Gimme moar!