Hey Michael thank you for your quick response. So it seems that I opened Pandoras box :-) As you wrote, I thought it would be a good idea to access the VW OBD gateway over bluetooth as I now just tap into the VW comfort CAN from under the passenger seat. But as bluetooth is in such an alpha state at the moment, I will focus now on the next step to get the remote climate control managed over the comfort CAN rather than over the OBD gateway. This is a big reverse engineering task, but seems still easier achievable than rewriting the OVMS bluetooth part. But I will keep bluetooth in mind for the future. It would be just great to have it working ... Greetinx and take care. Chris Am Freitag, den 27.03.2020, 21:22 +0100 schrieb Michael Balzer:
Chris,
sorry for the outdated bluetooth sdkconfig and lack of info on this.
The bluetooth component development was done by Mark. It's been stopped at an early stage without usable functionality IIRC. It was supposed to pair, but nothing else. It used up a lot of memory we needed for other tasks, and there was no real need for this, so we excluded it from the standard build.
It's been stuck there since mid 2018, and the IDF API may have changed in the meantime. I think the IDF even introduced a whole new driver approach later on, so the component may need a complete rewrite.
You're welcome to work on that, but maybe there are better options for what you'd like to do, or you can work with a simplified approach.
If I understood you correctly, you would like to access the UpMiiGo's main CAN bus via a bluetooth OBD2 dongle, because the main CAN isn't available at your preferred OVMS mounting point.
My own experiences with bluetooth OBD2 dongles were all bad, very slow and unreliable, unsuitable for live CAN data. That's been years ago, maybe the situation has changed, but I still would prefer a cable, also because I don't trust these cheap bluetooth (or wifi) devices to be secure. Isn't the CAN bus reachable somewhere near?
Regards, Michael
Am 27.03.20 um 19:57 schrieb Chris van der Meijden:
Hi all
To make my question a bit more "transparent" I put templates of my bluetooth Kconfig and sdkconfig here
https://github.com/devmarxx/Open-Vehicle-Monitoring-System-3/tree/m aste r/vehicle/OVMS.V3/support
in my github. The templates both end on .devmarxx
Good health to everyone and take care!
Greetinx
Chris
Am Donnerstag, den 26.03.2020, 20:46 +0100 schrieb Chris van der Meijden:
Dear all
I'm struggling with the activation of the bluetooth functionality with the recent code.
The sdkconfig.bluetooth.hw31 will not compile at all.
I found three major problems here.
1. Mongoose SSL is needed 2. Support for the 8MB RAM version is needed (not included in sdkconfig.bluetooth.hw31!) 3. CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF is needed for our special esp-idf situation
By doing a simple diff I could solve 1, but overlooked Nr. 2. And that was lethal. It brought my OVMS in a boot loop after I installed the fresh compiled ovms3.bin. But I got here great help from Thomas (Thanx!), who pointed to the problem and helped me out on the sdkconfig settings.
For Nr. 3 I made a dirty workaround by adding
config BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF int "Should be 0, can also be 1" default 0 depends on OVMS help Workaround to make bluetooth compile with our special esp-idf situation.
to the KConfig.
But all efforts didn't bring a postive result. The image compiles and boots now, but we can't activate bluetooth. We get the Error
bt: init controller failed: ESP_ERR_NO_MEM
So I would like to ask, if anybody has a working, recent, bluetooth image and if so what does it need? Any help on this is highly welcome.
Here the diff of my bluetooth sdkconfig to the standard sdkconfig without bluetooth:
137,146c137,138 < CONFIG_BT_ENABLED=y < < # < # Bluetooth controller < # < CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY=y < CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY= < CONFIG_BTDM_CONTROLLER_MODE_BTDM= < CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3 < CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3 ---
CONFIG_BT_ENABLED= CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=0
149,150d140 < CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_0=y < CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE_1= 152,365c142 < CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y < CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4= < < # < # MODEM SLEEP Options < # < CONFIG_BTDM_CONTROLLER_MODEM_SLEEP= < CONFIG_BLE_SCAN_DUPLICATE=y < CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y < CONFIG_SCAN_DUPLICATE_BY_ADV_DATA= < CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR= < CONFIG_SCAN_DUPLICATE_TYPE=0 < CONFIG_DUPLICATE_SCAN_CACHE_SIZE=20 < CONFIG_BLE_MESH_SCAN_DUPLICATE_EN= < CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED= < CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y < CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100 < CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20 < CONFIG_BLUEDROID_ENABLED=y < CONFIG_BLUEDROID_PINNED_TO_CORE_0=y < CONFIG_BLUEDROID_PINNED_TO_CORE_1= < CONFIG_BLUEDROID_PINNED_TO_CORE=0 < CONFIG_BTC_TASK_STACK_SIZE=6144 < CONFIG_BTU_TASK_STACK_SIZE=4096 < CONFIG_BLUEDROID_MEM_DEBUG= < CONFIG_CLASSIC_BT_ENABLED= < CONFIG_GATTS_ENABLE=y < CONFIG_GATTS_SEND_SERVICE_CHANGE_MANUAL= < CONFIG_GATTS_SEND_SERVICE_CHANGE_AUTO=y < CONFIG_GATTS_SEND_SERVICE_CHANGE_MODE=0 < CONFIG_GATTC_ENABLE= < CONFIG_BLE_SMP_ENABLE=y < CONFIG_SMP_SLAVE_CON_PARAMS_UPD_ENABLE= < CONFIG_BT_STACK_NO_LOG= < < # < # BT DEBUG LOG LEVEL < # < CONFIG_HCI_TRACE_LEVEL_NONE= < CONFIG_HCI_TRACE_LEVEL_ERROR= < CONFIG_HCI_TRACE_LEVEL_WARNING=y < CONFIG_HCI_TRACE_LEVEL_API= < CONFIG_HCI_TRACE_LEVEL_EVENT= < CONFIG_HCI_TRACE_LEVEL_DEBUG= < CONFIG_HCI_TRACE_LEVEL_VERBOSE= < CONFIG_HCI_INITIAL_TRACE_LEVEL=2 < CONFIG_BTM_TRACE_LEVEL_NONE= < CONFIG_BTM_TRACE_LEVEL_ERROR= < CONFIG_BTM_TRACE_LEVEL_WARNING=y < CONFIG_BTM_TRACE_LEVEL_API= < CONFIG_BTM_TRACE_LEVEL_EVENT= < CONFIG_BTM_TRACE_LEVEL_DEBUG= < CONFIG_BTM_TRACE_LEVEL_VERBOSE= < CONFIG_BTM_INITIAL_TRACE_LEVEL=2 < CONFIG_L2CAP_TRACE_LEVEL_NONE= < CONFIG_L2CAP_TRACE_LEVEL_ERROR= < CONFIG_L2CAP_TRACE_LEVEL_WARNING=y < CONFIG_L2CAP_TRACE_LEVEL_API= < CONFIG_L2CAP_TRACE_LEVEL_EVENT= < CONFIG_L2CAP_TRACE_LEVEL_DEBUG= < CONFIG_L2CAP_TRACE_LEVEL_VERBOSE= < CONFIG_L2CAP_INITIAL_TRACE_LEVEL=2 < CONFIG_RFCOMM_TRACE_LEVEL_NONE= < CONFIG_RFCOMM_TRACE_LEVEL_ERROR= < CONFIG_RFCOMM_TRACE_LEVEL_WARNING=y < CONFIG_RFCOMM_TRACE_LEVEL_API= < CONFIG_RFCOMM_TRACE_LEVEL_EVENT= < CONFIG_RFCOMM_TRACE_LEVEL_DEBUG= < CONFIG_RFCOMM_TRACE_LEVEL_VERBOSE= < CONFIG_RFCOMM_INITIAL_TRACE_LEVEL=2 < CONFIG_SDP_TRACE_LEVEL_NONE= < CONFIG_SDP_TRACE_LEVEL_ERROR= < CONFIG_SDP_TRACE_LEVEL_WARNING=y < CONFIG_SDP_TRACE_LEVEL_API= < CONFIG_SDP_TRACE_LEVEL_EVENT= < CONFIG_SDP_TRACE_LEVEL_DEBUG= < CONFIG_SDP_TRACE_LEVEL_VERBOSE= < CONFIG_SDP_INITIAL_TRACE_LEVEL=2 < CONFIG_GAP_TRACE_LEVEL_NONE= < CONFIG_GAP_TRACE_LEVEL_ERROR= < CONFIG_GAP_TRACE_LEVEL_WARNING=y < CONFIG_GAP_TRACE_LEVEL_API= < CONFIG_GAP_TRACE_LEVEL_EVENT= < CONFIG_GAP_TRACE_LEVEL_DEBUG= < CONFIG_GAP_TRACE_LEVEL_VERBOSE= < CONFIG_GAP_INITIAL_TRACE_LEVEL=2 < CONFIG_BNEP_TRACE_LEVEL_NONE= < CONFIG_BNEP_TRACE_LEVEL_ERROR= < CONFIG_BNEP_TRACE_LEVEL_WARNING=y < CONFIG_BNEP_TRACE_LEVEL_API= < CONFIG_BNEP_TRACE_LEVEL_EVENT= < CONFIG_BNEP_TRACE_LEVEL_DEBUG= < CONFIG_BNEP_TRACE_LEVEL_VERBOSE= < CONFIG_BNEP_INITIAL_TRACE_LEVEL=2 < CONFIG_PAN_TRACE_LEVEL_NONE= < CONFIG_PAN_TRACE_LEVEL_ERROR= < CONFIG_PAN_TRACE_LEVEL_WARNING=y < CONFIG_PAN_TRACE_LEVEL_API= < CONFIG_PAN_TRACE_LEVEL_EVENT= < CONFIG_PAN_TRACE_LEVEL_DEBUG= < CONFIG_PAN_TRACE_LEVEL_VERBOSE= < CONFIG_PAN_INITIAL_TRACE_LEVEL=2 < CONFIG_A2D_TRACE_LEVEL_NONE= < CONFIG_A2D_TRACE_LEVEL_ERROR= < CONFIG_A2D_TRACE_LEVEL_WARNING=y < CONFIG_A2D_TRACE_LEVEL_API= < CONFIG_A2D_TRACE_LEVEL_EVENT= < CONFIG_A2D_TRACE_LEVEL_DEBUG= < CONFIG_A2D_TRACE_LEVEL_VERBOSE= < CONFIG_A2D_INITIAL_TRACE_LEVEL=2 < CONFIG_AVDT_TRACE_LEVEL_NONE= < CONFIG_AVDT_TRACE_LEVEL_ERROR= < CONFIG_AVDT_TRACE_LEVEL_WARNING=y < CONFIG_AVDT_TRACE_LEVEL_API= < CONFIG_AVDT_TRACE_LEVEL_EVENT= < CONFIG_AVDT_TRACE_LEVEL_DEBUG= < CONFIG_AVDT_TRACE_LEVEL_VERBOSE= < CONFIG_AVDT_INITIAL_TRACE_LEVEL=2 < CONFIG_AVCT_TRACE_LEVEL_NONE= < CONFIG_AVCT_TRACE_LEVEL_ERROR= < CONFIG_AVCT_TRACE_LEVEL_WARNING=y < CONFIG_AVCT_TRACE_LEVEL_API= < CONFIG_AVCT_TRACE_LEVEL_EVENT= < CONFIG_AVCT_TRACE_LEVEL_DEBUG= < CONFIG_AVCT_TRACE_LEVEL_VERBOSE= < CONFIG_AVCT_INITIAL_TRACE_LEVEL=2 < CONFIG_AVRC_TRACE_LEVEL_NONE= < CONFIG_AVRC_TRACE_LEVEL_ERROR= < CONFIG_AVRC_TRACE_LEVEL_WARNING=y < CONFIG_AVRC_TRACE_LEVEL_API= < CONFIG_AVRC_TRACE_LEVEL_EVENT= < CONFIG_AVRC_TRACE_LEVEL_DEBUG= < CONFIG_AVRC_TRACE_LEVEL_VERBOSE= < CONFIG_AVRC_INITIAL_TRACE_LEVEL=2 < CONFIG_MCA_TRACE_LEVEL_NONE= < CONFIG_MCA_TRACE_LEVEL_ERROR= < CONFIG_MCA_TRACE_LEVEL_WARNING=y < CONFIG_MCA_TRACE_LEVEL_API= < CONFIG_MCA_TRACE_LEVEL_EVENT= < CONFIG_MCA_TRACE_LEVEL_DEBUG= < CONFIG_MCA_TRACE_LEVEL_VERBOSE= < CONFIG_MCA_INITIAL_TRACE_LEVEL=2 < CONFIG_HID_TRACE_LEVEL_NONE= < CONFIG_HID_TRACE_LEVEL_ERROR= < CONFIG_HID_TRACE_LEVEL_WARNING=y < CONFIG_HID_TRACE_LEVEL_API= < CONFIG_HID_TRACE_LEVEL_EVENT= < CONFIG_HID_TRACE_LEVEL_DEBUG= < CONFIG_HID_TRACE_LEVEL_VERBOSE= < CONFIG_HID_INITIAL_TRACE_LEVEL=2 < CONFIG_APPL_TRACE_LEVEL_NONE= < CONFIG_APPL_TRACE_LEVEL_ERROR= < CONFIG_APPL_TRACE_LEVEL_WARNING=y < CONFIG_APPL_TRACE_LEVEL_API= < CONFIG_APPL_TRACE_LEVEL_EVENT= < CONFIG_APPL_TRACE_LEVEL_DEBUG= < CONFIG_APPL_TRACE_LEVEL_VERBOSE= < CONFIG_APPL_INITIAL_TRACE_LEVEL=2 < CONFIG_GATT_TRACE_LEVEL_NONE= < CONFIG_GATT_TRACE_LEVEL_ERROR= < CONFIG_GATT_TRACE_LEVEL_WARNING=y < CONFIG_GATT_TRACE_LEVEL_API= < CONFIG_GATT_TRACE_LEVEL_EVENT= < CONFIG_GATT_TRACE_LEVEL_DEBUG= < CONFIG_GATT_TRACE_LEVEL_VERBOSE= < CONFIG_GATT_INITIAL_TRACE_LEVEL=2 < CONFIG_SMP_TRACE_LEVEL_NONE= < CONFIG_SMP_TRACE_LEVEL_ERROR= < CONFIG_SMP_TRACE_LEVEL_WARNING=y < CONFIG_SMP_TRACE_LEVEL_API= < CONFIG_SMP_TRACE_LEVEL_EVENT= < CONFIG_SMP_TRACE_LEVEL_DEBUG= < CONFIG_SMP_TRACE_LEVEL_VERBOSE= < CONFIG_SMP_INITIAL_TRACE_LEVEL=2 < CONFIG_BTIF_TRACE_LEVEL_NONE= < CONFIG_BTIF_TRACE_LEVEL_ERROR= < CONFIG_BTIF_TRACE_LEVEL_WARNING=y < CONFIG_BTIF_TRACE_LEVEL_API= < CONFIG_BTIF_TRACE_LEVEL_EVENT= < CONFIG_BTIF_TRACE_LEVEL_DEBUG= < CONFIG_BTIF_TRACE_LEVEL_VERBOSE= < CONFIG_BTIF_INITIAL_TRACE_LEVEL=2 < CONFIG_BTC_TRACE_LEVEL_NONE= < CONFIG_BTC_TRACE_LEVEL_ERROR= < CONFIG_BTC_TRACE_LEVEL_WARNING=y < CONFIG_BTC_TRACE_LEVEL_API= < CONFIG_BTC_TRACE_LEVEL_EVENT= < CONFIG_BTC_TRACE_LEVEL_DEBUG= < CONFIG_BTC_TRACE_LEVEL_VERBOSE= < CONFIG_BTC_INITIAL_TRACE_LEVEL=2 < CONFIG_OSI_TRACE_LEVEL_NONE= < CONFIG_OSI_TRACE_LEVEL_ERROR= < CONFIG_OSI_TRACE_LEVEL_WARNING=y < CONFIG_OSI_TRACE_LEVEL_API= < CONFIG_OSI_TRACE_LEVEL_EVENT= < CONFIG_OSI_TRACE_LEVEL_DEBUG= < CONFIG_OSI_TRACE_LEVEL_VERBOSE= < CONFIG_OSI_INITIAL_TRACE_LEVEL=2 < CONFIG_BLUFI_TRACE_LEVEL_NONE= < CONFIG_BLUFI_TRACE_LEVEL_ERROR= < CONFIG_BLUFI_TRACE_LEVEL_WARNING=y < CONFIG_BLUFI_TRACE_LEVEL_API= < CONFIG_BLUFI_TRACE_LEVEL_EVENT= < CONFIG_BLUFI_TRACE_LEVEL_DEBUG= < CONFIG_BLUFI_TRACE_LEVEL_VERBOSE= < CONFIG_BLUFI_INITIAL_TRACE_LEVEL=2 < CONFIG_BT_ACL_CONNECTIONS=2 < CONFIG_BT_ALLOCATION_FROM_SPIRAM_FIRST=y < CONFIG_BT_BLE_DYNAMIC_ENV_MEMORY=y < CONFIG_BLE_HOST_QUEUE_CONGESTION_CHECK= < CONFIG_SMP_ENABLE=y < CONFIG_BLE_ACTIVE_SCAN_REPORT_ADV_SCAN_RSP_INDIVIDUALLY= < CONFIG_BLE_ESTABLISH_LINK_CONNECTION_TIMEOUT=30 < CONFIG_BT_RESERVE_DRAM=0xdb5c ---
CONFIG_BT_RESERVE_DRAM=0
506a284
CONFIG_NO_BLOBS=
514d291 < CONFIG_SW_COEXIST_ENABLE= 642c419 < CONFIG_FATFS_ALLOC_PREFER_EXTRAM=y ---
CONFIG_FATFS_ALLOC_PREFER_EXTRAM=
673c450 < CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y ---
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=
683c460 < CONFIG_TIMER_TASK_PRIORITY=1 ---
CONFIG_TIMER_TASK_PRIORITY=20
688,689c465,469 < CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS= < CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS= ---
CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS=y CONFIG_FREERTOS_VTASKLIST_INCLUDE_COREID= CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS=y CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER=y CONFIG_FREERTOS_RUN_TIME_STATS_USING_CPU_CLK=
775c555 < CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y ---
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=
777,778c557,558 < CONFIG_TCPIP_TASK_AFFINITY_CPU1= < CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF ---
CONFIG_TCPIP_TASK_AFFINITY_CPU1=y CONFIG_TCPIP_TASK_AFFINITY=0x1
810c590 < CONFIG_OVMS_HW_CAN_RX_QUEUE_SIZE=30 ---
CONFIG_OVMS_HW_CAN_RX_QUEUE_SIZE=60
859,860c639,640 < CONFIG_OVMS_VEHICLE_RXTASK_STACK=6144 < CONFIG_OVMS_VEHICLE_CAN_RX_QUEUE_SIZE=40 ---
CONFIG_OVMS_VEHICLE_RXTASK_STACK=8192 CONFIG_OVMS_VEHICLE_CAN_RX_QUEUE_SIZE=60
865d644 < CONFIG_OVMS_COMP_BLUETOOTH=y 900d678 < CONFIG_BTDM_CONTROLLER_BR_EDR_SCO_DATA_PATH_EFF=0 905,906c683,684 < CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y < CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC= ---
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC= CONFIG_MBEDTLS_EXTERNAL_MEM_ALLOC=y
909c687 < CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=4096 ---
CONFIG_MBEDTLS_SSL_MAX_CONTENT_LEN=16384
929c707 < CONFIG_MBEDTLS_KEY_EXCHANGE_PSK= ---
CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y
1104a883
#
Thanx in advance for your help.
Regards
Chris
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev
_______________________________________________ OvmsDev mailing list OvmsDev@lists.openvehicles.com http://lists.openvehicles.com/mailman/listinfo/ovmsdev