0

I'm trying to use the Java Simple Serial Connector on Arch Linux. I have a simple program listed below:

import jssc._

object Main {
  def main(args:Array[String]):Unit = {
    println("Started")
    val portNames = SerialPortList.getPortNames
    portNames.foreach(println(_))
  }
}

If I run ls -la /dev/ttyACM0 I get the following:

crw-rw---- 1 root uucp 166, 0 May  5 18:41 /dev/ttyACM0

If I run groups ryan I get uucp ryan

If I run sbt run I get just the line Started

If I run sudo sbt run I get the following:

Started
/dev/ttyACM0

I've added my user ryan to the uucp group, which owns /dev/ttyACM0, the device I'm trying to communicate with. What else could be preventing my program from enumerating the device?

4
  • Did you log out and log back in (needed for group changes to take effect) ?
    – user186340
    May 5, 2014 at 23:05
  • ...nope, forgot to do that! If you repost as an answer I'll mark it. May 5, 2014 at 23:08
  • Did that actually fix it ?
    – user186340
    May 5, 2014 at 23:15
  • Yes, worked like a charm :) May 5, 2014 at 23:16

1 Answer 1

2

You forgot to log out and log back in after adding yourself to the uucp group, which is necessary for group changes to take effect.

Here's an article about permissions and groups on the Archlinux wiki, in case you need more info.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .