Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: v1 support in Linux

  1. #11
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    Also I just put in the daemonise option.

    Code:
    kibbles:build chunky$ ./v1cs --help
    Usage: ./v1cs [args]
       [-m|--mute]
       [-d|--device=</dev/ttyUSB1>]
       [-1|--on]
       [-0|--off]
       [-l|--listen]
       [-o|--mode]
       [-e|--daemonise]
       [-q|--quiet]
       [-v|--version]
       [-h|--help]
    kibbles:build chunky$
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  2. #12
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    Trip actually did generously hook me up with some svn space in the linuxice repo.

    Code:
    svn co https://linuxice.svn.sourceforge.net/svnroot/linuxice/packages/vone
    cd vone
    mkdir build; cd build
    cmake ..
    make
    ./v1cs --help
    Eventually outputs:
    Code:
    gogh:~/src/tmp/vone/build chunky$ ./v1cs --help
    Usage: ./v1cs [args]
       [-m|--mute]
       [-d|--device=</dev/ttyUSB1>]
       [-1|--on]
       [-0|--off]
       [-l|--listen]
       [-o|--mode]
       [-e|--daemonise]
       [-q|--quiet]
       [-v|--version]
       [-h|--help]
    gogh:~/src/tmp/vone/build chunky$
    Have fun,
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  3. #13
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    FWIW, the Dbus signal is thus:
    Code:
    DBUS_TYPE_BOOLEAN, loud,
    DBUS_TYPE_UINT32, strength,
    DBUS_TYPE_UINT32, ledbits,
    DBUS_TYPE_UINT32, eightsegmentbits,
    DBUS_TYPE_UINT32, arrowbits,
    DBUS_TYPE_STRING, &data
    Where "loud" corresponds to loud/quiet, "strength" is an actual number between 1 and 8. the Leds, eight-segment display, and arrow leds are packed thus:

    Code:
    int eightsegmentbits = 0;
    int i;
    for(i=7;i>=0;i--) {
    	eightsegmentbits |= (1<<i) * (eightsegment[7-i]?1:0);
    }
    
    int ledbits = 0;
    if(ledX) ledbits |= 0x08;
    if(ledK) ledbits |= 0x04;
    if(ledKA) ledbits |= 0x02;
    if(ledLaser) ledbits |= 0x01;
    
    int arrowbits = 0;
    if(frontarrow) arrowbits |= 0x04;
    if(sidearrow) arrowbits |= 0x02;
    if(reararrow) arrowbits |= 0x01;
    And "data" is the original seventeen bytes pulled from the device.

    The documentation I was working off appears here: http://www.v1connect.com/Protocol.aspx.

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  4. #14
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    Also, with this you can "simulate" by just pointing at a file containing a typical data stream using the --device option.

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  5. #15
    Low Bitrate
    Join Date
    Jun 2006
    Location
    Los Angeles
    Posts
    95
    Looking good guys. Glad its working out and cant wait to see what becomes of this.
    V1Connect - Valentine1 Serial Adapter http://www.v1connect.com

  6. #16
    Low Bitrate
    Join Date
    Jun 2006
    Location
    Los Angeles
    Posts
    95
    Any visual implementation yet for LinuxICE?
    V1Connect - Valentine1 Serial Adapter http://www.v1connect.com

  7. #17
    licensed to kill - FKA kev000
    Auto Apps:loading...
    tripzero's Avatar
    Join Date
    Aug 2006
    Location
    16.40618, 120.61106
    Posts
    2,494
    Quote Originally Posted by CityFan86 View Post
    Any visual implementation yet for LinuxICE?
    Not yet. We have some code in the linuxice code repo for a daemon, but it has problems with communicating with the v1. On/Off/Mute and the other write operations work, but it sometimes won't read from the v1 until you retry the app a few times. Gary was planning on reworking how it reads, but he's been busy and so have I. Once we do get it working, we'll have the UI built and push an installable to the LinuxICE repo.
    Former author of LinuxICE, nghost, nobdy.
    Current author of Automotive Message Broker (AMB).
    Works on Tizen IVI. Does not represent anyone or anything but himself.

  8. #18
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    I just pushed a little simulator into svn, alongside v1cs. It builds using cmake [for now, until trip adds it as I describe below]. All it does is create a pty, then spams a sentence once every half second. [strength counts up, the eight-segment display roughly represents the strength number, and the leds turn on roughly in sequence].

    Trip000:
    To build it, you just need to build v1sim.cpp, and link it. [look at CMakeLists.txt]

    One thing that will make a difference is that you need to check [in the build system] for the existence of the symbol ptsname_r, and if it exists, #define HAVE_PTSNAME_R.

    If you don't #define HAVE_PTSNAME_R, then it falls back to using ptsname, which is the unsafe version. More importantly, ptsname actually crashes on one ubuntu install that I have here - so on your machine, if you don't do this, it'll probably actually crash on startup. Don't claim you haven't been warned.


    I don't bother checking for the existence of posix_openpt, so this probably won't work on cygwin. If you want to work with cygwin [remember it still won't be implementing a COM port, though...], then copy-paste the relevant posix_openpt hoojery from here:
    http://svn.icculus.org/obdgpslogger/...cc?view=markup

    Note that to do that, you need to actually check whether the symbol is available in the library you're linking against, and not just whether it's available in the headers [grrrr cygwin grumble grrr]

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  9. #19
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    Also, trip, add your name to the v1cs authors, and update the README. I can't even make v1cs build on this machine, so I've no idea what's up:

    Code:
    kibbles-2:vone chunky$ qmake
    kibbles-2:vone chunky$ make 
    g++-4.0 -c -pipe -Wall -W -Os  -D__DARWIN_X11__ -DQT_NO_DEBUG -I/sw/lib/qt3/mkspecs/default -I. -I. -I/sw/lib/qt3/include -I/sw/lib/qt3/include -o v1cs.o v1cs.cpp
    v1cs.cpp:24:28: error: QCoreApplication: No such file or directory
    v1cs.cpp:25:27: error: QDBusConnection: No such file or directory
    v1cs.cpp:26:19: error: QtDebug: No such file or directory
    In file included from v1cs.cpp:37:
    v1cs.h:30:19: error: QThread: No such file or directory
    In file included from v1cs.cpp:39:
    v1csdbus.h:15:26: error: QtCore/QObject: No such file or directory
    v1csdbus.h:16:25: error: QtDBus/QtDBus: No such file or directory
    v1cs.h:47: error: expected class-name before ‘{’ token
    v1cs.h:48: error: ISO C++ forbids declaration of ‘Q_OBJECT’ with no type
    v1cs.h:50: error: expected ‘;’ before ‘public’
    v1cs.h:56: error: expected `:' before ‘slots’
    v1cs.h:57: error: expected primary-expression before ‘void’
    v1cs.h:57: error: ISO C++ forbids declaration of ‘slots’ with no type
    v1cs.h:57: error: expected ‘;’ before ‘void’
    v1cs.h:63: error: expected primary-expression before ‘void’
    v1cs.h:63: error: ISO C++ forbids declaration of ‘signals’ with no type
    v1cs.h:63: error: expected ‘;’ before ‘void’
    v1csdbus.h:28: error: expected class-name before ‘{’ token
    v1csdbus.h:29: error: ‘Q_OBJECT’ does not name a type
    v1csdbus.h:57: error: expected `:' before ‘Q_SLOTS’
    v1csdbus.h:58: error: expected primary-expression before ‘void’
    v1csdbus.h:58: error: ISO C++ forbids declaration of ‘Q_SLOTS’ with no type
    v1csdbus.h:58: error: expected ‘;’ before ‘void’
    v1csdbus.h:63: error: expected primary-expression before ‘void’
    v1csdbus.h:63: error: ISO C++ forbids declaration of ‘Q_SIGNALS’ with no type
    v1csdbus.h:63: error: expected ‘;’ before ‘void’
    v1cs.cpp:46: error: prototype for ‘VOne::VOne(QString, bool)’ does not match any in class ‘VOne’
    v1cs.h:47: error: candidates are: VOne::VOne(const VOne&)
    v1cs.h:47: error:                 VOne::VOne()
    v1cs.cpp: In constructor ‘VOne::VOne(QString, bool)’:
    v1cs.cpp:46: error: ‘device’ has incomplete type
    v1csdbus.h:20: error: forward declaration of ‘struct QString’
    v1cs.cpp:49: error: invalid use of undefined type ‘struct QString’
    v1csdbus.h:20: error: forward declaration of ‘struct QString’
    v1cs.cpp:52: error: ‘qDebug’ was not declared in this scope
    v1cs.cpp:53: error: ‘QCoreApplication’ has not been declared
    v1cs.cpp:57: error: ‘On’ was not declared in this scope
    v1cs.cpp:58: error: ‘msleep’ was not declared in this scope
    v1cs.cpp:59: error: ‘qDebug’ was not declared in this scope
    v1cs.cpp:64: error: ‘QTimer’ was not declared in this scope
    v1cs.cpp:64: error: ‘timer’ was not declared in this scope
    v1cs.cpp:64: error: expected type-specifier before ‘QTimer’
    v1cs.cpp:64: error: expected `;' before ‘QTimer’
    v1cs.cpp:66: error: ‘timeout’ was not declared in this scope
    v1cs.cpp:66: error: ‘SIGNAL’ was not declared in this scope
    v1cs.cpp:66: error: ‘SLOT’ was not declared in this scope
    v1cs.cpp:66: error: ‘connect’ was not declared in this scope
    v1cs.cpp: At global scope:
    v1cs.cpp:86: error: no ‘void VOne::On()’ member function declared in class ‘VOne’
    v1cs.cpp: In member function ‘void VOne::run()’:
    v1cs.cpp:147: error: ‘emit’ was not declared in this scope
    v1cs.cpp:147: error: expected `;' before ‘Update’
    v1cs.cpp: In function ‘int main(int, char**)’:
    v1cs.cpp:214: error: ‘QCoreApplication’ was not declared in this scope
    v1cs.cpp:214: error: expected `;' before ‘app’
    v1cs.cpp:216: error: no matching function for call to ‘VOne::VOne(char*&, bool&)’
    v1cs.h:47: note: candidates are: VOne::VOne()
    v1cs.h:47: note:                 VOne::VOne(const VOne&)
    v1cs.cpp:70: error: ‘VOne::~VOne()’ is private
    v1cs.cpp:216: error: within this context
    v1cs.cpp:218: error: no matching function for call to ‘VOneAdaptor::VOneAdaptor(VOne*)’
    v1csdbus.h:28: note: candidates are: VOneAdaptor::VOneAdaptor()
    v1csdbus.h:28: note:                 VOneAdaptor::VOneAdaptor(const VOneAdaptor&)
    v1cs.cpp:220: error: ‘QDBusConnection’ was not declared in this scope
    v1cs.cpp:220: error: expected `;' before ‘connection’
    v1cs.cpp:221: error: variable ‘QString path’ has initializer but incomplete type
    v1cs.cpp:222: error: ‘connection’ was not declared in this scope
    v1cs.cpp:224: error: ‘qDebug’ was not declared in this scope
    v1cs.cpp:226: error: ‘connection’ was not declared in this scope
    v1cs.cpp:228: error: ‘qDebug’ was not declared in this scope
    v1cs.cpp:231: error: ‘class VOne’ has no member named ‘start’
    v1cs.cpp:233: error: ‘app’ was not declared in this scope
    v1cs.cpp:161: warning: unused variable ‘turn_on’
    v1cs.cpp:162: warning: unused variable ‘turn_off’
    v1cs.cpp:163: warning: unused variable ‘mute’
    v1cs.cpp:164: warning: unused variable ‘change_mode’
    v1cs.cpp:165: warning: unused variable ‘listen’
    v1cs.cpp: In function ‘int v1cs_listen(int, int*, int*, int*, int*, int*, int*, char*, int*, int*, int*, char*)’:
    v1cs.cpp:302: error: ‘qDebug’ was not declared in this scope
    v1cs.cpp:314: error: ‘qDebug’ was not declared in this scope
    make: *** [v1cs.o] Error 1
    kibbles-2:vone chunky$
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  10. #20
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    924
    OK, so, little update:

    I've rewritten all the serial handling in v1cs [now vone]. Should be much more bulletproof now, as well as handling things like reads being faster and slower than the device is spitting out,

    [DEVELOPER HOO-HAA]
    Note that if the device is spitting stuff out a *lot* faster than you're reading [shouldn't be the case, but it's possible], you'll get a warning that the buffer is being filled. One solution is to increase the buffer size [the build system lets you do that at build-time], but the default can hold about a second's worth of sentences or so, which is a lot. You probably want to increase the samplerate rather than the buffer.
    [/DEVELOPER HOO-HAA]

    v1sim has a couple new options to automatically attach either vone or screen to it automatically [makes testing massively simpler].

    Trip's molested vone a whole bunch so it needs qt now, but should gracefully do a bunch of stuff with dbus. I haven't tried dbus much, personally, since that's trip's thing.


    I don't actually have a valentine 1. If anyone has one laying around that they'd be willing to send me [or sell to me for a reasonable price], I'd greatly appreciate it. It would make this whole thing a universe easier [and I want a v1, but of course that's incidental :-)]

    Have fun all,
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 04-22-2008, 12:46 PM
  2. RR 08-02-05... SIRIUS Support ...
    By guino in forum Road Runner
    Replies: 76
    Last Post: 03-09-2006, 01:44 PM
  3. RR 08-21-05 ... More FD support ...
    By guino in forum Road Runner
    Replies: 42
    Last Post: 08-27-2005, 09:02 PM
  4. Possible EPIA distro for Linux, Can we make one?
    By adamis in forum Software & Software Development
    Replies: 15
    Last Post: 02-23-2005, 05:50 PM
  5. PS2 Linux -- check it out
    By Superfly in forum General Hardware Discussion
    Replies: 7
    Last Post: 03-21-2003, 11:11 PM

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
  •