Ah, Pietro,

That worked. I added myself to the uucp group.

Am now happy. Am gonna try to send and receive messages with the USB
modem.

Thanks.
Simon.

On Nov 18, 12:48 am, Pietro <[email protected]> wrote:
> Do you remember when I told you to add yourself to uucp group?.
>
> I will try to explain your problem.
>
> You has no rights, but if you, as root user change the permissions to
> 666, then you can get access. This was what you did, and must to work
> while device is connected (theoricaly). The problem is that when you
> disconnect the device, its entry in the /dev directory is deleted too,
> that is: the device are created on the fly by the kernel. Next time
> when you connect the device again, a new entry is created, but its
> permissions are de default, then your 666 trick doesn't work. Of
> course you can do the trick as many times as you connect the device
> but you need to switch to root user and is very tired.
>
> The solutions are:
>
> 1) Switch as root user and run whatever you want because root has no
> restrictions. This is valid but insecure as nature. You convert linux
> in windows (yuck).
>
> 2) Switch as root user when device in connected and type the command:
>
> ls -l /dev/ttyUSB0
>
> and you must to get something like:
>
> crw-rw---- 1 root uucp 166, 0 2009-11-17 21:30 /dev/ttyUSB0
>
> that show to you in this case that root user and uucp group users has
> enough rights to read and write to /dev/ttyUSB0 device. That is the
> reason I told you to become uucp group member. You have Ubuntu and
> your group can be different, check it, become member, and problem
> solved forever.
>
> HTH
>
> Pietro
>
> On Nov 18, 1:15 am, Simon <[email protected]> wrote:
>
> > Hi guys,
> > Its funny. When I run
> > #ls - l /dev/ttyUSB0
>
> > I get
> > smuwa...@linux-simon:~> ls -| /dev/ttyUSB0
> > bash: /dev/ttyUSB0: Permission denied
> > ls: cannot access -: No such file or directory
> > smuwa...@linux-simon:~> ls -| /dev/ttyUSB1
> > ls: cannot access -: No such file or directory
>
> > bash: /dev/ttyUSB1: Permission denied
> > smuwa...@linux-simon:~>
> > smuwa...@linux-simon:~> ls -| /dev/ttyUSB2
> > ls: cannot access -: No such file or directory
>
> > It seems chmod 666 had no effect.
>
> > -----------------------------------------------------------------------------------
> > When I run the sms-lib application, I get this at the console,
>
> > java.lang.RuntimeException:
> >   Error opening "/dev/ttyUSB0"
> >   Permission denied
> >         at com.sun.comm.LinuxDriver.getCommPort(LinuxDriver.java:66)
> >         at javax.comm.CommPortIdentifier.open(CommPortIdentifier.java:369)
> >         at org.smslib.modem.SerialModemDriver.connectPort
> > (SerialModemDriver.java:64)
> >         at org.smslib.modem.AModemDriver.connect(AModemDriver.java:89)
> >         at org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:84)
> >         at org.smslib.Service.startService(Service.java:181)
> >         at org.fcitmuk.communication.sms.SMSServer.run(SMSServer.java:307)
> >         at java.lang.Thread.run(Thread.java:619)
>
> > Any help?
>
> > Simon.
> > On Nov 16, 3:01 pm, Simon <[email protected]> wrote:
>
> > > Thanks again. Theerrorseems to be gone.
> > > I added myself to the permissions by
> > > #chmod 666 /dev/ttyUSB0
>
> > > Those who might want details can 
> > > followhttp://www.linuxquestions.org/questions/slackware-14/devttyusb0-permi...
>
> > > Regards,
> > > Simon.
>
> > > On Oct 30, 1:08 pm, Pietro <[email protected]> wrote:
>
> > > > Well, we are getting some progress. The problem is in fact you don't
> > > > have permission to open the device. To solve that use the command:
>
> > > > ls - l /dev/ttyUSB0
>
> > > > in order to see what user and group has the rights to use it. My bet
> > > > is user will be root and group will be uucp and both must to have RW
> > > > rights.
> > > > add yourself in the uucp group and try again.
>
> > > > HTH
>
> > > > Pietro
>
> > > > On Oct 29, 10:38 am, Simon <[email protected]> wrote:
>
> > > > > Thanks Pietro, surprisingly the port is now recognised. I run # dmesg
> > > > > again today, and the port was seen.
>
> > > > > Here is the newerror.
> > > > > ----------------------------------------------------------------------------------------------------
> > > > >java.lang.RuntimeException:
> > > > >  Erroropening"/dev/ttyUSB0"
> > > > >   permission denied
> > > > >   at com.sun.comm.LinuxDriver.getCommPort(LinuxDriver.java:66)
> > > > > ----------------------------------------------------------------------------------------------------
>
> > > > > What should I do to have the port accessible? I wonder why am denied
> > > > > permission.
>
> > > > > Regards,
> > > > > Simon
> > > > > On Oct 28, 2:01 pm, Pietro <[email protected]> wrote:
>
> > > > > > Is weird dmesg do not report the port, check for errors. One way I
> > > > > > think is execute the command:
>
> > > > > > ls -l /dev/*|less
>
> > > > > > before connection and after connection, linux kernel create the port
> > > > > > on the fly after phone connection. You must locate what entry has 
> > > > > > been
> > > > > > added (a hard work). The other thing is to send the output of two
> > > > > > commands to a file and check differences with the diff comand.
>
> > > > > > HTH
>
> > > > > > On Oct 28, 3:12 pm, Simon <[email protected]> wrote:
>
> > > > > > > Thanks for this. Theerrorhas now changed.The selected port doesn't
> > > > > > > exist. My port wasdev/ttyUSB0. On running # dmesg, no port is 
> > > > > > > shown.
>
> > > > > > > How do I get the exact ports to fill in for serpath0
> > > > > > > = ......................
>
> > > > > > > Simon.
>
> > > > > > > On Oct 27, 8:52 pm, Elias <[email protected]> wrote:
>
> > > > > > > > I have the following configuration (using the Sun library). I 
> > > > > > > > have
> > > > > > > > moved to openSuSe 11.1, but if I remember well, the 
> > > > > > > > configuration was
> > > > > > > > the same in 10.3:
>
> > > > > > > >  libLinuxSerialParallel.so is located in 
> > > > > > > > /usr/lib/jvm/java/jre/lib/
> > > > > > > > i386
> > > > > > > >  comm.jar is in /usr/lib/jvm/java/jre/lib/ext
>
> > > > > > > > I am using a bluetooth phone, so I have the following in 
> > > > > > > > /usr/lib/jvm/
> > > > > > > > java/jre/lib/javax.comm.properties
> > > > > > > > You should adjust for your usb port.
>
> > > > > > > > serpath0 = /dev/rfcomm0
> > > > > > > > #serpath1 = /dev/ttyS1
>
> > > > > > > > On Oct 27, 12:13 pm, Pietro <[email protected]> wrote:
>
> > > > > > > > > I think the sun library (LinuxSerialParallel) must to be in 
> > > > > > > > > /usr/lib
> > > > > > > > > directory, that is the problem, if the problem persist, put 
> > > > > > > > > it in /lib
> > > > > > > > > directory.
>
> > > > > > > > > HTH
>
> > > > > > > > > On Oct 28, 2:51 am, Simon <[email protected]> wrote:
>
> > > > > > > > > > Am using a usb modem. Could it be missing device drivers?
>
> > > > > > > > > > Cheers,
> > > > > > > > > > Simon.
> > > > > > > > > > On Oct 26, 11:20 pm, Thanasis <[email protected]> wrote:
>
> > > > > > > > > > > You must be using JavaComm v3, right? This library works 
> > > > > > > > > > > on some
> > > > > > > > > > > distros and doesn't work on others, god knows why...
> > > > > > > > > > > Have you tried with RxTx?
>
> > > > > > > > > > > On Oct 26, 5:59 pm, Simon <[email protected]> wrote:
>
> > > > > > > > > > > > Hi, am using openSUSE 10.3 with smslib. I have followed 
> > > > > > > > > > > > the
> > > > > > > > > > > > installation steps closely, but don't know what I have 
> > > > > > > > > > > > left out.
> > > > > > > > > > > > Here is theerror.
> > > > > > > > > > > > ================================================================
>
> > > > > > > > > > > >Errorloading LinuxSerialParallel: 
> > > > > > > > > > > >java.lang.UnsatisfiedLinkError: no
> > > > > > > > > > > > LinuxSerialParallel in java.library.path
> > > > > > > > > > > > Exception in thread "Thread-8" 
> > > > > > > > > > > > java.lang.UnsatisfiedLinkError:
> > > > > > > > > > > > com.sun.comm.Unix.isDevLink(Ljava/lang/String;)Z
> > > > > > > > > > > >         at com.sun.comm.Unix.isDevLink(Native Method)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > com.sun.comm.PathBundle.add(PathBundle.java:108)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > com.sun.comm.PlatformPortBundle.<init>(PlatformPortBundle.java:44)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > javax.comm.CommPortIdentifier.<clinit>(CommPortIdentifier.java:
> > > > > > > > > > > > 138)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > org.smslib.modem.SerialModemDriver.connectPort
> > > > > > > > > > > > (SerialModemDriver.java:63)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > org.smslib.modem.AModemDriver.connect(AModemDriver.java:89)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:84)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > org.smslib.Service.startService(Service.java:181)
> > > > > > > > > > > >         at 
> > > > > > > > > > > > org.fcitmuk.communication.sms.SMSServer.run(SMSServer.java:307)
> > > > > > > > > > > >         at java.lang.Thread.run(Thread.java:619)
>
> > > > > > > > > > > > =======================================================
>
> > > > > > > > > > > > Will be glad to get help.
> > > > > > > > > > > > Simon.- Hide quoted text -
>
> > > > > > - Show quoted text -

--

You received this message because you are subscribed to the Google Groups 
"SMSLib for Java User Group" group.
To post to this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/smslib?hl=.


Reply via email to