This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

flush out existing used pipe for reuse in nRF8001 in pic18f?

`Hi Guys, I have some sensor data of 20 bytes at each measurement at different period stored in EEPROM. Now i have to transmit all data over BLE continously.

example : say 20 bytes of data at 7 different time period = 140 bytes of data.

Now i'm using BlueSendData to transmit my data in while loop as i'm using pipe number 1 with buffersize of 20 bytes. what i'm seeing is that it is not updating my data measurement in android app. after some time i came to know that i have support of max. of 62 pipes with each pipe capability of handling 20 bytes of data.

what i'm looking is how can i flush out my pipe immediately after sending 20 bytes of data so that i can use same pipe for sending another 20 bytes of data.

regards, gbiradar `

Parents
  • I don't know whether it is correct or not, Once i send first 20 bytes of data i have read eventcode in while loop when eventcode returns data ack then i can send my next 20 bytes of data i checked with my application perfectly it is working.

  • What Awneil says is true: You have two available credits. So you can send one packet per event on average, or two in the same event if both buffers are prepared prior to the event. This means you have to check how many credits that are freed in the DataCreditEvent.

Reply
  • What Awneil says is true: You have two available credits. So you can send one packet per event on average, or two in the same event if both buffers are prepared prior to the event. This means you have to check how many credits that are freed in the DataCreditEvent.

Children
No Data