Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp2629395rwn; Fri, 16 Sep 2022 13:28:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Gw786BuJjd8+FrO+UXVoiC3EAmSBZVmGj7M1xLwapudo9Q7ZcsK/+oZD8xXuGJ/gSPNUU X-Received: by 2002:a17:902:a383:b0:176:dd41:4f56 with SMTP id x3-20020a170902a38300b00176dd414f56mr1552219pla.104.1663360102635; Fri, 16 Sep 2022 13:28:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663360102; cv=none; d=google.com; s=arc-20160816; b=r50pgt0cA88DNQTjN+Ia3/i70HSzenG26xb8ixNaLTzfmP9HA3wKgjzkENmw+Xps4S 3BUOe7Wk/MoNQgvoxj8Xdc3EcaerEAHITqSsYF1NEtRJjfSfVHcIQ6m6JU9UNBbhAk1I v2zWmhQ4pLPNiVZrFeK8wZndJo5678Q7gONHtDcpDHJkPJVZVAxBUFpIxAIqSg8SXnHk oS3z25hMqmY9GjeuvWhotn10gakCasmV3rK0s9yQM4VsjpvK6rhu2xZpp6xR3s1de3We dwHhvbBCACWhIYz5U2afZ40ICiTvtqyhsOEI2Sd0tF6ZSHugiXNw37oDU2UdD1O8QiJ0 As8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=accFD8bKbv7R4zhQHJGSrfMkuu0HRSyeNpZlE+zGuZs=; b=xpIjaOwTPv5u7XgVBplO/IBqvsC58ZF1azoJPX1p2B6OZWPsGt33EHc9MbcVrVBmMP Wu8Gzxuvl/ZS9bKbt44HlWNFGyYjNBOetEJQDlPnmcr0Djtm9SYyjryoL1bzTbALdEtW extrhv9RghR3/0JpwkuDp/ThGjyzo8SO2kHnEWeN055VAJ/hvi1ltBvPh4UTn/baiG1G 1Fdk9V6rfhTc5O7SDYAMJCw98NnUqkR1PDEDYhjuDupZg+bMdTM3Z5BpgkmwtEx5XNjd S8JLLWGDno8hH6ISIl6uSw4oSxiMPo3ulw2xAK2cohhNIEG23fS4p/hG8rfxNrYgKO99 etAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NiCfVNg5; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t7-20020a170902bc4700b0017865059c4bsi7485959plz.401.2022.09.16.13.27.13; Fri, 16 Sep 2022 13:28:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=NiCfVNg5; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229686AbiIPUYg (ORCPT + 99 others); Fri, 16 Sep 2022 16:24:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbiIPUYf (ORCPT ); Fri, 16 Sep 2022 16:24:35 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F9CB5F6E for ; Fri, 16 Sep 2022 13:24:32 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id f9so36617515lfr.3 for ; Fri, 16 Sep 2022 13:24:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=accFD8bKbv7R4zhQHJGSrfMkuu0HRSyeNpZlE+zGuZs=; b=NiCfVNg53WhSMoE1IwKLhfBxKubJ1H3k3TImTBPlOWb75om/YSXpe9WVa2PUTiRWIS glIeiS6DO4TMw86D97xt9C3hCBMtuW3MhS8x/4UgMM/IRSDP4vHkOylrKxQUUOTCbWU7 L/8gtqORXVEyeawu7JcmZSpn5kuVe0Mo8tK/jMbCECe1FjLvA6Hou572/p4zjRvVKlV9 hNU3xm8DQVBrqf/ywz1lUjkQJlXuJehiNa7vFPsE2TFPo8wmOrliKH0QBzWsCH8+TOt3 yXUMvcJrN/sjEW38KRyljZb66RzNnuHy+ZP8N3Oa0rHd6rrQb4ccZcvv3UlG0kMJ026f d7dg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=accFD8bKbv7R4zhQHJGSrfMkuu0HRSyeNpZlE+zGuZs=; b=Ks0rS24HRt+w5UKWQS/oflaiKqJsekaubCYY2cgvpAlElxdlwxzXweHs/Th+wKkZzL aiRCP1CbzvIF7iM2eGbt+81B5lLwZoALoallhap/Pgt0731NQ+5KtMv287Qh+F91kmlc STXzBrlyrIKFhR1tvbKQ+IhmKewUsGg1ExsZD31OmRHo2LH8P/VtAOy+nYxT8P1+dkep CysA9G3jmIcZYx0aekWDVQ0+P+nUV1TkfIZZ5Wc7Si4atP72vfvCY0f7LP6sTEdocgq/ LlfRA2mVaVodHfmWq4GQ8k9ePECPHtXtnMV8HJm7TkF8RyN9dPjS9XpfFXmdlQQo8/DR j44A== X-Gm-Message-State: ACrzQf1UcMTlJWGsq+CySHj3NNAXPD8lz+UbCjYsy+q8zYfHY2SEWkVj Lbxm4nRaivuSyUA6SPTtNoOe/MdZIEWTTWgp7Tyw5sDBtVs= X-Received: by 2002:a05:6512:3612:b0:499:aea7:8bed with SMTP id f18-20020a056512361200b00499aea78bedmr2097939lfs.26.1663359870448; Fri, 16 Sep 2022 13:24:30 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 16 Sep 2022 13:24:18 -0700 Message-ID: Subject: Re: How does btmon know that type 9 is "Apple TV"? To: Jake Rue Cc: linux-bluetooth@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Jake, On Fri, Sep 16, 2022 at 1:15 PM Jake Rue wrote: > > In an advertisement like this: > > > HCI Event: LE Meta Event (0x3e) plen 27 #86 [hci0] 44.156857 > LE Advertising Report (0x02) > Num reports: 1 > Event type: Non connectable undirected - ADV_NONCONN_IND (0x03) > Address type: Random (0x01) > Address: 0D:07:B9:9A:33:0F (Non-Resolvable) > Data length: 15 > Flags: 0x1a > LE General Discoverable Mode > Simultaneous LE and BR/EDR (Controller) > Simultaneous LE and BR/EDR (Host) > Company: Apple, Inc. (76) > Type: Apple TV (9) > Data: 0376c0a801f5 > RSSI: -80 dBm (0xb0) > > Where does the mapping of Type 9 to "Apple TV" come from in the code? > When I search the bluez github repository for "Apple TV" > (https://github.com/bluez/bluez/search?q=%22Apple+TV%22), I don't get > any hits. (In contrast I can find the switch statement that encodes 76 > == "Apple, Inc." fine.) I'd like to see what table encodes that > information so I can use it in my code as well (and what all it knows > about other types.) git grep "Apple TV" monitor/packet.c: str = "Apple TV"; -- Luiz Augusto von Dentz