Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: .NET OBD2 Library

  1. #1
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127

    .NET OBD2 Library

    Well, not sure if there is any interest in this... but as many people know I have one of the more comprehensive open source C++ obd2 libraries around. The issue is, this library depends on Qt, which is quite a heavy dependency if you are not using Qt to write your application. I came across a situation where I needed to use OBD2 in c#, so I went ahead and wrote a wrapper for the core obd interface code that allows you to use it with c#. I've attached three files. The first is the actual c# library source + obdlib.dll binary (This is the c++ communications part). The second is the test application project file, and the third is a compiled version of the test and the library for anyone to try out. To use it, you put in the COM port, baud rate, and hit connect. Then type a PID into the pid text box like 010C, or 0110. Then hit "Add pid", and it should start to update.

    I'm working on adding a lot more stuff like connection information, tool version, etc, but this gives you an idea what's usable. If there is any interest I'll throw it up on gitorious and keep it updated. The eventual goal is to have it near identical to the Qt version which uses the same underlying communications library.

    Edit 4/23/12: Fixed a bug that heezer7 helped me track down. Thanks!!

    Edit 4/26/12: Fixed bug Sonic reported, com ports above 9 and text ports (CNCA etc) not working. Download obdlib.zip and replace obdlib.dll to fix.
    Attached Files Attached Files
    Last edited by malcom2073; 04-26-2012 at 10:29 AM.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  2. #2
    Variable Bitrate heezer7's Avatar
    Join Date
    May 2004
    Location
    IL, USA
    Posts
    255


    Something I have put off writing for way too long. What license is it released under? Do you happen to have it on github or somewhere where I could watch for any updates?

    and THANKS!


    Edit: lmao@Here there be monsters
    Last edited by heezer7; 04-13-2012 at 02:42 PM.

  3. #3
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    Lookie there I forgot the license. It'll be LGPLv2, just like the underlying libobd is

    Oh, and yes it's on gitorious, inside libobd https://gitorious.org/libobd
    https://gitorious.org/libobd/libobd/...r/ObdThread.cs


    Edit:
    Quote Originally Posted by heezer7 View Post
    Edit: lmao@Here there be monsters
    I wrote that code over 5 years ago (Closer to 10), and it scares me because I no longer have any idea how it works, but it works GREAT!
    Last edited by malcom2073; 04-13-2012 at 02:53 PM.
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  4. #4
    Variable Bitrate heezer7's Avatar
    Join Date
    May 2004
    Location
    IL, USA
    Posts
    255
    This is where no matter how hard I try to completely understand OSS licenses and plugin structures and such I am still lost at times. OM is GPLv3 which cannot directly use v2. But can I write a GPLv2 plugin so I can use a LGPLv2 lib and not conflict with OM? ugh. Seems like I can never get a consistent answer especially when the plugin is using helper functions in the GPLv3 application it is a plugin for.

  5. #5
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    Correct. as far as I understand it you can do anything with LGPLv2 licensed code that you can with GPLv2. In addition: You can use LGPL code in a closed source app, as long as it's a .dll (not statically linked), and not modified. If modified, you have to release the modifications, not the closed source stuff.

    Now, that being said, you can also use lgplv2 licensed code in a gplv3 licensed application, since lgplv2+ gives you the option to relicense the library as gplv2+ (also known as, gplv3). And this is lgplv2+ (The + means "or any later version")
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  6. #6
    Variable Bitrate heezer7's Avatar
    Join Date
    May 2004
    Location
    IL, USA
    Posts
    255
    oh ok, I assumed since you said v2 that you meant straight v2 and not v2+ (since it seems like some people do want to stay with v2). Means I don't have to figure it out for a bit longer. haha

  7. #7
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    Sorry, my bad. Yeah 2+,
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  8. #8
    Variable Bitrate heezer7's Avatar
    Join Date
    May 2004
    Location
    IL, USA
    Posts
    255
    Need to clear your PMs ;-)

    I have a basic plugin for OM up and going with your OBD2 code. Thanks again! However I am having a bit of a problem. I am not getting any data back from your test app. I can connect and once I request a PID I see the lights start going like crazy but all the values always stay at 0. I tried on 2 different cars, but could never make it into the if with the second break point here http://i91.photobucket.com/albums/k299/heezer7/obd.png

    With other software I could connect ok with the same port and baud. Any thoughts?

  9. #9
    North of the land of Hey Huns
    Auto Apps:loading...

    Join Date
    Jun 2004
    Location
    Westminster, MD
    Posts
    2,127
    Oops, I'll clear them in a bit

    Hmm, it seems the response isn't coming back properly. "\v1 46" should be "41 46" Does it consistently return \v1 at the beginning of every reply?
    "stop with the REINSTALLS, what do you think we got some lame-o installer!!!" - mitchjs
    RevFE
    My Shop

  10. #10
    Variable Bitrate heezer7's Avatar
    Join Date
    May 2004
    Location
    IL, USA
    Posts
    255
    I can't say every time but I did see it a few times at least. Back inside now but I can go check again later and have it dump a bunch of replies if that is something that would interest you.

Page 1 of 2 12 LastLast

Similar Threads

  1. Add one album to my Library?
    By Nola111 in forum Centrafuse
    Replies: 0
    Last Post: 04-15-2008, 12:29 PM
  2. GUI Library name
    By TheLlama in forum Linux
    Replies: 9
    Last Post: 05-02-2006, 04:54 PM
  3. How to fix library in 1.6?
    By Hwonder in forum CF FAQs
    Replies: 5
    Last Post: 04-28-2006, 11:52 AM
  4. MP3 Library
    By Nads O'Hair in forum Software & Software Development
    Replies: 8
    Last Post: 04-18-2001, 11:59 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •