Author |
Message |
brentp
Site Admin
Joined: 24 Jan 2007
Posts: 5814
|
Note, you will need to ensure the bluetooth module's baud rate is set to 38,400. this might've been mentioned earlier in the thread..
-Brent
|
Wed Sep 11, 2013 8:29 pm |
|
 |
jestes
Joined: 18 Jan 2013
Posts: 43
Location: Spokane, WA
|
Good point Brent. I don't think that part was mentioned earlier in the thread. I talked about the hardware and the Android application, but not configuring the module itself.
|
Wed Sep 11, 2013 10:33 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
I'll try that if I can ever get a bluetooth connection to talk to it. Trying a terminal emulator on the phone later.
|
Thu Sep 12, 2013 5:03 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
Quick question regarding changing the baud rate. I can't do it over the bluetooth connection as it needs to be in AT mode, so can I do it through the megajolt serial port if I pop the mcu out for safety?
|
Thu Sep 12, 2013 6:25 pm |
|
 |
brentp
Site Admin
Joined: 24 Jan 2007
Posts: 5814
|
Yes, that would work in theory. Keep us posted!
_________________ Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
|
Thu Sep 12, 2013 6:35 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
Some good news. Using the MJLJ hardware with the MCU removed I can talk to the Bluetooth module via the serial port on the MJLJ. I get OK when I type AT and have been able to change the baud to 38400 using the AT+BAUD6 command and get the response OK38400. I have then gone back in using PuTTy at 38400 to check comms and AT returns OK so it must all be wired correctly.
I have powered down the module, put the MCU back in the jolt and have paired the phone again, connected the app and no data. Have I missed something?
Col
|
Thu Sep 12, 2013 7:18 pm |
|
 |
jestes
Joined: 18 Jan 2013
Posts: 43
Location: Spokane, WA
|
In the app, did you go to the Comms Settings menu and select the blue tooth pairing to use? I think the app will warn you if you don't but that is the only think I can think of that might be wrong. When do you get the error, when you click Connect?
|
Thu Sep 12, 2013 7:21 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
Here's what I've done so far.
Nice neat connector carrying 5V, Gnd, Tx and Rx all hard wired inside the MjLj:
HC-06 Bluetooth module wired into a small project box:
Fitted up and looking very neat:
Test bench wiring looms (currently using the MjLj hardware to gain access to the BT modules serial port):
Sadly still no comms to the phone app  but it looks the part...
|
Thu Sep 12, 2013 7:35 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
Selected and paired to the module. App connects and modules LED stops blinking and stays solid.
Gauges all sat at "0" permanently. If I disconnect the app it says connection lost for about 5 minutes and I usually have to restart the phone to get rid of it, however it will reconnect quite happily but with no comms.
|
Thu Sep 12, 2013 7:38 pm |
|
 |
jestes
Joined: 18 Jan 2013
Posts: 43
Location: Spokane, WA
|
What version of the hardware and firmware are you using? It has only been tested with the latest.
|
Thu Sep 12, 2013 7:39 pm |
|
 |
brentp
Site Admin
Joined: 24 Jan 2007
Posts: 5814
|
Ah. V3 controller requires 9600 baud. Which is weird because that's the default baud rate of those BT modules. Maybe check if RX / TX needs to be swapped?
_________________ Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
|
Thu Sep 12, 2013 7:42 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
V3 hardware with 3.3.1 firmware.
Col
|
Thu Sep 12, 2013 7:43 pm |
|
 |
capri_turbo
Joined: 10 Jan 2006
Posts: 108
Location: North Yorkshire, UK
|
Tried swapping Rx and Tx with the baud as received which was 9600, same result. I'll have to swap the baud back to 9600 then
|
Thu Sep 12, 2013 7:45 pm |
|
 |
jestes
Joined: 18 Jan 2013
Posts: 43
Location: Spokane, WA
|
Is the comms protocol the same for V3 and V4?
|
Thu Sep 12, 2013 7:46 pm |
|
 |
brentp
Site Admin
Joined: 24 Jan 2007
Posts: 5814
|
IIRC it is different in areas. It has been so long
_________________ Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter
|
Thu Sep 12, 2013 7:49 pm |
|
 |
|