Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Chuchaki

Pages: [1]
1
Android / Faulty Transmissions
« on: August 02, 2016, 07:12:50 AM »
Hello Everybody,

I have a project, where I send data to an Android phone. I get data via the serial port to the rfduino and then send this data to the phone.
First I had 20Byte Data Chunks. I use "Serial Event" to set a Flag and then read and send the data within the main loop.

Now I have 40 Bytes of data. The Rfduino reads 40Bytes of serial data and sends it in two parts (see code). The first byte of each part is an identifier used to distunguish between the different packets.
After some successful transmissions the data becomes corrupt.

This is a basic idea of the code:

Code: [Select]

void loop() {
  if (mData)
     {
      mData = false;
      Serial.readBytes(data, 40);
      while(!RFduinoBLE.send(&data[0], 20));
      while(!RFduinoBLE.send(&data[20], 20));   
      }
}

void serialEvent(void) {
  mData = true;
}


I checked the serial data with a logic analyzer and there is nothing wrong with it.

I also used wireshark to check the ble transmissions. Both 20 Byte chuncks are send within the same connection interval.
The data sent by the RFduino becomes corrupt after some time.

The serial baud rate is 9600.

When I omit the second .send command and just send 20 Bytes, the problem does not occur.

I assume, that the radio interferes with the reading of the serial port. I tried to use "while(RFduinoBLE.radioActive);" before the Serial.read, but I think the data is buffered before that. So this did not change anything.

I would apreciate any thoughts on this problem!
Does anyone have an idea what is going on?



2
Support / Data Throughput Rate
« on: May 18, 2016, 03:21:14 AM »
Hello everyone,

I am trying to develop  a platform for the measurement of biopotentials. The RFDuino is supposed to connect the board to an Android device. One mode is the transmission of raw data, which would make it necessary to transmit 750B/s to (best case) 6kB/s.

I'm aware that the BLE Protocol depends on connection intervals, packets per connection and so on. The bulk transfer gave me 1.6 to 2 kB/s. Its not great, but its something.

Until now I wasn't aware of the 9600 Baud limit for the serial interface if used with BLE. This limits the data input to about 960 B/s, which would be just enough for one data channel.

I'm going to try using the I²C or SPI Interface for better data rates.

Does anyone have some prior experience about the use of SPI or I²C together with the BLE Stack?

Is there a similar issue with the interference?

I would appreciate any thoughts on this :-)

Thanks & Greetings

Pages: [1]