Need pointing out in BLE-Android application.

ahmed96alaaahmed96alaa Cairo, Egypt
I'm about to implement an android application that can send and receive data from the Cyton-32-bit board.

I'm aware that the RFduinoBLE is much slower than the RFduinoGZLL used in the serial communication between the Board and the USB dongle.

So, i'm not going to send the recorded data in the time of recording to the android device, Instead i'm going to write the data on the SD card and send back the file to the android device after the recording is done.

I just need pointing out to the right direction of where i'm going to start with, and what parts am i going to edit or re-implement in both the OpenBCI-32-library and the Board's RFduino radio module code.

Thanks in advance.

Comments

  • wjcroftwjcroft Mount Shasta, CA
    Ahmed, hi.

    Have you ruled out the Wifi Shield? That is indeed the easiest option.

    William

  • wjcroftwjcroft Mount Shasta, CA
    https://openbci.com/community/cyton-ble-code-now-in-alpha/

    I'm not sure it ever left alpha test stage.

  • wjcroftwjcroft Mount Shasta, CA
    I'm not suggesting you don't purchase the Wifi Shield. But if you are really low low budget, such breakout boards should be adaptable, $10.

  • ahmed96alaaahmed96alaa Cairo, Egypt
    Thank you so much for your reply..
    The WIFI Shield solution is not preferred in our situation, not because of the budget but because of the nature of our application,

    The solution we decided to implement is much simpler than the one in the link you kindly provided, ours will be simply limited to the following:

    1- The RFduino chip on the board (Device) will get a triggering signal from the Android device which uses BLE.
    2- The RFduino in turn will make the ChipKit MC start recording from the desired channels with the desired sampling frequency and write directly to the SD card without sending anything to the RFduino.
    3- The RFduino chip on the board will later get another triggering signal from the Android device to make the ChipKIT MC terminate the recording session.
    4- The RFduino chip on the board will then have to send the contents of the recordings file on the SD card back to the android device.

    Notes:
    - It might seem a bad UX waiting for the file to have the data recorded on it, closed and then sent back to the android device,, but the nature of the single recording session in our application will not exceed the limits of one to three seconds. So, it won't be that bad.
    - we'll also consider the option of not writing unnecessary data bytes to the SD card while recording, for example completely removing the turned-off  channels and the Auxiliary bytes columns, which will help in turn to reduce the file sending time of course.

    So, if i'm wrong please please correct me, what we'll have to edit or re-implement in our situation is:
    - The OpenBCI_32bit & OBCI32_SD libraries.
    - The RFduino firmware.

    Thanks in advance :) 
  • wjcroftwjcroft Mount Shasta, CA
    Ahmed, thanks for the clarification.

    I'm not sure what kind of Android device you are using. But almost all of them these days support what is called "USB Host mode". This is achieved with the aid of a short adapter cable which has a male micro usb on one end (plugs into Android), the the other cable end has a standard size female usb connector. Thus the Cyton dongle can be plugged into the Android. Using Android API, you can then access this as a normal serial port and use the documented Cyton serial stream control (SDK) and data formats to send / receive data. Adding a few additional commands would be much easier than going the BLE route.

    On the other hand, if you are determined to implement your proposed mods to the onboard RFDuino, then AJ's Cyton BLE link (I gave earlier) is a good starting point. 

    Regards,

  • ahmed96alaaahmed96alaa Cairo, Egypt
    Thank you so much for your reply.
    I'll take the USB solution in consideration surely, i haven't thought of this before actually :"D  
Sign In or Register to comment.