CBus Driver Software - Issues

Discussion in 'General Discussion' started by John@DHW, Jul 4, 2005.

  1. John@DHW

    John@DHW

    Joined:
    Jul 4, 2005
    Messages:
    4
    Likes Received:
    0
    A couple of years ago I integrated CBus into my companies automation software using CGate. I have recently been told of a new integration product called the CBus Driver Software which I downloaded and started testing in May. This driver is a DLL which will provide faster throughput and response times than CGate.

    I had a number of issues with the DLL when trying to implement it into our product:
    1. If I used the DLL directly in my app it would cause spurious problems with other components in our app.
    2. I tried implementing it in an external application which worked beautifully until I wanted to have the app communicate with our automation app using ip sockets. As soon as the socket connected the dll would stop reporting CBus events.

    That was Driver Version 3.2.

    I have today downloaded the current version 3.4 and have tried to run the VB example and although I can see it triggering the connect event it doesn't seem to work for sending and receiving CBUS events.

    I am using VS.NET 2003 and am keen to get this interface working. Any ideas would be appreciated.

    Thanks
     
    John@DHW, Jul 4, 2005
    #1
  2. John@DHW

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    This driver has been used in the Windows and Linux form by a number of individuals and companies.

    Clipsal do not use VB - except to throw together the example that ships with the driver.

    So... if anybody else out there can help please do so.

    Clipsal cannot help, as we are not VB power users, and as far as we can tell there are no problems with this driver. We use it (as we ship it for download, with no changes) for a number of Clipsal products, including a number that use sockets. For us it works just fine.
     
    ashleigh, Jul 4, 2005
    #2
  3. John@DHW

    John@DHW

    Joined:
    Jul 4, 2005
    Messages:
    4
    Likes Received:
    0
    The driver ships with some sample projects. One is written in VB.Net which is what I have used to test the current version. Could someone at Clipsal at least retest the VB.Net sample so I can ensure that I am not doing something very basic wrong.

    Thanks in Advance.
     
    John@DHW, Jul 4, 2005
    #3
  4. John@DHW

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Sorry - After 3 hours of checking (where this is not supported, remember), and comparing it with the Borland C example, I can get it to connect when run inside the VB environment. After that nothing.

    I have no idea why - everything looks like it should be OK, and the example used to work. The only changes have been to add new API calls.

    I'm guessing that there is something wierd about VB.net (there is a huge lot that is wierd - I hate it). The applications do not seem to run outside the VB editing environment, and I'm wondering if it has something to do with the .net framework.

    At this time I cannot put any more effort into this.
     
    ashleigh, Jul 5, 2005
    #4
  5. John@DHW

    John@DHW

    Joined:
    Jul 4, 2005
    Messages:
    4
    Likes Received:
    0
    Thanks ashleigh ... I really appreciate your efforts. I know its a total pain to look at code in a language you don't generally use.

    Do you know if anyone has gotten the dll working using another .NET language other then VB. Maybe I could use C# or C++ if thats the case. Otherwise maybe I should try and use it in VB6?

    Thanks again ... John
     
    John@DHW, Jul 5, 2005
    #5
  6. John@DHW

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    I don't know about other .net languages.

    I did notice that the VB.net executable seems to have a lot of threads running in it, which scares me. The DLL is NOT designed to be thread-safe!!

    As far as I can make out, all the .net languages *seem* to use a common back-end / run-time system.

    We use this driver regularly from Delphi and Borland C, with no problems. At one stage we ported it and had it compiled and running under MS Visual C (ver 6 I think). Again no problems. Only reason for re-compiling was a wacky issue with MS not accepting the Borland ".lib" file, and it was easier to re-compile than to work out how to shove the Borland file into the MS linker. Grr!

    If you have a single-threaded runtime system (like the odl fashioned boring languages seem to do) then you should be OK.

    Unfortunately, yours is the first problem to be reported!
     
    ashleigh, Jul 5, 2005
    #6
  7. John@DHW

    John@DHW

    Joined:
    Jul 4, 2005
    Messages:
    4
    Likes Received:
    0
    Considering the fact that the dll won't run directly in our .NET app ... I might try and build a socket based interface for the dll using vb6.

    Thanks again for your help. I'll advise this thread on progress.
     
    John@DHW, Jul 5, 2005
    #7
  8. John@DHW

    NickLocke

    Joined:
    Oct 27, 2004
    Messages:
    141
    Likes Received:
    0
    Any News

    Is there an update on this?

    I am about to start building some .NET stuff to talk to C-Bus (whcih I will be happy to share when done). Not sure whether to try talking to the DLL, or whether to just talk to C-Gate.

    Any thoughts?

    Nick
     
    NickLocke, Aug 23, 2006
    #8
  9. John@DHW

    NickLocke

    Joined:
    Oct 27, 2004
    Messages:
    141
    Likes Received:
    0
    Any News

    Is there an update on this?

    I am about to start building some .NET stuff to talk to C-Bus (whcih I will be happy to share when done). Not sure whether to try talking to the DLL, or whether to just talk to C-Gate.

    Any thoughts?

    Nick
     
    NickLocke, Aug 23, 2006
    #9
  10. John@DHW

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    No update, no change in the situation.
     
    ashleigh, Aug 24, 2006
    #10
  11. John@DHW

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    Has anybody, other than CIS folk, got this DLL to work?

    If so what language/compiler are you using.

    I have spent most of the day trying to get it to work and got the same results as others.

    Does anybody have this working with any microsoft language C++, C#, VB.net or anything else and care to share the secret to making this work.

    Cheers

    Rohan
     
    rhamer, Sep 20, 2006
    #11
  12. John@DHW

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    I use Borland C++ builder and have no trouble at all. I've built a few internal applications on it, fast, easy, lovely.

    We have linux users building applications they sell from the linux equivalent.

    Internal to CIS its re-targeted to many different processors and is used in a number of products.

    What it does not seem to play happily with are some of the newer M$ compilers and wierdo run-time systems that (for whatever bizarre reason) run lots of threads.

    It is NOT designed to be thread-safe, and never will.
     
    ashleigh, Sep 20, 2006
    #12
  13. John@DHW

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    I thought you were going to say that

    I have thousands of dollars worth of MS compilers in lots of languages accross 3 seperate versions and can't get it to work. Now I'm not interested in the MS, Borland argument, but either way there is a lot of MS users out there and I'm thinking that it is not really a general purpose windows DLL if it won't work with one of the most popular development environments on the market.

    Now I know it is unsupported and you worked hard to get it released in the first place and I appreciate the intent. But I'm just a bit disapointed that it looks like I have to either buy Borland or switch to Linux.

    At first I thought I found the problem in five minutes as the set level function definition and call was short one argument in the VB example, but unfortunately no dice. I also noticed that quite a few of the functions don't have a return value, so whilst I know it didn't work because no light came on, I don't know why.

    I realise that the code is essentially designed for imbedded micros and as such has no logging as such, but I'm wondering if you could somehow produce a modified one off debug version to help figure out what the issue is. Perhaps modify the set level function to return an int that represents why it failed. It looks like any of the functions that don't take parameters seem to work, but those that do fail (although there are exceptions to this rule as the comms functions appear to work)

    Yes I still remember it is unsupported, but getting it to work with MS compilers would surley be good for the whole of mankind, and if necessary I will start a collection to errect a statue in your honour in my front yard if that is what it takes.

    Any help would be appreciated.

    Cheers

    Rohan
     
    rhamer, Sep 20, 2006
    #13
  14. John@DHW

    daniel C-Busser Moderator

    Joined:
    Jul 26, 2004
    Messages:
    766
    Likes Received:
    20
    Location:
    Adelaide
    daniel, Sep 20, 2006
    #14
  15. John@DHW

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    It is worth noting that the no cost version (can't come to calling it free) can be used for commercial use.
     
    Richo, Sep 20, 2006
    #15
  16. John@DHW

    ashleigh Moderator

    Joined:
    Aug 4, 2004
    Messages:
    2,391
    Likes Received:
    24
    Location:
    Adelaide, South Australia
    Smells like parameter passing conventions are out of kilter.

    There are a lot of single byte parameters being passed around.

    Hmmm.

    Tisn't easy cos I don't have *any* M$ compilers here to lay me hands on.
     
    ashleigh, Sep 21, 2006
    #16
  17. John@DHW

    Josh

    Joined:
    Aug 25, 2004
    Messages:
    240
    Likes Received:
    0
    Location:
    Pretoria, South Africa
    Has anyone tested this? If so, does it do the trick?
     
    Josh, Sep 21, 2006
    #17
  18. John@DHW

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    We haven't tested the turbo product, but it is basically a later version of the Borland C++ tool that we do use with the DLL. So hopefully it does work :)
     
    Richo, Sep 21, 2006
    #18
  19. John@DHW

    rhamer

    Joined:
    Aug 3, 2004
    Messages:
    673
    Likes Received:
    3
    Location:
    Melbourne, Australia
    I know how you feel, in reverse.

    I'm at the point where I think I'll download the economically priced Turbo c# compiler Daniel & Richo pointed out and give that a go. (I remember paying over $300 for Turbo C++ V3.0 when it first came out)

    Of course I havent even seen a Borland IDE in many years, so it could take me ages just to understand my way around it.

    Anyway I am still keen to try and get to the bottom of the MS problem, have you had any thoughts about producing a debug version that I could help debug with? I know it will be a bit outside of normal company protocol, but it's only to figure out how to call this guy correctly.

    The statue could turn into a fountain as well.......

    Cheers

    Rohan
     
    rhamer, Sep 21, 2006
    #19
  20. John@DHW

    Richo

    Joined:
    Jul 26, 2004
    Messages:
    1,257
    Likes Received:
    0
    Location:
    Adelaide
    Chance are this will have the same result as the MS one as it uses the same compiler (the C# compiler built into dot net). Give the C++ edition a try.
     
    Richo, Sep 22, 2006
    #20
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.