DBus Transport - force transport to idle state from Bluez5 embedded side - A2DP

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I'd like to be able to force Bluez's transport state from active to idle on the rendering side of a custom embedded platform. This issue is centred around the fact that simply pausing the A2DP connection streaming side ( i.e. iPad + Youtube ) does not alter the Bluetooth transport immediately ( embedded side ). Bluetooth's transport state will only change from active to idle under certain conditions ( iPad app ); app is terminated, app is minimised or after 60+ seconds of the app being maximised and paused. The actual problem is, one use case: if the iPad app is paused I cannot detect the pause until one of the previous conditions are met as the transport doesn't change ( talking 60+ seconds to idle here ). To compound the issue if play is pressed within the 60 seconds there's no indication that streaming was resumed because the transport was still in the active state.
This is all need to perform convenience switching. Using DBus I can pause the iPad, grab the sink and give it to some other renderer but Bluetooth's transport will remain active for quite some time making it impossible to know if the user has then quickly press play on the iPad side. So theory is if on pausing the iPad remotely, if I can then force the transport
( embedded side ) from active to idle, I then know exactly when the user presses play again as the iPad will force the transport to active again in which I can detect to swap the sinks back. Any ideas?









share









New contributor




ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    0
    down vote

    favorite












    I'd like to be able to force Bluez's transport state from active to idle on the rendering side of a custom embedded platform. This issue is centred around the fact that simply pausing the A2DP connection streaming side ( i.e. iPad + Youtube ) does not alter the Bluetooth transport immediately ( embedded side ). Bluetooth's transport state will only change from active to idle under certain conditions ( iPad app ); app is terminated, app is minimised or after 60+ seconds of the app being maximised and paused. The actual problem is, one use case: if the iPad app is paused I cannot detect the pause until one of the previous conditions are met as the transport doesn't change ( talking 60+ seconds to idle here ). To compound the issue if play is pressed within the 60 seconds there's no indication that streaming was resumed because the transport was still in the active state.
    This is all need to perform convenience switching. Using DBus I can pause the iPad, grab the sink and give it to some other renderer but Bluetooth's transport will remain active for quite some time making it impossible to know if the user has then quickly press play on the iPad side. So theory is if on pausing the iPad remotely, if I can then force the transport
    ( embedded side ) from active to idle, I then know exactly when the user presses play again as the iPad will force the transport to active again in which I can detect to swap the sinks back. Any ideas?









    share









    New contributor




    ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I'd like to be able to force Bluez's transport state from active to idle on the rendering side of a custom embedded platform. This issue is centred around the fact that simply pausing the A2DP connection streaming side ( i.e. iPad + Youtube ) does not alter the Bluetooth transport immediately ( embedded side ). Bluetooth's transport state will only change from active to idle under certain conditions ( iPad app ); app is terminated, app is minimised or after 60+ seconds of the app being maximised and paused. The actual problem is, one use case: if the iPad app is paused I cannot detect the pause until one of the previous conditions are met as the transport doesn't change ( talking 60+ seconds to idle here ). To compound the issue if play is pressed within the 60 seconds there's no indication that streaming was resumed because the transport was still in the active state.
      This is all need to perform convenience switching. Using DBus I can pause the iPad, grab the sink and give it to some other renderer but Bluetooth's transport will remain active for quite some time making it impossible to know if the user has then quickly press play on the iPad side. So theory is if on pausing the iPad remotely, if I can then force the transport
      ( embedded side ) from active to idle, I then know exactly when the user presses play again as the iPad will force the transport to active again in which I can detect to swap the sinks back. Any ideas?









      share









      New contributor




      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'd like to be able to force Bluez's transport state from active to idle on the rendering side of a custom embedded platform. This issue is centred around the fact that simply pausing the A2DP connection streaming side ( i.e. iPad + Youtube ) does not alter the Bluetooth transport immediately ( embedded side ). Bluetooth's transport state will only change from active to idle under certain conditions ( iPad app ); app is terminated, app is minimised or after 60+ seconds of the app being maximised and paused. The actual problem is, one use case: if the iPad app is paused I cannot detect the pause until one of the previous conditions are met as the transport doesn't change ( talking 60+ seconds to idle here ). To compound the issue if play is pressed within the 60 seconds there's no indication that streaming was resumed because the transport was still in the active state.
      This is all need to perform convenience switching. Using DBus I can pause the iPad, grab the sink and give it to some other renderer but Bluetooth's transport will remain active for quite some time making it impossible to know if the user has then quickly press play on the iPad side. So theory is if on pausing the iPad remotely, if I can then force the transport
      ( embedded side ) from active to idle, I then know exactly when the user presses play again as the iPad will force the transport to active again in which I can detect to swap the sinks back. Any ideas?







      linux embedded bluetooth d-bus bluez





      share









      New contributor




      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share









      New contributor




      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share



      share








      edited just now









      Rui F Ribeiro

      37.9k1475123




      37.9k1475123






      New contributor




      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 mins ago









      ed trx850

      1




      1




      New contributor




      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      ed trx850 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.

























          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          ed trx850 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479984%2fdbus-transport-force-transport-to-idle-state-from-bluez5-embedded-side-a2dp%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          ed trx850 is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          ed trx850 is a new contributor. Be nice, and check out our Code of Conduct.












          ed trx850 is a new contributor. Be nice, and check out our Code of Conduct.











          ed trx850 is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479984%2fdbus-transport-force-transport-to-idle-state-from-bluez5-embedded-side-a2dp%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?