I had a thread about this and it seems to be gone. Weird!
So a simplified way to add the CBT support to your Arduino installation is by adding this custom URL to your settings and installing the lib via the Boards Manager.
Load up Arduino and head to Preferences. Then in the field marked "Additional Boards Manager URLs" add this URL:
Press ok to close the window.
Then go to Tools > Board > Boards Manager
In the filter just type CANBus and you should see the CANBus Triple library. Click install and you're good to go!
I'd love to continue making these but I have to order a thousand minimum to make them are a reasonable price. And it's a ton of labor on my part to assemble them. I did over a thousand by hand, it sucked and I would rather spend that time on support and future hardware.
Indeed, it works I keep my CBT plugged into my Mazda even tho I wont drive it for weeks at a time. You just need to enable the 'Naptime' middleware.
In a lot of cars you will find a kind of heartbeat message. It's dispatched maybe once a second while the car is on. You can pass this message id into the middleware and it will automatically go to sleep when it does not see it for a while. It also sets a filter on the CAN controller that will trigger an interrupt to wake the system back up when it does receive the heartbeat message.
Here you will see it's enabled by setting a C def:
You can just uncomment the def on line 16 to enable the Naptime middleware. And be sure to set a heartbeat message id on line 56 or set it to 0x0000.
The best way to do it would be in the tick() method of your middleware class. You can add a class property with the type of boolean to do a check in subsequent tick() calls to decide if you want to perform the action (sending a message) again.
Here is an example of how to do this in the Mazda code. It does a gauge sweep then the CBT starts up.
Also, in that example you will see an easy way to create a new Msg instance and push it to the dispatch stack for sending!
It depends on if the nodes on the network are listening and in fact do respond to the messages you're sending. For example on my Mazda it will send a packet out when I lock the doors, but sending the same message will not lock the doors because the BCM doesn't listen and react to it. It sends the messages out as an event for other nodes to be informed of the event.
Looking good!! Thanks for sharing pictures, I love seeing what people do with the CBT!
The way I identify the best place to MITM is as close to the actual device I want to control as possible. Every car is different so a little trial and error will be involved. The nice thing is if it does not work you can just reconnect the cut bus and it will still work.
Also you'll want to tap in somewhere where the CBT will have to send/receive as few packets as possible to achieve the desired effect.That assures it can read process and resend the CAN data fast.
@afgun Thanks! I've been diagnosed with Sleep Apnea, which is weird as I'm not overweight and in pretty good health. I have been using a CPAP machine and slowly but surely coming back to life! :)
Over the last couple years the issue had continued to get worse, to the point where I couldn't walk up stairs as my joints hurt and I should not have been driving a car.
So I'm back at it now. Sorry to everyone for my lack of involvement over the past year.
So for reference the API did change a bit in 0.6.0 by a contributor. The command to log packets changed (for the better)
I'm working on updating the app for compatibility and continuing to work on the android app as well.
Enable/disable logging over serial (filters are optional)
Cmd Bus On/Off MsgId1 MsgId2
0x03 0x01 0x01 // Enable logging on bus 1 (do not touch current filter)
0x03 0x01 0x01 0x290 0x291 // Enable logging on bus 1 and filter only messages 0x290 and 0x291
0x03 0x01 0x00 // Disable logging on bus 1
MsgId1 Mask1 MsgId2 Mask2
0x03 0x01 0x02 0x290 0xFFF 0x400 0xFF0 // Enable logging on Bus 1 filter messages 0x290 and 0x40* (0 in mask is a wildcard)
0x03 0x01 0x02 0x000 0x000 // Enable logging on Bus 1 for ALL messages
I've switched the forum over to NodeBB! It's slick and super fast. Also it should keep those damn spammers out!
If you had an account on the old forum your account was ported over, but your password was not. So simply reset your password and you will be able to log in.
If you have any ideas for the forum please let me know. It has Groups (Good for specific vehicle or make chat), Live users to user chat, and a Blog setup if you would like to write a HowTo on your CANBus Triple install or hack.
New devices are finally available in the store!
You'll see I added ABS 3d printed cases for a little cheaper also. I have to mill the cases myself now so I thought this would be a good option for people to save money and less work for me. :)