tag:blogger.com,1999:blog-401164737462963207.post4791497469359107452..comments2024-03-18T03:57:53.839-07:00Comments on Ben Krasnow: Ben Krasnowhttp://www.blogger.com/profile/04234629396863486242noreply@blogger.comBlogger20125tag:blogger.com,1999:blog-401164737462963207.post-63496963846824876992020-01-29T19:39:35.764-08:002020-01-29T19:39:35.764-08:00I started building an app to take all this can bus...I started building an app to take all this can bus data and quickly reached the limitations of piping raw data into the node server.<br /><br />Instead you can use this to use node to spawn a child process to capture data. It's much more responsive<br /><br />var spawn = require('child_process').spawn,<br />candump = spawn('candump',['vcan0']);<br /><br />var io = require('socket.io').listen(app);<br />candump.stdout.on('data', function (data) {<br /> $pipedat = data.toString().split("\n"); // data comes in multiple lines<br /> $pipedat.forEach(function (e) {<br /> if (e !== "") { // last line is usually empty, ignore<br /> $o = e.split(" "); // split line data by spaces (alt to awk)<br /> $msgline = [$o[4],$o.slice(9).join("")]; // output in "123 DEADBEEF12345678" format<br /> //console.log('\033[2J'); // cls<br /> $rt = nodelib.addMessage($msgline[0],$msgline[1]);<br /> io.emit('data', $rt);<br /> //console.log($rt.engine.RPM);<br /> }<br /> });<br />});<br />app.listen(8088);<br />watthanaphandhttps://www.blogger.com/profile/10647040527064996924noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-84687367045902309062019-12-09T18:50:49.337-08:002019-12-09T18:50:49.337-08:00I had some issues with buffering, on raspbian. Her...I had some issues with buffering, on raspbian. Here's what I had to do to get the output to run smoothly.<br /><br />candump -cae vcan0,0:0,#FFFFFFFF | grep 0D1 --line-buffered | mawk -W interactive '{ print $4; system("")}' | node app.jswatthanaphandhttps://www.blogger.com/profile/10647040527064996924noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-30888427294075390072019-12-07T16:12:09.881-08:002019-12-07T16:12:09.881-08:00Grep 106 - this shows only candump packets with ID...Grep 106 - this shows only candump packets with ID 106. (it just looks for lines of text that contain 106, and drops all others)<br />awk -Winteractive '{ print $10}' - any packet containing 106 is dumped into awk that pulls out the 10th field in the line. In this case, it's the last hex byte of data from the can 106 packet.<br /><br />The reason you may not see any data, is because you don't have any canbus ID 106 packets. watthanaphandhttps://www.blogger.com/profile/10647040527064996924noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-15540627183379360882019-03-07T13:50:33.754-08:002019-03-07T13:50:33.754-08:00This comment has been removed by the author.The Eminent Brandy Leehttps://www.blogger.com/profile/03235320576120684199noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-57268946927011192952017-06-16T14:30:34.051-07:002017-06-16T14:30:34.051-07:00Hello Ben. Firstly, I would like to thank you for ...Hello Ben. Firstly, I would like to thank you for sharing this example.<br />I have a question though - why did you use those pipes "grep 106 | awk -Winteractive '{ print $10}'" before executing node app?<br />What do they mean?<br />I am asking because I can't get any data to be printed on the webpage, but candump works while executed standalone.Cerberhttps://www.blogger.com/profile/07478356808815387674noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-81481370877645478122017-03-08T21:37:47.774-08:002017-03-08T21:37:47.774-08:00Thanks! This may be for pre-2015 cars. Mouser sh...Thanks! This may be for pre-2015 cars. Mouser shows this as a 12-position connector, and the 2015 and later cars have a larger 18 position connector.Ben Krasnowhttps://www.blogger.com/profile/04234629396863486242noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-26832771242348898512017-03-08T08:38:42.792-08:002017-03-08T08:38:42.792-08:00Connector is widely availible. Here is Mouser page...Connector is widely availible. Here is Mouser page of connector shell http://www.mouser.com/search/ProductDetail.aspx?r=571-173851-2<br /><br />pins: http://www.mouser.com/search/ProductDetail.aspx?r=571-173630-6Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-41664366782252631952017-03-06T04:48:00.380-08:002017-03-06T04:48:00.380-08:00Hi Ben, is there a private way to contact you?Hi Ben, is there a private way to contact you?Anonymoushttps://www.blogger.com/profile/10004288013871160763noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-87145872431446622032017-03-06T04:47:10.352-08:002017-03-06T04:47:10.352-08:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/10004288013871160763noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-15349014550297334952017-02-28T11:54:26.919-08:002017-02-28T11:54:26.919-08:00Have you looked into a grafana and influxdb setup?...Have you looked into a grafana and influxdb setup?Anonymoushttps://www.blogger.com/profile/04753532759161928965noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-15240132430916142262017-02-27T19:30:03.207-08:002017-02-27T19:30:03.207-08:00P100D :) The next video on this topic should sho...P100D :) The next video on this topic should show some really extreme automotive physics experiments.Ben Krasnowhttps://www.blogger.com/profile/04234629396863486242noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-86956238414255956402017-02-27T12:52:07.747-08:002017-02-27T12:52:07.747-08:00What version of the Model S did you go with, Ben?What version of the Model S did you go with, Ben?Titanhttps://www.blogger.com/profile/11950575664405929594noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-30813820751151847442017-02-26T14:53:37.677-08:002017-02-26T14:53:37.677-08:00This is so cool. I hoped for someone to do this. L...This is so cool. I hoped for someone to do this. Looking forward to your updates! Maybe you can sell a ready-to-use kit sometime in the future? I would buy that in a heartbeat!Chrishttp://www.dronefactory.chnoreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-81050328855977672862017-02-24T22:14:08.850-08:002017-02-24T22:14:08.850-08:00The scope ground was definitely connected, however...The scope ground was definitely connected, however I agree that those spikes look pretty gnarly. The scope was being powered from 110VAC from an inexpensive 12V inverter with a three-prong plug. So, it is likely the scope chassis was grounded to the car's earth, and there were possibly parallel ground paths. I noticed that the scope was able to decode the data with no problem, so I ignored the spikes.Ben Krasnowhttps://www.blogger.com/profile/04234629396863486242noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-30517211837494786582017-02-23T09:19:04.588-08:002017-02-23T09:19:04.588-08:00Not to be too picky but i think you said odb2 shou...Not to be too picky but i think you said odb2 should be obd2 (on board idagnostics..)Dougnoreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-54886576662750753032017-02-22T23:36:37.114-08:002017-02-22T23:36:37.114-08:00Any idea what those spikes on the scope display ar...Any idea what those spikes on the scope display are coming from? Surely that can't be a feature of CAN? It almost looks like the scope's ground wire is not connected.mightyohmhttps://www.blogger.com/profile/14536857416836703235noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-65030488150167751792017-02-22T22:22:10.717-08:002017-02-22T22:22:10.717-08:00Thank for share, for me this is new knowledge. My ...Thank for share, for me this is new knowledge. My basic is nutrition.Aspudinhttp://papattonk.blogspot.comnoreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-5535876235970144592017-02-22T08:40:35.071-08:002017-02-22T08:40:35.071-08:00Um, what happened to the semiconductor fabrication...Um, what happened to the semiconductor fabrication tools that you were making a while back?Manihttps://www.blogger.com/profile/04940882181339540580noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-42894346622043500432017-02-21T15:53:22.965-08:002017-02-21T15:53:22.965-08:00Thanks for this! I've just purchased the hard...Thanks for this! I've just purchased the hardware and cannot wait to see what you are able to make of this. Ammarhttps://www.blogger.com/profile/11623101558361610937noreply@blogger.comtag:blogger.com,1999:blog-401164737462963207.post-14767743109349904682017-02-21T00:23:50.860-08:002017-02-21T00:23:50.860-08:00Thanks for sharing.
Could you by any chance also s...Thanks for sharing.<br />Could you by any chance also share som snippets of canbus data?<br />I have done some development for the center console browser before, and would like to play around with it.<br /><br />I think D3 would be a nice fit for this kind of project of streaming data, and live updates. D3 is an open source javascript library for manipulating documents/graphics based on data. It has great documentation, lots of examples and a solid community.<br /><br />85D owner from Tromsø/Norway.Anonymoushttps://www.blogger.com/profile/04748849663723380251noreply@blogger.com