Page 1 of 1

[Solved] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 1:35 pm
by OSprey42
I'm having some issues connecting an HC-06 BT module to a Hellen NB1 board so that I can use TS wirelessly (and hopefully MSDroid). I've set up the BT module using a serial adapter to run on 115200 baud and both my phone and laptop can sucessfully pair to it. Using a serial monitor at the 115200 baud I can also configure the parameters of the BT module so I think the BT module is set up correctly. The module has been connected the the expansion port on the ECU with the TX->RX, RX->TX and the VCC and GND to the 5V and GND pins as pictured:
20211111_235206.jpg
20211111_235206.jpg (3.53 MiB) Viewed 7782 times
In TS under Controller > Connection, I have it set up as pictured:
Screenshot 2021-11-11 235327.jpg
Screenshot 2021-11-11 235327.jpg (35.67 KiB) Viewed 7782 times
AndreyB confirmed with the wiring diagram that on the ECU PD6 is connected to the TX on the expansion port and PD5 is RX. I have also verified this by buzzing the pins on the ECU with a multimeter. I'm not sure if it's set up incorrectly or if it's not supported in code yet but the ECU will not wirelessly connect to TS on my laptop (or MSDroid but I'll focus on TS for now). Going to Connections > Settings and setting the type to BT direct I can pair to the BT module through TS but it fails when clicking Test Port. I suspect if I can get this working it will also work for MSDroid. It looks like people have had success with BT on the MRE but I might be the first one on Hellen. Does anyone have any ideas about why it's not working or some possible steps to troubleshoot so I can get it connected to TS through BT?

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 3:19 pm
by AndreyB
@OSprey42 did you say on slack that you got this working? What has helped?

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 10:20 pm
by OSprey42
AndreyB wrote:
Thu Nov 11, 2021 3:19 pm
@OSprey42 did you say on slack that you got this working? What has helped?
No I haven't got it working propperly, only paired so the module works but it doesn't look like it talks to the ECU. Thought it'd be better to move this to forum so it doesn't get lost in slack

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 10:25 pm
by AndreyB
Do you have a wired TTL so that we can simplify the problem statement and split BT issues from rusEFI uart issues?

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 10:39 pm
by OSprey42
AndreyB wrote:
Thu Nov 11, 2021 10:25 pm
Do you have a wired TTL so that we can simplify the problem statement and split BT issues from rusEFI uart issues?
I don't have one. I have an FTDI adapter which I used to program the BT module so I might be able to see if I can connect to the ECU that way using the TX/RX on the ECU?

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 10:46 pm
by AndreyB
Well, sounds like you have a wired TTL adapter :)

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 11:14 pm
by OSprey42
AndreyB wrote:
Thu Nov 11, 2021 10:46 pm
Well, sounds like you have a wired TTL adapter :)
Hahaha indeed. I tried the FTDI with the ECU to no success with either RS232 or FTDI mode as pictured. I first tried using 115200 baud then changed them all to 9600 baud as pictured. I also tried swapping the TX/RX pins around and switching between 3.3V and 5V logic level on the FTDI to no avail either. I'm going to guess this is a software problem.

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Thu Nov 11, 2021 11:34 pm
by AndreyB
I have great news!
image.png
image.png (5.77 KiB) Viewed 7731 times
that's totally wrong dialog for what you are interested in. I've just made a change to rename this into AUX *Sensor* Serial

You are interested in calibration secondary serial and that dialog was hidden on miata boards. I've just enabled that dialog on miata boards, please download fresh bundle in about 25 minutes and play with the new dialog once you see it.

Thank you for bringing this issue to our attention :oops:

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Fri Nov 12, 2021 12:26 am
by OSprey42
Awesome, thanks! I'll give it a go!

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Fri Nov 12, 2021 12:53 am
by OSprey42
AndreyB wrote:
Thu Nov 11, 2021 11:34 pm
I have great news!

image.png

that's totally wrong dialog for what you are interested in. I've just made a change to rename this into AUX *Sensor* Serial

You are interested in calibration secondary serial and that dialog was hidden on miata boards. I've just enabled that dialog on miata boards, please download fresh bundle in about 25 minutes and play with the new dialog once you see it.

Thank you for bringing this issue to our attention :oops:
I've just downloaded the new bundle and had a play with the FTDI adapter and couldn't get it working unfortunately. I tried 9600 and 115200 baud as well as 3.3/5V logic voltage and swapping TX/RX around. Do you see anything obviously configured wrong?

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Fri Nov 12, 2021 1:14 am
by AndreyB
As long as you've power cycled I cannot see anything obvious :(

99% of the users use USB these days. We do not have continues validation of TTL on any hardware to the best of my knowledge.

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Fri Nov 12, 2021 1:34 am
by OSprey42
I'll keep trying to muck around with it then. Thanks for making the setting visible at least! I plan on using USB for tuning but the BT is more so I can use MSDroid or Shadowdash on my phone so I can have the gauges up without needing to carry around a laptop. Might look at putting a canbus gauge in anyway once it's developed more

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Fri Nov 12, 2021 2:24 am
by AndreyB
I have a new theory, a good one. We need code improvement https://github.com/rusefi/rusefi/issues/3536

There is no chance for me to take this :( This is kind of work which could theoretically be offshored but I do not have time to manage offshoring of this :(

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Sat Nov 13, 2021 1:53 am
by OSprey42
That looks like it could be the issue! Hopefully someone manages to fix it eventually. I don't have the skill currently to work on the code but I've left the BT module attached to test out new theories and ideas as they surface.

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Sun Nov 14, 2021 9:31 pm
by mck1117
Hey @OSprey42, I think I've fixed your issue, so you should re-try with fresh snapshot firmware. You don't need to set the TX/RX pins there yourself, they're hardcoded in the firmware now. However, that first "uartConsoleSerialSpeed" field is still active, and requires an ECU reboot to take effect. Set it to whatever baud rate you need for your bt module.

Re: [Help Wanted] Connecting HC-06 BT Module to Hellen NB1 RusEFI

Posted: Mon Nov 15, 2021 12:36 am
by OSprey42
mck1117 wrote:
Sun Nov 14, 2021 9:31 pm
Hey @OSprey42, I think I've fixed your issue, so you should re-try with fresh snapshot firmware. You don't need to set the TX/RX pins there yourself, they're hardcoded in the firmware now. However, that first "uartConsoleSerialSpeed" field is still active, and requires an ECU reboot to take effect. Set it to whatever baud rate you need for your bt module.
Thank you for looking into that! I've just tested it and it works with both TS on my laptop and shadowdash on my phone over BT with a baud of 115200 as I set the BT module to run on.

For anyone interested in doing this themselves, the HC-06 wiring pictured at the top of this thread is correct. By default the HC-06 will be set to 9600 baud so if you want to configure the speed, name, password, I used this guide: https://create.arduino.cc/projecthub/RucksikaaR/interfacing-the-hc-06-bluetooth-module-with-arduino-f9c315