Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1157415rwb; Fri, 18 Nov 2022 13:43:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Tf7zUkLrCYooX1guwsUAc0gh4z4iEMfgJmAJQbLERkKIvvNfuie52tSSfEVq+B4In4eCe X-Received: by 2002:a17:907:601d:b0:78d:4abe:c4b6 with SMTP id fs29-20020a170907601d00b0078d4abec4b6mr7599015ejc.485.1668807833381; Fri, 18 Nov 2022 13:43:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668807833; cv=none; d=google.com; s=arc-20160816; b=GdvhzG5gT3EvbglgmdOFSGkFIekxvqk/FXDCdwRAMnC90QtfkvdslJjHKS0Ubko4Xl KPcL3kf+6ZOT2/9mCRicEWW9dDJxP8fydggd4B/E5W3iG2m1RQYBw4L+mRJYyEzYRafL ZtnbkMbaC043O0FtzdGtNnT5ToKpe3wliqU64U6nnfUxhan3WKX9loWL5rmHx3+gOTRs hDfzLdIZ/7IeqdBQOJsGZIb9efZMQX23Xub9eC1Zfx4GiqmjC2w3on1mz39qZMjpH3kh HEp7TuGcLxblMRE9PTdC0lsa5/t2He4T/3T5M1C6eUQpqr0gj0KX8Q1Fp+I3fDpk0sQ/ K6Ag== 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=xytzPwZVsyCz6Lq8RyB7dUYbAuvT8b3vgi/qSIlY7lk=; b=okU3tR6kZamo5M8MSCQRwfRS8Mb/POInOOFdFGJB57sYEZDQuTJvgdruPSLFFC22vx PD+ie+h2Bc53bi+0fAJyKBQUoogknp+E+IeFfLqqy6scpr53RsnoX2oFX3TDcm+YOy9F f9YzVRIrL90A9C/o6rX3SFVpe9nIJ/tidq/s8vt34OXCxQ+Mk+TcOsQ3b319bPX7I23+ LzcrgU1kOiEkmzDnTFPppTdN9EGyToGoy+7A7aQLjnJG5hgvxVj+Ks1gDMoZEs0yZc3d n7TkYSNewsZwyo4qvWAllkWigMRxBWIi5vXR9D1cwm14QbIy27VOiJq6kQhAikMe/TDD 4q3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=lAYM2OTW; 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 lc24-20020a170906f91800b0078d027ceb41si3472404ejb.857.2022.11.18.13.43.12; Fri, 18 Nov 2022 13:43:53 -0800 (PST) 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=lAYM2OTW; 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 S229483AbiKRVcX (ORCPT + 99 others); Fri, 18 Nov 2022 16:32:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40134 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229802AbiKRVcW (ORCPT ); Fri, 18 Nov 2022 16:32:22 -0500 Received: from mail-lj1-x233.google.com (mail-lj1-x233.google.com [IPv6:2a00:1450:4864:20::233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AD00786C0 for ; Fri, 18 Nov 2022 13:32:20 -0800 (PST) Received: by mail-lj1-x233.google.com with SMTP id h12so8324028ljg.9 for ; Fri, 18 Nov 2022 13:32:20 -0800 (PST) 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:message-id:reply-to; bh=xytzPwZVsyCz6Lq8RyB7dUYbAuvT8b3vgi/qSIlY7lk=; b=lAYM2OTWE1WbYSKgQ/tjHFV+bHpmffasIm8+SWOKtKf5xGeZv15yCVOp48nSGV+a4I FufkKD3o+JoFylGSmS61jHoNnxoPZPXtSZJD+pxka5Z2MJpX7bx2tT0H9QBGsTXZBaJs DdDeNwSQeH+X+op2QALdMLnqZjQabNfq9FLQf1K3VmXIt5QHhuE2caYB4a3xPMB4ltrz 85/omvEUDOcf1UqvSdMZ1vyONlnE8BvluVLdMjlABmrsXd0yH4J3RTB3PguRV6ONnczM dHQl29ssnITnLbYDIVSNQVHXOBLEJvMeNfM+dCSCPJfcD3QZ/aZapuRgZbNXsvFbI4vE pXqw== 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:message-id :reply-to; bh=xytzPwZVsyCz6Lq8RyB7dUYbAuvT8b3vgi/qSIlY7lk=; b=OkCq5WX4KAkKlvPABkeLav26jVAQiduHPw4q8XL1JEIqvILejunkJfamFUIGtQEZu7 4TdmACFl8ADJ7BLPkcSeV2mvkUPmMX0rvHYNuYPUKqRuUkVDaOIWZfkRX8Mcsho087d1 ENwPDnIhbN6GQ74s7X57ZRR6ZJcCxcLwvB+3KclZa+ggM6Z9OkvAnei8Odfln1mofbv+ 2DrBvY6kPSJ30rEV0vn+7QDDnc42JZdqxBEIu1plGZm1UKM2AOreFtzD213upKTyCZ0M s3mzs6v9dZh/oGWIC9C2PvUEZwjzQgSAkh8gik7r+vSFLy69vtj7KyMvece5PgJY17kc CEcg== X-Gm-Message-State: ANoB5pmAUlxjVfuxZKeBHLf3lSe6nHVmJKkj+1dAiKyK7dWJrcVqpmbS fniPfMNgXNl3uf7j4kakE8kVx2ALrAcmgh2gu+21dW8W X-Received: by 2002:a05:651c:389:b0:278:f5de:8478 with SMTP id e9-20020a05651c038900b00278f5de8478mr2822705ljp.65.1668807138603; Fri, 18 Nov 2022 13:32:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Luiz Augusto von Dentz Date: Fri, 18 Nov 2022 13:32:06 -0800 Message-ID: Subject: Re: LE Advertisement on data channels/ btvirt To: Marvin Sinnwell 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 Marvin, On Fri, Nov 18, 2022 at 8:24 AM Marvin Sinnwell wrote: > > Hello everyone, > > TL;DR: Seeking advice on advertising on arbitrary channels + usage of > btvirt specifically function "send_adv_pkt". > > I am currently working on my bachelor thesis and have the following > problem with I would like to request some advice: > > I want to test several algorithms that try to improve the time it takes > to find an advertisement packet of another device. For this I not only > want to change the method of advertising, on channels 37-39 in > sequential order, to something else, but also send advertisement packets > on other channels. > > My main difficulty currently is composed of trying to find out where the > actual advertisement packets are sent. Currently my best guess is, that > is is controlled by the firmware of my raspberry pi that I am using > (specific model below), because I could not find anything within the > bluez stack. Maybe one of you has more knowledge on where I have to search. > > What I was able to find was the btvirt tool, which could help with my > problem. There I found in the file "le.c" in function > "adv_timeout_callback" another function called "send_adv_pkt". Sadly > while trying out btvirt and clever usage of some print statements I > could not see the function be executed. Maybe someone can give me some > advice on that, because this function should do exactly what I am > looking for. It could be that I was just using the tool incorrectly in > which case it would be great if somebody could tell me how to use it. My > methodology was: 1. "sudo ./btvirt -L -l2 -d" to create 2 new local LE > controller. 2. Start advertisement using hcitool "sudo hcitool -i hci2 > cmd 0x08 0x000a 01". The advertisement is correct and the other local > controller can connect to the first one. I don't think vhci will help you given it only emulates HCI layer and the channels are actually controlled by the so called Link Layer which happens to be under HCI, you might have control over the Link Layer using Zephyr though. > My current equipment is: > > Device: Raspberry Pi 3 Model B+ > > Kernel + OS: Linux raspberrypi 5.15.61-v7+ #1579 SMP Fri Aug 26 > 11:10:59 BST 2022 armv7l GNU/Linux > > Bluez version: 5.65 > > > Kind regards > > Marvin Sinnwell > > > -- Luiz Augusto von Dentz