restrucuture_for_cloud (#4)
- update multicast_server - modify config models - add dockerfile and docker compose Reviewed-on: https://gitea.pstruebi.xyz/auracaster/bumble-auracast/pulls/4
This commit was merged in pull request #4.
This commit is contained in:
@@ -23,7 +23,7 @@ import logging
|
||||
import wave
|
||||
import itertools
|
||||
import struct
|
||||
from typing import cast, Any, AsyncGenerator, Coroutine, Dict, Optional, Tuple, List
|
||||
from typing import cast, Any, AsyncGenerator, Coroutine, List
|
||||
import itertools
|
||||
|
||||
try:
|
||||
@@ -186,7 +186,7 @@ async def init_broadcast(
|
||||
logger.info('Setup Advertising')
|
||||
advertising_manufacturer_data = (
|
||||
b''
|
||||
if global_config.manufacturer_data is None
|
||||
if global_config.manufacturer_data == (None, None)
|
||||
else bytes(
|
||||
core.AdvertisingData(
|
||||
[
|
||||
@@ -502,31 +502,27 @@ if __name__ == "__main__":
|
||||
)
|
||||
os.chdir(os.path.dirname(__file__))
|
||||
|
||||
global_conf = auracast_config.AuracastGlobalConfig(
|
||||
qos_config=auracast_config.AuracastQosHigh()
|
||||
|
||||
config = auracast_config.AuracastConfigGroup(
|
||||
bigs = [
|
||||
auracast_config.AuracastBigConfigDeu(),
|
||||
#auracast_config.AuracastBigConfigEng(),
|
||||
#auracast_config.AuracastBigConfigFra(),
|
||||
#auracast_config.AuracastBigConfigEs(),
|
||||
#auracast_config.AuracastBigConfigIt(),
|
||||
]
|
||||
)
|
||||
|
||||
# TODO: How can we use other iso interval than 10ms ?(medium or low rel) ? - nrf53audio receiver repports I2S tx underrun
|
||||
config.qos_config=auracast_config.AuracastQosHigh()
|
||||
|
||||
#global_conf.transport='serial:/dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00,1000000,rtscts' # transport for nrf52 dongle
|
||||
|
||||
#global_conf.transport='serial:/dev/serial/by-id/usb-SEGGER_J-Link_001050076061-if02,1000000,rtscts' # transport for nrf53dk
|
||||
|
||||
#global_conf.transport='serial:/dev/serial/by-id/usb-SEGGER_J-Link_001057705357-if02,1000000,rtscts' # transport for nrf54l15dk
|
||||
|
||||
global_conf.transport='serial:/dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_81BD14B8D71B5662-if00,115200,rtscts' #nrf52dongle hci_uart usb cdc
|
||||
|
||||
config.transport='serial:/dev/serial/by-id/usb-ZEPHYR_Zephyr_HCI_UART_sample_95A087EADB030B24-if00,115200,rtscts' #nrf52dongle hci_uart usb cdc
|
||||
# global_conf.transport='usb:2fe3:000b' #nrf52dongle hci_usb # TODO: iso packet over usb not supported
|
||||
|
||||
|
||||
# TODO: How can we use other iso interval than 10ms ?(medium or low rel) ? - nrf53audio receiver repports I2S tx underrun
|
||||
|
||||
bigs = [
|
||||
auracast_config.AuracastBigConfigDe(),
|
||||
auracast_config.AuracastBigConfigEn(),
|
||||
auracast_config.AuracastBigConfigFr(),
|
||||
#auracast_config.AuracastBigConfigEs(),
|
||||
#auracast_config.AuracastBigConfigIt(),
|
||||
]
|
||||
for big in bigs: # TODO: encrypted streams are not working
|
||||
for big in config.bigs: # TODO: encrypted streams are not working
|
||||
#big.code = 'ff'*16 # returns hci/HCI_ENCRYPTION_MODE_NOT_ACCEPTABLE_ERROR
|
||||
#big.code = '78 e5 dc f1 34 ab 42 bf c1 92 ef dd 3a fd 67 ae'
|
||||
big.precode_wav = True
|
||||
@@ -539,14 +535,15 @@ if __name__ == "__main__":
|
||||
# TODO: find the bottleneck - probably airtime
|
||||
# TODO: test encrypted streams
|
||||
|
||||
global_conf.auracast_sampling_rate_hz = 16000
|
||||
global_conf.octets_per_frame = 40 # 32kbps@16kHz
|
||||
#global_conf.debug = True
|
||||
config.auracast_sampling_rate_hz = 16000
|
||||
config.octets_per_frame = 40 # 32kbps@16kHz
|
||||
#config.debug = True
|
||||
|
||||
|
||||
run_async(
|
||||
broadcast(
|
||||
global_conf,
|
||||
bigs
|
||||
config,
|
||||
config.bigs
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user