O que aciona as transmissões BluetoothDevice.ACTION_ACL?

Gostaria de saber quais eventos em dispositivos físicos remotos acionam ACTION_ACL_CONNECTED e ACTION_ACL_DISCONNECTED em um dispositivo de escuta. Meus resultados de teste não fazem sentido. Reuni vários dispositivos a alguns decímetros um do outro:

a Galaxy Tab P7500 executando o Android 3.1

um telefone i5500 com Android 2.2

um PC winXP com um dongle USB Bluetooth

dois fones de ouvido com botões on / off

Primeiro, emparelhei manualmente todos os dispositivos da guia. Nem PC nem telefone estão emparelhados com nenhum outro dispositivo além da guia. (Um dos fones de ouvido nunca pode ser encontrado pela guia de forma alguma, mas pode ser facilmente encontrado no telefone, manual e programaticamente). Então, tenho um aplicativo simples para iniciar a descoberta e que escuta e exibe as transmissões da ACL. E é isso que acontece (a mesma coisa toda vez, é consistente em sua loucura):

startDiscovery () da guia com todos os dispositivos ativados: - O PC é o único dispositivo encontrado Desative o bluetooth no PC: - Nenhuma reação na guia

Ative o bluetooth no PC: - Nenhuma reação na guia

Power no fone de ouvido pela primeira vez: - ACTION_ACL_CONNECTED na guia

Fone de ouvido desligado: - Nenhuma reação na guia

Ligue novamente o fone de ouvido: - ACTION_ACL_DISCONNECTED e ACTION_ACL_CONNECTED em rápida sucessão na guia

Desative o bluetooth na guia: - Nenhuma reação na guia

Ative o bluetooth na guia: - Headset ACTION_ACL_CONNECTED na guia

startDiscovery () do telefone: - O PC é o único dispositivo encontrado pelo telefone, embora o telefone esteja emparelhado apenas com a guia, não com o PC. Caso contrário, o telefone só reage ao fone de ouvido em que o Tab nunca reage.

O que fazer com essa bagunça? Não é possível confiar em um dispositivo que está causando um ACTION_ACL_CONNECT, mesmo quando está emparelhado e ligado dentro do alcance?

Aqui estão os métodos para BroadcastReceiver e as atividades onCreate, mas não espero que detalhes neste código sejam importantes:

BroadcastReceiver intentReceiver = new BroadcastReceiver() {
    public void onReceive(Context context, Intent intent) {
        String action = intent.getAction();
        BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
        if (device != null) {
            name = device.getName();
        Log.v(TAG, "Device=" + device.getName());
        }
        else {
            name = "None";
        }

        if (BluetoothDevice.ACTION_ACL_CONNECTED.equals(action)) {
            text1.setText(name + " connected " + (checkCounter++));
            Log.v(TAG, "connected: " + device);
        }
        else if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) {
            text2.setText(name + " disconnected " + (checkCounter++));
        Log.v(TAG, "disconnected: " + device);
        }
        else if (BluetoothDevice.ACTION_FOUND.equals(action)) {
            text3.setText( name + " found " + (checkCounter++));
        Log.v(TAG, "found: " + device + "");
        }
        else if (blueAdapter.ACTION_DISCOVERY_STARTED.equals(action)) {
            text4.setText("Started " + (checkCounter++));
            Log.v(TAG, "Discovery started");
        }
        else if (blueAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
            text4.setText("Finished " + (checkCounter++));
            Log.v(TAG, "Discovery finished");
        }
    }
};


public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.bluetoothlayout);

    text1 = (TextView)findViewById(R.id.textView1);
    text2 = (TextView)findViewById(R.id.textView2);
    text3 = (TextView)findViewById(R.id.textView3);
    text4 = (TextView)findViewById(R.id.textView4);

    BluetoothDevice mw600 =         blueAdapter.getRemoteDevice("58:17:0C:EB:C5:08");
    BluetoothDevice bt500 =         blueAdapter.getRemoteDevice("00:1D:43:00:C4:54");
    BluetoothDevice galaxyTab = blueAdapter.getRemoteDevice("00:07:AB:6A:96:7D");
    BluetoothDevice pcDongle =  blueAdapter.getRemoteDevice("00:15:83:4D:8B:57");

    intentFilter = new IntentFilter();
    intentFilter.addAction(BluetoothDevice.ACTION_FOUND);
    intentFilter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
    intentFilter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
    intentFilter.addAction(blueAdapter.ACTION_DISCOVERY_STARTED);
    intentFilter.addAction(blueAdapter.ACTION_DISCOVERY_FINISHED);
    if (!isReceiverRegistered) {
        registerReceiver(intentReceiver, intentFilter);
        isReceiverRegistered = true;
    }
    if (!blueAdapter.isEnabled()) {
        blueAdapter.enable();
    }
    blueAdapter.startDiscovery();
}

questionAnswers(2)

yourAnswerToTheQuestion