Get CPR certified in 30 minutes at CPR Test Center.
Echo & Alexa Forums

How does Echo dot know where to send output?

0 Members and 1 Guest are viewing this topic.

bwana

How does Echo dot know where to send output?
« on: May 26, 2016, 11:44:51 pm »
Echo dot has a small speaker that it uses to answer voice commands. But it also has a mini plug output and bluetoothe output as well for music output. How does dot assign the TCP/IP packets it receives to the appropriate output device? I think I remember seeing a similar behavior on a windows PC using an application called teamspeak. That application could route all audio to and from the teamspeak application to the headphones while music or other audio could be played back through other speakers.

I have never had the opportunity to speak to a networking wizard so my understanding of TCP/IP may be missing some key parts. But when an application wants to initiate a communication with another computer it has to open a socket. I do not know how sockets are identified but they MUST have an address which is in the packet otherwise how would return packets know which application to return to? I may be wrong but I thought each socket gets a unique outgoing port assigned to it by the OS. This port number acts like the 'socket identifier' which allows the return packets to go to the correct application.  Even so, when the echo dot gets a 'reply packet' to a query, that is different than a packet that is part of a music stream. How are these different data packets routed to different hardware outputs?

DParker

Re: How does Echo dot know where to send output?
« Reply #1 on: May 27, 2016, 09:08:43 am »
The Echo/Dot/Tap products don't transmit audio via TCP/IP.  That protocol is used for WiFi communication (via the internet or, potentially, othe WiFi-enabled devices in your home).  As you note yourself, the audio output options that your Dot offers are its internal speaker, or an external speaker via either Bluetooth or a wired connection using its standard 3.5mm line-out jack.  None of these have anything at all to do with TCP/IP.

The Dot simply selects output hardware (internal speaker, line-out jack or Bluetooth radio) based on what you do/don't have it connected to.  If you don't have anything connected to it via the line-out jack or a Bluetooth connection then it selects the internal speaker.  If you do have something connected then it selects that connection for output.  If you have both a physical and a BT connection I don't know which it will use  but it will select one of them based on a software configured preference.  But none of this involves TCP/IP.
« Last Edit: May 27, 2016, 09:16:24 am by DParker »

bwana

Re: How does Echo dot know where to send output?
« Reply #2 on: May 27, 2016, 10:13:44 am »
Thank you. So the echo dot cannot route audio to different devices concurrently? Or map different audio streams to different outputs?

Yoda_One

Re: How does Echo dot know where to send output?
« Reply #3 on: May 27, 2016, 10:30:15 am »
@DParker is correct and you cannot stream to different devices at the same time. I assume you are nor familiar with BT.

Sent from my Pixel C using Tapatalk
« Last Edit: May 27, 2016, 10:32:26 am by Yoda_One »

bwana

Re: How does Echo dot know where to send output?
« Reply #4 on: May 30, 2016, 10:50:02 am »
... If you have both a physical and a BT connection I don't know which it will use  but it will select one of them based on a software configured preference.

Please direct me to more info on this 'software configured preference'. Is this addressable in an Alexa skill?

DParker

Re: How does Echo dot know where to send output?
« Reply #5 on: May 30, 2016, 12:16:28 pm »
... If you have both a physical and a BT connection I don't know which it will use  but it will select one of them based on a software configured preference.

Please direct me to more info on this 'software configured preference'. Is this addressable in an Alexa skill?

By that I simply mean that there's likely some logic in the audio routines that chooses between external output options when both are available.  I doubt that there's any way you can influence that.

Yoda_One

Re: How does Echo dot know where to send output?
« Reply #6 on: May 31, 2016, 05:57:27 pm »
To clarify, if you connect to speakers through 3.5mm and play Prime, etc., you still have the ability to stream music from a Android/Iso device to the Echo BT receiver and it still plays through the connected speakers.

bwana

Re: How does Echo dot know where to send output?
« Reply #7 on: June 02, 2016, 08:02:32 am »
thank you yoda. so the the echo dot can either

1) receive a music stream over bt that it plays over a speaker that is internal or connected to a the minijack

or

2) send a music stream out over bt that it receives over wifi

but it cannot send a music stream out over bt AND out the minijack concurrently?

mike27oct

Re: How does Echo dot know where to send output?
« Reply #8 on: June 02, 2016, 12:07:31 pm »

Yoda_One

Re: How does Echo dot know where to send output?
« Reply #9 on: June 02, 2016, 01:23:28 pm »
thank you yoda. so the the echo dot can either

1) receive a music stream over bt that it plays over a speaker that is internal or connected to a the minijack

or

2) send a music stream out over bt that it receives over wifi

but it cannot send a music stream out over bt AND out the minijack concurrently?
Correct. Let's take an example: Alexa play "Jazz" which ?she? will in turn start playing the music through the 3.5mm to attached amplified speaker system. Now start YouTube Vietnam Music from your tablet and send it to BT Echo...Echo say now playing music from XXXXX tablet which will plays through 3.5mm to the speakers. It does turns off the Amazon Music and start playing the Tablet Music but soon as you decide to disconnect the BT from the tablet, Echo will be set back to normal/default music play.... Replace Tablet with any BT streaming device.
I hope this helps.
« Last Edit: June 04, 2016, 07:24:53 am by Yoda_One »