Code Monkey home page Code Monkey logo

rfduinotest's Introduction

Application to control RFduino devices from an Android phone

Compiles fine on Ubuntu 13.10.

Requirements, gradle:

sudo add-apt-repository ppa:cwchien/gradle
sudo apt-cache search gradle
sudo aptitude install gradle-1.10

Do not download the 1.11 one, it fails on my system. Also do not use the default one from Canonical. I don't even know how old that one is.

Update Android if necessary. I adjusted the gradle.build file here to use Android 4.4 (version 19) as is the target in the Manifest.

cd /opt/android-sdk-linux/tools
./monitor

And update the thing via the menu options.

Bugs

If you see bugs, please contact the original developer. The one I pletted myself was the absence of drawables.

Debugging

Everything time you use another application to connect to the RFduino, for example the nRF Console Panel from Nordic itself to read the services and characteristics, it is wise to restart Bluetooth.

If you run the debugger:

adb logcat

You see often commands like:

W/bt-l2cap(17164): L2CAP - LE - cannot start new connection at conn st: 2

This means that there is still a connection request somewhere. It can be also a request done by the same app, but you switched temporarily to look at an email or something. Just be lazy and turn off and on Bluetooth as a habit. This is very likely due to some bugs in the bluetooth stack of Samsung and not much you can do about it. Perhaps except for one thing. Change the code to a disconnect before a connect. I've to check that.

License

This project is licensed under the MIT License.

Copyright

Copyright 2013 Lann

rfduinotest's People

Contributors

lann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rfduinotest's Issues

Reading Floats being sent by the RFduino

Hi @lann , I have been using your test project but i am facing an issue. I cant figure out how to read float values being sent by the RFduino to the android application. I have tried Floatbuffer, float.parse string, even the HEX helper but all in vain . From what i understand your code gives us a way to get the recieved data (initially in the form of bytes) in the form of a string or convert it into HEX values. but it would be extremely helpfull if you can let me know how to solve this problem

Does not work with Android 6

Turn on GPS and it will work again.

The app should be updated for Android 6 (M) to request permission ACCESS_COARSE_LOCATION if the app is running on Android 6.

Can't connect

When I start the application I find my device by scan button, when I try to connect nothing happens. Only state of TextView Disconncted changes to Connecting...

I also downloaded the apk. from: http://www.rfduino.com/product/rfduino-android-application/ and funny thing is that if I connect to RFduino there I also get data in my application. So it looks that is listening to data, but it won't start connection on it's own.

I am using Nesxus 5.

I had put Log.v inside RFduinoService initialize(), but nothing happens.

Cant Read Float values coming from RFDUINO

Hi @lann i am gonna update my problem statement it seemed a bit vague last time.
Code in RFDUINO so that everytime i send a value it sends me back the float value 2.34

include <RFduinoBLE.h>

void setup() {
RFduinoBLE.advertisementData = "ledbtn";
RFduinoBLE.begin();
}
void loop() {
}
void RFduinoBLE_onReceive(char *data, int len)
{
RFduinoBLE.send(2.34);
}

. when i try to do
byte[] ff = intent.getByteArrayExtra(RFduinoService.EXTRA_DATA);
Float.parseFloat(HexAsciiHelper.bytesToAsciiMaybe(ff))
i get the following errors
logcat

can you help me please?????

Descriptor on UUID_CLIENT_CONFIGURATION

Hey this isn't an issue, just a general question.

In the RFduinoService file, how do you add the Descriptor to the UUID_CLIENT_CONFIGURATION characteristic so that the following line doesn't return Null?

BluetoothGattDescriptor receiveConfigDescriptor = receiveCharacteristic.getDescriptor(UUID_CLIENT_CONFIGURATION);

I see line 72 with:
public final static UUID UUID_CLIENT_CONFIGURATION = BluetoothHelper.sixteenBitUuid(0x2902);

I'm working with another Bluetooth module: http://www.microchip.com/wwwproducts/Devices.aspx?product=RN4020

And I can't seem to find a way to set a Descriptor on a Private Characteristic.

Thanks for any help.

The RFDuinoTest app is just receiving the first nine values sent by RFDuino.

I am a new Android Programmer. I want to display the received data in an application through BLE. @lann I've just downloaded your app and have synced it with Gradle in my Android Studio. But the values displayed after received data are only the first 9 values among the ones I sent from RFDuino. However, I can see the all of values in Serial Monitor of RFDuino. Is your app supposed to display the first 9 values only? Could you please look into this?
Many thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.