From 169b738a4b6216cc307bfc1689bbf9a76a4506c6 Mon Sep 17 00:00:00 2001 From: pstruebi Date: Thu, 13 Feb 2025 15:25:29 +0100 Subject: [PATCH] make use of 2mbit phy for secondary advertising --- auracast/multicast.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/auracast/multicast.py b/auracast/multicast.py index 3914fd5..0fed9ee 100644 --- a/auracast/multicast.py +++ b/auracast/multicast.py @@ -198,8 +198,9 @@ async def run_broadcast( primary_advertising_interval_min=round(100*ADVERTISING_SLOWDOWN_FACTOR), primary_advertising_interval_max=round(200*ADVERTISING_SLOWDOWN_FACTOR), advertising_sid=i, - #primary_advertising_phy=hci.Phy.LE_2M, TODO: 2m phy config throws error - #secondary_advertising_phy=hci.Phy.LE_2M, + primary_advertising_phy=hci.Phy.LE_1M, # 2m phy config throws error - because for primary advertising channels, 1mbit is only supported + secondary_advertising_phy=hci.Phy.LE_2M, # this is the secondary advertising beeing send on non advertising channels (extendend advertising) + #advertising_tx_power= # tx power in dbm (max 20) ), advertising_data=( bigs[f'big{i}']['broadcast_audio_announcement'].get_advertising_data() @@ -220,7 +221,7 @@ async def run_broadcast( bigs[f'big{i}']['advertising_set'] = advertising_set logging.info('Start Periodic Advertising') - await bigs[f'big{i}']['advertising_set'].start_periodic() + await advertising_set.start_periodic() logging.info('Setup BIG') if global_config.qos_config.iso_int_multiple_10ms == 1: @@ -306,12 +307,10 @@ def broadcast(global_conf: auracast_config.AuracastGlobalConfig, big_conf: List[ ) ) - - # ----------------------------------------------------------------------------- if __name__ == "__main__": logging.basicConfig( - level=logging.DEBUG, + level=logging.INFO, format='%(module)s.py:%(lineno)d %(levelname)s: %(message)s' ) @@ -327,9 +326,8 @@ if __name__ == "__main__": # TODO use nrf52dongle with hci over usb - # TODO: How can we use other iso interval than 10ms ?(medium or low rel) ? - nrf53audio receiver repports I2S tx underrun - global_conf.qos_config = auracast_config.qos_config_mono_medium_rel + #global_conf.qos_config = auracast_config.qos_config_mono_medium_rel global_conf.qos_config = auracast_config.qos_config_mono_high_rel @@ -348,11 +346,7 @@ if __name__ == "__main__": # use thread usage debugger on controller to check actual cpu load - not much load # TODO; I dont think hci is really the bottleneck. probably limited airtime is the problem. Analyze this somehow. - # Advertising is still 1Mbit phy - use 2Mbit - # Check is the sdu interval (iso interval?) may really be varied - does not seem to work really - # # sdu per frame also needs to be adjusted somehow? is this even compatible with lc3? - - # TODO: analyze the airtime somehow! + # TODO: upgrade to latests bumble version broadcast( global_conf,