Embedded Linux >> Access serialport on Linux(Debian)/Java

by Ny Het » Thu, 07 Oct 2004 16:49:42 GMT

Hi, possibly of topic.

Im trying to access a GSM device via serial cable on a Linux(Debian). The goal
is to move the application to a VIA Eden or equally equiped device.

I have a java application i want to access the gsm device on the serial port,
this is no problem running the application as root (actually thet is the
problem). But i wish to run the application as another user.

The user is currently member of uucp.

Thanks in advance.
N.


Embedded Linux >> Access serialport on Linux(Debian)/Java

by Neil Cherry » Thu, 07 Oct 2004 21:26:01 GMT





Is the port a member of uucp and are the permission for the group
correct on the port?

--
Linux Home Automation Neil Cherry XXXX@XXXXX.COM
http://home.comcast.net/ ~ncherry/ (Text only)
http://hcs.sourceforge.net/ (HCS II)
http://linuxha.blogspot.com/ My HA Blog



Embedded Linux >> Access serialport on Linux(Debian)/Java

by Anthony Marchini » Thu, 07 Oct 2004 22:07:55 GMT



Are you using the Java driver from Sun?
T.



Access serialport on Linux(Debian)/Java

by Ny Het » Thu, 07 Oct 2004 22:38:01 GMT




Im probably on the "green" side here...

>running as root:
java ReadMessage
javax.comm.CommPortIdentifier@4f1d0d is /dev/ttyS0, serial port
javax.comm.CommPortIdentifier@1fc4bec is /dev/ttyS1, serial port
javax.comm.CommPortIdentifier@dc8569 is /dev/lp0, parallel port

>ls -al /dev/ttyS0
crw-rw-rw- 1 root dialout 4, 64 2004-10-07 15:03 /dev/ttyS0

from /etc/group
uucp:x:10:uucp,nyhet
dialout:x:20:nyhet,uucp

su uucp -- making a file in the /var/lock directory is no problem.

my asupton would be that I as nyhet would be able to access /dev/ttyS0 as member
of dialout and to lockit as member of uucp.

Hanks so far..N


Access serialport on Linux(Debian)/Java

by Ny Het » Thu, 07 Oct 2004 22:39:49 GMT


Similar Threads

1. Is that a java problem?my matlab in Debian,Linux

I tried both matlab6.5 and matlab7.0. But Neither succeed in changing
directory in OPEN menu. The mouse click failed,the tab+enter chosen
either. This is a big problem for me,because I have to use function
uigetfile,which pop out such a "open" menu.
I thought it might caused by matlab java environment.But i don't know
how to fixed. Anyone help me? Thanks very much

2. [News] Free (Libre) Java Lands in Debian GNU/Linux - Linux

3. Problem accessing Serialport

Hi,

Im trying to access a GSM modem via the serial port using  1.4.2_05 on under 
Debian Linux.  I have installed RXTX and are member of goup uupc.
(im not sure if this is a java configuration issue, or relates to debian security.

The application works if I run it as root. However I would like to avoid that.

Thanks in advance.

4. Access to Debian Linux/Sparc needed

5. Debian linux usb memory stick access Q

I am a newbie.  I have learned to set the date and time.  I can mount
and umount the floppy drive.  I am working my way through a linux manual 
trying to learn it.  I am only in terminal-text mode.  Graphics are way
too slow.

How do I open a file on the usb memory stick with the editor, if i can,
or get data on or off the usb memory stick. 

I plugged in a usb memory stick into a thinkpad 285 laptop running
Deiban (stable) linux.  My screen produced these comments:

user1@localhost:$ (the prompt)

USBB 1-1.1 new full speed usb device
using uhci_hcd and address 11
usb 1-1.1 configuration #1 chosen from choice scsi3: SCSI emulation for
USB mass storage devices
Vendor USB2.0 model Mobile Disk
Rev: 1.00
Type direct-access ANSI SCSI revision : 02
sda Write Protect Off
sda assuming driver cach3: write through
SCSI device sda: 4030463 512 bytes hdwr Sectors (2064MB)
sda : Write Protect off
sda : sda1
sd 3:0:0:0:  attached SCSI
removble disk sda

I have a subdirectory srv but somebody said this device should be sr0.

help/comments appreciated.

6. java/116841: cannot build java/jdk16 by using java/linux-sun-jdk16

7. java.lang.OutOfMemoryError in java while executing java rmi program in linux

Hi,

I am using RMI in my program.
Previously, I was using 2 machines, RMI server in Windows and Client
in Linux.It was working fine.
But now, I am using 2 machines, both RMI server and client on linux.


the following are my method names in DBManager class.
        at DBManager.AddInsertURLQuery(DBManager.java:1340)
        at DBManager.processAddURLCrawlerQueue(DBManager.java :855)
        at DBManager.run(DBManager.java:1510)

But I am getting the following error.

Exception in thread "RMI TCP Connection(idle)"
java.lang.OutOfMemoryError: Java heap space
        at
sun.rmi.transport.StreamRemoteCall.getInputStream(StreamRemoteCall.java:
115)
Java HotSpot(TM) Client VM warning: Exception
java.lang.OutOfMemoryError occurred dispatching signal SIGINT to
handler- the VM may need to be forcibly terminated
Exception in thread "Thread-4" java.lang.OutOfMemoryError: Java heap
space
Exception in thread "Thread-3" java.lang.OutOfMemoryError: Java heap
space
        at com.mysql.jdbc.Connection.createStatement (Connection.java:
3096)
        at com.mysql.jdbc.Connection.createStatement(Connection.java:
3076)
        at DBManager.AddInsertURLQuery(DBManager.java:1340)
        at DBManager.processAddURLCrawlerQueue(DBManager.java :855)
        at DBManager.run(DBManager.java:1510)
        at java.lang.Thread.run(Thread.java:619)
Exception in thread "Thread-6" java.lang.OutOfMemoryError: Java heap
space
Exception in thread "RMI TCP Connection(idle)" Exception in thread
"Thread-5" java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
        at java.io.BufferedInputStream.<init>(BufferedInputStream.java:
178)
        at
java.io.BufferedInputStream.<init>( BufferedInputStream.java:158)
        at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run0(TCPTransport.java:679)
        at sun.rmi.transport.tcp.TCPTransport
$ConnectionHandler.run(TCPTransport.java:649)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:885)
        at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run (Thread.java:619)

Please post your suggestions on this.

Thanks,
Mugil.

8. Serialport termios & timeout