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

Post Reply
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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 7566 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 7566 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?
Last edited by OSprey42 on Mon Nov 15, 2021 12:37 am, edited 2 times in total.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

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

Post by AndreyB »

@OSprey42 did you say on slack that you got this working? What has helped?
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
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

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

Post by AndreyB »

Do you have a wired TTL so that we can simplify the problem statement and split BT issues from rusEFI uart issues?
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
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

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

Post by AndreyB »

Well, sounds like you have a wired TTL adapter :)
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
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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.
Attachments
20211112_093936.jpg
20211112_093936.jpg (3.65 MiB) Viewed 7521 times
Screenshot 2021-11-12 093730.jpg
Screenshot 2021-11-12 093730.jpg (72.07 KiB) Viewed 7521 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

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

Post by AndreyB »

I have great news!
image.png
image.png (5.77 KiB) Viewed 7515 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:
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
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post by OSprey42 »

Awesome, thanks! I'll give it a go!
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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?
Attachments
Screenshot 2021-11-12 112034.jpg
Screenshot 2021-11-12 112034.jpg (94.5 KiB) Viewed 7503 times
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

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

Post 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.
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
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

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

Post 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 :(
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
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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.
mck1117
running engine in first post
running engine in first post
Posts: 1493
Joined: Mon Jan 30, 2017 2:05 am
Location: Seattle-ish

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

Post 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.
OSprey42
contributor
contributor
Posts: 26
Joined: Thu Sep 16, 2021 8:18 am

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

Post 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
Post Reply