This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem in LSEID handeling for A2DP source



hey ..
I am trying to implement an A2DP source using bluetopia and DKLM3SD96 .


when I register the devlopment kit as A2DP Source a LSEID is returned.
when I proceed the other further after GAVD_Connect when I try to open remote endpoint using
GAVD_Open_Remote_End_Point(), it also returns LSEID . thus the first LSEID is 1 for the Development kit
and the second one is 2 for the same .. thus this is ambigious !!..

so in the etGAVD_Open_End_Point_Confirmation event I am getting an error of BTGAVD_ERROR_INVALID_OPERATION.
My problem is that how do I require to handle this situation. please Help.

thank you..

  • Hi Vishvesh,

    LSEID are the local "alias"es for an endpoint. So if you register an endpoint you will get an LSEID that is used for any activity on that endpoint.

    When you open a remote endpoint (say remote device has can accept connection on RSEID 5), you open it, you will get an LSEID of 1or 2 depending on when you do it. Now any communication (including the confirmation) will use that LSEID. These will be unique from a local context. You can open RSEID 5 on remote device 1, 2 or 3 and you will get a unique LSEID for all of these. 

    Hope this helps to understand. Let us know if you want to discuss further.

    Best Regards,

    Stonestreet One. 

  • thank you for your help ..

    I have been working around the pseudocode http://e2e.ti.com/support/low_power_rf/f/660/p/176665/644201.aspx#644201  and successfully connected the source with my A2DP headsets.

    I am able to record a single frame  when implementing on  my DK LM3S9D96 kit  as a source from the GAVD _Data_indication event, this same frame I am passing to the GAVD_Data_Write() the function is returning successfully . but the problem is that I am unable to hear anything on my Headfones .

    also I have a Query that how should I set the volume of the source to a maximum level during initialization ?

    Attaching here is the C file of the Bluetooth Source ..4442.bluetooth.c 

    thank You...

    Vishvesh

  • Hi Vishvesh,

    Not sure if we missed something but not able to see the contents of Write123 buffer that you are sending using GAVD_Data_Write. Can you send some details on the data that is in there?

    Best Regards,

    Stonestreet One

  • to record  Write123 i had done the following ..

    first i was running the original code for the sink which came with the kit as a demo application ..

    the connected it to my cellphone which was a source for my application .. then I have generated a beep tone by a tone generator application and played.  had printed the data received in   GAVD _Data_indication event  recorded the same in CSV format . I used this recorded array frame in the GAVD_Data_Write() with the same parameters as the recorded . i am repeteadly calling GAVD_Data_Write()to play the same frame .

     I am attaching SBC frame herewith.. 

    5367.variable.h

  • Hey , 

    I  have registered an endpoint on the development board as a sink ... now I am also implementing source on this kit . for this the discovery is 

    initiated by the source .... 

     now the connections , paring is all working  fine.  the media data packet received in the etGAVD_Data_Indication (from Smartphone[source]) event I am writing the  GAVD_Data_Write() (To A2Dp headphone(Sink)) so that my develpoment kit will act as a intermediate device between a smartphone (Source ) and a BT headphone (Sink) which will be routing the data .

     the function GAVD_Data_Write() is returning  a value -65  which is erratic . what does this errorcode mean ???

    also what could be the possible error .. 

    I am attaching my code in the file Bluetooth.C .. please help

    PFA bluetooth.c

    8117.bluetooth.c

     

  • Hi Vishvesh,


    Since these are SBC encoded frames that you are passing through from SRC1 to Sink2 it is necessary that your Sink2 is configured similar to your Sink1. Can you confirm if they are identical? Also the L2CAP MTU for the connection when you are the source and you are sending to the headphones.

    I took a look at the data, it looks ok at a high level, it has 7 SBC frames and the frames will be repeated. If you can confirm that the parameters are identical, then we can go from there. 

    Best Regards,

    Stonestreet One.