Status of bluetooth and MRE in 2022

Hardware inside and outside of the ECU
Post Reply
Ratchet Werks
Posts: 2
Joined: Wed Nov 24, 2021 1:57 pm

Status of bluetooth and MRE in 2022

Post by Ratchet Werks »

Hey all,

I installed an HC-05 in my 0.5.4 MicroRusefi

I issued the following command via the Rusefi console

Code: Select all

bluetooth_hc06 38400 rusefi 1234

Code: Select all

[code]
2022-07-17_16_01_11_850: EngineState: confirmation_bluetooth_hc06 38400 rusefi 1234:32
2022-07-17_16_01_11_850: EngineState: *** Bluetooth module setup procedure ***
2022-07-17_16_01_11_850: EngineState: !Warning! Please make sure you're not currently using the BT module for communication (not paired)!
2022-07-17_16_01_11_865: EngineState: TO START THE PROCEDURE: PLEASE DISCONNECT YOUR PC COM-PORT FROM THE BOARD NOW!
2022-07-17_16_01_11_865: EngineState: After that please don't turn off the board power and wait for ~15 seconds to complete. Then reconnect to the board!
2022-07-17_16_01_12_068: EngineState: Sleeping...
Here's the issue: The Bluetooth module doesn't update itself with the new bluetooth name. During the initial command, I disconnected the USB cable and waited 15 seconds. Everything stays the same.

Here's my question:

In the 20220702 firmware, has bluetooth logic been disabled due the needing the pins for the SD card functionality? LINK to code reference.

If so, do I just need to rebuild the firmware with specific flags set to fix everything?

Board: MRE 0.5.4
Firmware: 220702
Bluetooth: HC06 via Amazon

Wiring
HC06(TX)-> RusEfi(J12) PB11
HC06(RX)->RusEfi(J13) PB10
HC06(VCC) -> RusEfi(5V)
HC06(GND)-> RusEfi(Gnd)
Capture.PNG
Capture.PNG (1.39 MiB) Viewed 34597 times

Reference information:
https://rusefi.com/forum/viewtopic.php?p=37473
https://rusefi.com/forum/viewtopic.php?t=828
https://rusefi.com/forum/viewtopic.php?f=4&t=340
User avatar
AndreyB
Site Admin
Posts: 14323
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Status of bluetooth and MRE in 2022

Post by AndreyB »

Ratchet Werks wrote:
Sun Jul 17, 2022 8:20 pm
If so, do I just need to rebuild the firmware with specific flags set to fix everything?
Well, yes and no. Yes, UART3 is clearly not UARTing with current settings. What DMA remap would make a happy combo with both SD card SPI and UART3 no one has figured out yet.

How to disable just your SPI locally for you personal build while restoring UART3 is not documented anywhere.

Just added some notes
https://github.com/rusefi/rusefi/commit/76bc3b39fb8a68cf5f108ed3d294bd98c4203e2c
https://github.com/rusefi/rusefi/commit/15f272528221e4d3beebcd91c9811854483ae182
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Ratchet Werks
Posts: 2
Joined: Wed Nov 24, 2021 1:57 pm

Re: Status of bluetooth and MRE in 2022

Post by Ratchet Werks »

Thank you for adding the notes! I'll build the firmware over the weekend. I'll report back with the results this weekend
JRD McLAREN
contributor
contributor
Posts: 434
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Status of bluetooth and MRE in 2022

Post by JRD McLAREN »

Hello everybody ..

short question ..

are able to use pins PB10 and PB11 for serial communication at current release ..? (BT or WiFI)
or not ..??

(I'm assume not, as I see this in board.mk)

Code: Select all

# *TEMPORARY* breaking TTL thus breaking Bluetooth for microRusEFI in order to enable SPI3 for SD card
# *TODO* need to give people the horrible choice between Bluetooth via TTL or SD card via SPI :( horrible choice
# PB10/PB11 uses UART3 peripheral and J12/J13 on MRE
# we also have PC10/PC11 exposed on J4 but that's same UART3
DDEFS += -DEFI_CONSOLE_TX_BRAIN_PIN=Gpio::B10 -DEFI_CONSOLE_RX_BRAIN_PIN=Gpio::B11

# on MRE 0.6.0 we have SD card on SPI2 which shared channel 3 with USART3
# todo: enable serial which would not DMA thus not conflict?
DDEFS += -DSTM32_UART_USE_USART3=FALSE -DHAL_USE_UART=FALSE
DDEFS += -DEFI_USE_UART_DMA=FALSE

# maybe a way to disable SPI2 privately
#DDEFS += -DSTM32_SPI_USE_SPI2=FALSE
EDITED:
SPI2 can't be disabled from TunerStudio
.. some Proteus and microRusEFI for sale in Europe ..
User avatar
AndreyB
Site Admin
Posts: 14323
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: Status of bluetooth and MRE in 2022

Post by AndreyB »

Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
mi-hol
Posts: 39
Joined: Sun Jun 05, 2022 10:37 pm
Location: Tübingen, Germany
Github Username: mi-hol

Re: Status of bluetooth and MRE in 2022

Post by mi-hol »

JRD McLAREN wrote:
Sat Jan 06, 2024 9:46 pm
able to use pins PB10 and PB11 for serial communication .. on MRE 0.6.0
Hi Vlado,
in case you build such a custom firmware, I'd be very interested to try it too :)
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
JRD McLAREN
contributor
contributor
Posts: 434
Joined: Mon Mar 04, 2019 10:19 pm
Location: Slovakia

Re: Status of bluetooth and MRE in 2022

Post by JRD McLAREN »

So ..
my board has SD Card on SPI3 interface ... add-on wbo2 board also
(latest can have 2 types slots, one on SPI2, second on SPI3)

I can build FW without SPI2, but I have no idea, if it works on yours MRE :arrow: :roll:
.. some Proteus and microRusEFI for sale in Europe ..
mi-hol
Posts: 39
Joined: Sun Jun 05, 2022 10:37 pm
Location: Tübingen, Germany
Github Username: mi-hol

Re: Status of bluetooth and MRE in 2022

Post by mi-hol »

JRD McLAREN wrote:
Mon Jan 08, 2024 7:30 am
I can build FW without SPI2, but I have no idea, if it works on yours MRE :arrow: :roll:
In case the changes you do to make it work with your version are visible on GitHub, I'll try to adapt them for my board version.
Would this work?
Best Regards
Michael
--------
Benelli Tornado 900 Tre
Benelli TNT 1130 (rebuilding)
Post Reply