Menu

J2Mod - Couple of Dependency items

Eti
2016-09-27
2016-09-29
  • Eti

    Eti - 2016-09-27

    Hello folks,
    Am building a Raspberry Pi solution and am implementing with your Modbus driver. Ran into a couple of things I thought I would mention. After referencing your project using Maven in Intellij
    <dependency>
    <groupId>com.ghgande</groupId>
    <artifactId>j2mod</artifactId>
    <version>2.3.0</version>
    </dependency>
    and deploying it on the Pi, I got some a library could not be loaded error .
    This problem seemed to correlate with this reference...
    http://stackoverflow.com/questions/7421612/slf4j-failed-to-load-class-org-slf4j-impl-staticloggerbinder
    After including the 1.7.5 versions of the org.slf4j my problems changed.

    Then when starting I got...
    log4j:WARN No appenders could be found for logger (com.ghgande.j2mod.modbus.io.ModbusSerialTransport).
    This may be related to the fact that I am also using Log4j in the host project....

    Hopefully this is useful, and it would be great if you can give me some feedback on this.
    Thanks
    Eti

     
  • Eti

    Eti - 2016-09-29

    To fellow users of this driver, there is a non-intuitive "gotcha" with respect to the stop bits. If you set the integer value for the stopbits on the SerialParameters object, it will be mapped to a an enumeration with:
    1 = 1 stopbit
    2 = 1.5 stopbits
    3 = 2 stopbits

    Thus, if you think you are getting 2 stop bits, you will actually be getting 1.5.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.