Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Carolina Sarnevesht
    @csarnevesht
    work?
    jodersky
    @jodersky
    It's a plugin (declared in project/plugins.sbt), basically a library used by sbt itself
    The JniLoading plugin enables easy loading and packaging of native code code
    It's not relevant to what you're trying to achieve, but in case you're interested, you can take a look at the plugin implementation here
    Carolina Sarnevesht
    @csarnevesht
    ok, I moved my driver file outside
    and i ran 'sbt flow-core/publishLocal'
    this generated:
    [info] Packaging /Users/carolina/work/livongo/flow-serial/flow-core/target/scala-2.11/flow-core_2.11-2.5.0-SNAPSHOT-javadoc.jar ...
    [info] Done packaging.
    [info] published flow-core_2.11 to /Users/carolina/.ivy2/local/com.github.jodersky/flow-core_2.11/2.5.0-SNAPSHOT/poms/flow-core_2.11.pom
    [info] published flow-core_2.11 to /Users/carolina/.ivy2/local/com.github.jodersky/flow-core_2.11/2.5.0-SNAPSHOT/jars/flow-core_2.11.jar
    [info] published flow-core_2.11 to /Users/carolina/.ivy2/local/com.github.jodersky/flow-core_2.11/2.5.0-SNAPSHOT/srcs/flow-core_2.11-sources.jar
    [info] published flow-core_2.11 to /Users/carolina/.ivy2/local/com.github.jodersky/flow-core_2.11/2.5.0-SNAPSHOT/docs/flow-core_2.11-javadoc.jar
    [info] published ivy to /Users/carolina/.ivy2/local/com.github.jodersky/flow-core_2.11/2.5.0-SNAPSHOT/ivys/ivy.xml
    what should my libraryDepdency for flow-core look like?
    libraryDependencies += "com.github.jodersky" %% "flow-core" % "2.5.0-SNAPSHOT",
    or libraryDependencies += "com.github.jodersky" %% "flow-core" % "2.5.0-SNAPSHOT" % "runtime"
    ?
    i tried both and neither are working
    sbt.ResolveException: unresolved dependency: com.github.jodersky#flow-core;2.5.0-SNAPSHOT: not found
    Carolina Sarnevesht
    @csarnevesht
    or should it be: "com.github.jodersky" % "flow-core_2.11" % "2.5.0-SNAPSHOT" % "runtime",
    that seems to at least go through sbt without errors
    Carolina Sarnevesht
    @csarnevesht
    the jar is stored as follows:
    ./local/com.github.jodersky/flow-core_2.11/2.5.0-SNAPSHOT/jars/flow-core_2.11.jar
    Carolina Sarnevesht
    @csarnevesht
    I have added you as a github collaborator in https://github.com/csarnevesht/flow-serial
    is there any possibility you could make the changes there?
    Carolina Sarnevesht
    @csarnevesht
    actually, i somehow made it work... at least I can step through the driver code in the debugger
    Carolina Sarnevesht
    @csarnevesht
    it's hanging when reading from the serial port... but that's the easy part now!
    wow! i can't believe it's running!
    thanks again SO much!
    jodersky
    @jodersky
    Glad I could help!
    Regarding the dependencies, scala has adopted the convention to append a "_x" to the jar name to differentiate between binary scala versions
    binary scala versions are the first two decimals: 2.11.5, 2.11.6, 2.11.7 etc all have scala binary version 2.11 and 2.10.1, 2.10.2 etc are all 2.10
    When specifying a dependency in sbt, you can either use the single percent notation (%) which divides maven coordiantes into groupId, artifactId and versionId. Or, in case you're specifying a scala library, sbt provides the convenience double-percent notation (%%) that inserts the scala binary version for you, corresponding to the version your project uses
    jodersky
    @jodersky
    It just makes things easier, e.g. if you change the scala version of your project to 2.12.0 in the future, sbt will automatically depend on the package compiled for scala 2.12 as well
    Carolina Sarnevesht
    @csarnevesht
    you have been tremendous help, and so quick to respond. I am so appreciative of that! I have gotten something that works and I've been able to continue with my work!
    Have a wonderful day!
    Carolina Sarnevesht
    @csarnevesht
    Hi again! I have been experiencing issues with the serial port on a mac, and the developer of our device claims that this is an issue with the mac os serial driver.
    i'm not convinced but i have a windows laptop where i can run the same code.
    i've set it up with intellij and the project which has your SerialConnection code.
    however, i'm having issues with the NativeLoader code not finding the library for flow-native for Windows...
    is there one?
    or do I need to build it?
    would you kindly point me to instructions?
    i'm waiting for a Linux machine so soon I may just move to that... if there is no Windows support for flow-native.
    your help again would be so greatly appreciated!
    jodersky
    @jodersky
    HI
    flow's native library is written in C and uses only standard (POSIX) APIs. It can therefore be compiled for OSX, Linux and probably othe unices. Windows is not supported currently, however there was an attempt to get it working with Cygwin, yet that was not completed due to slight differences in the way libraries are loaded
    jodersky
    @jodersky
    The platforms that are supported out-of-the-box (i.e., that have libraries included in the flow-native jar from bintray) are listed on the download page http://www.jodersky.ch/flow/downloads/
    jodersky
    @jodersky
    There is an open issue (with tips on how to get started) to add windows support. Although I will not personally take up the issue (since I don't know much about the windows api), I would greatly appreciate contributions on the matter.
    Guillermo Lammers Corral
    @glammers1

    Hi,

    If somebody could give me a clue on this problem I'm facing, I will be very grateful.

    I am facing unexpected problems due to an exception while hanging-up the connection with a GSM modem.

    • The remote modem answer the call and establish the connection:

    -> ATD[number]
    <- CONNECT 9600/RLP

    • The calling modem doesn't hang with the message:

    -> +++
    <- OK

    -> ATH0

    java.io.IOException: 
        at com.github.jodersky.flow.internal.NativeSerial.readDirect(Native Method)
        at com.github.jodersky.flow.internal.SerialConnection$$anonfun$read$1.apply(SerialConnection.scala:75)
        at com.github.jodersky.flow.internal.SerialConnection$$anonfun$read$1.apply(SerialConnection.scala:75)
        at com.github.jodersky.flow.internal.SerialConnection.transfer(SerialConnection.scala:120)
        at com.github.jodersky.flow.internal.SerialConnection.read(SerialConnection.scala:77)
        at com.github.jodersky.flow.internal.Reader.readLoop(Reader.scala:14)
        at com.github.jodersky.flow.internal.Reader.run(Reader.scala:34)

    Thanks in advance.

    flow version 2.6.0

    btw:
    -> sent message
    <- received message
    jodersky
    @jodersky
    That's a peculiar error you're seeing. What message do you get when setting com.github.jodersky.flow.internal.SerialConnection.debug(true) beforehand?
    Does your modem change baud rate during a connection?
    Guillermo Lammers Corral
    @glammers1

    Thanks, Jacob. I did it, it shows the following message:

    error data not available after select: No such file or directory

    I think that I've found something similar in the flow.c file at line 232 https://github.com/jodersky/flow/blob/f791debe0c44f7bf420df37725e52b724c19660d/flow-native/src/platform/posix/flow.c#L232. For version 2.6.0 I've found here https://github.com/jodersky/flow/blob/v2.6.0/flow-native/src/platform/posix/flow.c#L218

    Any ideas? Thanks!

    Guillermo Lammers Corral
    @glammers1

    I don't change the baud rate during a connection. I'm using the following values but never change:

    val settings = SerialSettings(
            baud = 9600,
            characterSize = 8,
            twoStopBits = false,
            parity = Parity.None
        )

    I'm sending AT commands like ATE0, ATV1 and ATQ0 before the ATD command. That's all.

    Guillermo Lammers Corral
    @glammers1
    Ops, sorry for my mistake. I changed your name to Jacob and I couldn't edit :smile: