Can't pair to BT module after firmware update

Discussion on the RaceCapture App - Windows, Android, OSX and Linux.

Moderators: JeffC, stieg

Post Reply
rphelan
Posts: 3
Joined: Fri Jun 17, 2016 6:59 pm

Can't pair to BT module after firmware update

Post by rphelan »

Hi All,
I just updated my RCP to the latest firmware. When I went to update it, I went ahead and unplugged the bluetooth module to be safe.

Now, after the update I plugged the BT module back in and tried to pair. No go. Tried my phone, my tablet, my PC, each one gave a response of "Bad Pin". I'm using the same pin as I had before (I think 1234) and it's still failing to connect. I've tried the BT module in either RJ11 jack, and it makes no difference.

I've re-flashed the device with the firmware package I downloaded and it seemed to go through the process, but no change on the BT situation. I'm considering flashing it down to an earlier version, testing, and then flashing back up again.

Anyone have any thoughts?

Thanks,
Rob

brentp
Site Admin
Posts: 5986
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Hi Rob,

What version did you upgrade to before you saw the problem? 2.9.2 or the beta 2.10.0 we announced on the beta list?

Also, try shutting down / restarting the phone or tablet; sometimes the bluetooth service in the android device gets into a bad state that a re-start helps fix.

Also, when it's plugged in, you're otherwise seeing the green flashing light on the bluetooth module?
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

loftygoals
Posts: 26
Joined: Fri Oct 31, 2014 4:21 am
Location: Dallas, TX

Post by loftygoals »

To follow up on this for, Rob, it associating again.

It was on the public release 2.9.2. Changing the name and the PIN seemed to fix the problem.

BTW, Rob did a slick canbus integration with the MS2/Extra (MSPNP2) that is controlling his BMW M20. He'll be doing a short video showing the wiring and the configuration in the future.

-bj

brentp
Site Admin
Posts: 5986
Joined: Wed Jan 24, 2007 6:36 am

Post by brentp »

Fantastic. Thanks for the update. And we'd love to see the video -the megasquirt integration is great with RCP!

Note, we recently updated the Megasquirt script to account for some TPS weirdnesses we've seen in the data.
Brent Picasso
CEO and Founder, Autosport Labs
Facebook | Twitter

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

The megasquirt script as-is is too large to run on MK1 hardware (on 2.8.7 firmware). I pared it down a bit and got it to run without complaining about memory limits, but because the racecar is at another guy's house, it'll be tomorrow before I know if it actually pulls data from our Megasquirt CAN broadcast. 3rd autocross (in our 6-event season) is tomorrow. If it works, I'll share the slimmer script here. I also added the auto-log-if-battery-over-13V function into ontick(), and that part works in my daily driver.
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

toga94m
Posts: 127
Joined: Wed Jun 05, 2013 1:57 am
Location: Upstate NY

Post by toga94m »

I had to trim out the filter section, and replace some constants with their numeric equivalents to make the Megasquirt script fit on a MK1. It worked fine in-car, before starting the car. Once battery voltage got high enough to start logging, the script silently crashed. So I commented out the section I added (log if battery > 13) and manually started logs... and was able to log CANbus data from megasquirt.

Any tips about properly adding the startLogging() back in? I seem to suffer brainfarts when I'm at the start line for the next autocross run... not remembering to push the logging button.

Also - the 1.6.0 app on the Kindle can't edit the script - the screen tries to split between script, console, and onscreen keyboard, but the script goes off the top so there's no way to edit. Otherwise, the Kindle is a great upgrade to my old tablet - it connects quickly over bluetooth.

Code: Select all

--1 for Big Endian (MSB) mode; 0 for Little Endian mode (LSB)
be_mode = 1

--add your virtual channels here
--addChannel&#40;<name>, <sample rate>, &#91;logging precision&#93;, &#91;min&#93;, &#91;max&#93;, &#91;units label&#93;&#41;
rpmId = addChannel&#40;"RPM", 10, 0, 0, 8000&#41;
tpsId = addChannel&#40;"TPS", 10, 0, 0, 100, "%"&#41;
mapId = addChannel&#40;"MAP", 10, 0, 0, 105, "kPa"&#41;
cltId = addChannel&#40;"Coolant", 1, 0, 0, 250, "F"&#41;

--customize here for CAN channel mapping
--format is&#58; &#91;CAN Id&#93; = function&#40;data&#41; map_chan&#40;<channel id>, data, <CAN offset>, <CAN length>, <multiplier>, <adder>&#41;
CAN_map = &#123;
&#91;1512&#93; = function&#40;data&#41; map_chan&#40;mapId, data, 0, 2, 0.1, 0&#41; map_chan&#40;rpmId, data, 2, 2, 1, 0&#41; map_chan&#40;cltId, data, 4, 2, 0.1, 0&#41; map_chan&#40;tpsId, data, 6, 2, 0.1, 0&#41; end
&#125;

function onTick&#40;&#41;
    processCAN&#40;CAN_chan&#41;

--  if getAnalog&#40;7&#41; > 13 then
--    startLogging&#40;&#41;
--  else
--    stopLogging&#40;&#41;
--end removed

end

--===========do not edit below===========
function processCAN&#40;chan&#41;
    repeat
        local id, e, data = rxCAN&#40;chan&#41;
        if id ~= nil then
            local map = CAN_map&#91;id&#93;
            if map ~= nil then
                map&#40;data&#41;         
            end
        end
    until id == nil
end

--Map CAN channel, big endian format
function map_chan&#40;cid, data, offset, len, mult, add, filter&#41;
    offset = offset + 1
    local value = 0
    while len > 0 do
        value = &#40;value * 256&#41; + data&#91;offset&#93;
        offset = offset + 1
        len = len - 1
    end
    local cv = value * mult + add
    setChannel&#40;cid, cv&#41;
end

initCAN&#40;0,500000&#41;
setTickRate&#40;30&#41;
------------
Learning Race Capture Pro... on someone else's car
Learning Python/Kivy on my own PC

Post Reply