Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi..Im a Beginner in linux....Im using SUSE.... For my java Program.i give the input port name in windows..as COM1 But Linux does not Support.. In linux displayLike /dev/ttsy0,ttsy1..I give "/dev/ttsy0" ...
  1. #1
    Just Joined!
    Join Date
    May 2009
    Posts
    8

    Question Portname.

    Hi..Im a Beginner in linux....Im using SUSE....

    For my java Program.i give the input port name in windows..as COM1

    But Linux does not Support..
    In linux displayLike /dev/ttsy0,ttsy1..I give "/dev/ttsy0" its not working...

    How to give the portname in linux.

    Give the solution...

    Thanks in advance

    Sorry for my Bad English

  2. #2
    Linux User
    Join Date
    Jun 2007
    Posts
    458
    Try:

    Code:
    ls /dev
    to find the list of available device nodes. Choose one you find most suitable.
    "When you have nothing to say, say nothing."

  3. #3
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,099
    Quote Originally Posted by mailtogsureshkumar View Post
    For my java Program.i give the input port name in windows..as COM1

    But Linux does not Support..
    In linux displayLike /dev/ttsy0,ttsy1..I give "/dev/ttsy0" its not working...
    Welcome to the forums!

    Sorry, but it's against the Forum Rules to post duplicate threads so all of yours have been deleted.

    Please feel free to continue any discussion in this thread.

    Thanks!
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  4. #4
    Linux Guru
    Join Date
    Jan 2009
    Location
    Dover, NH
    Posts
    1,633
    actually, "COM1" is /dev/ttyS0 in Linux land, that's TTY (lower case) for text terminal, S (upper case) for serial port, and 0 (zero) to say first port.

    The thing with Linux is permissions. In many distros, including SuSE, users do not have access to the physical ports by default, they must be given permission to access them. This is just as easy as seeing what group the port devices belong to and adding the user to that group, e.g. in SuSE, to access the serial ports, a user must be a member of the group uucp.

    Code:
    dcat@Server:/dev> ls -l ttyS*
    crw-rw---- 1 root uucp 4, 64 2009-05-19 18:10 ttyS0
    crw-rw---- 1 root uucp 4, 65 2009-04-14 06:16 ttyS1
    crw-rw---- 1 root uucp 4, 66 2009-04-14 06:16 ttyS2
    crw-rw---- 1 root uucp 4, 67 2009-04-14 06:16 ttyS3
    crw-rw---- 1 root uucp 4, 68 2009-04-14 06:16 ttyS4
    crw-rw---- 1 root uucp 4, 69 2009-04-14 06:16 ttyS5
    crw-rw---- 1 root uucp 4, 70 2009-04-14 06:16 ttyS6
    crw-rw---- 1 root uucp 4, 71 2009-04-14 06:16 ttyS7
    dcat@Server:/dev>

  5. #5
    Just Joined!
    Join Date
    May 2009
    Posts
    8

    Thumbs up Thanks

    Hi Thanks for ur Reply..its useful to me....

  6. #6
    Just Joined!
    Join Date
    May 2009
    Posts
    8

    Question Port Open Error

    Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException:
    Error opening "/dev/ttyS1"
    tcgetattr(): Input/output error

    ---
    when i run a java code for port demo..the above following error arrised..what i do...

    I give the permission to the ports, UUCP group also but its not working....

    Reply.......

  7. #7
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Do you have 2 serial ports? /dev/ttyS1 is the second port the first port would be /dev/ttyS0. In Windows the first port is com1.

  8. #8
    Just Joined!
    Join Date
    May 2009
    Posts
    8

    Question Port Open Error

    Thanks....gogalthorp
    For ur Reply....

    In windows java coding run successfully.. portname COM1,COM2

    Now i try that in Linux (SUSE)...

    change the Portname as ttyS0,ttyS1...both the ports .....(/dev/ttyS0,/dev/ttyS1)
    I put the related JARs,i give the permission but also....

    can't open.....the above error arrives....What i do?......

    some times this error also arrise

    ///////////////
    Exception in thread "AWT-EventQueue-0" java.io.IOException: Not all params are supported by kernel
    ///////////
    thanks in advance

  9. #9
    Just Joined!
    Join Date
    May 2009
    Posts
    8

    Angry Java heap space

    Hi Friends...........
    -----------------
    java.lang.OutOfMemoryError: Java heap space
    java.io.ByteArrayOutputStream.<init>(ByteArrayOutp utStream.java:59)
    org.apache.commons.fileupload.DeferredFileOutputSt ream.<init>(DeferredFileOutputStream.java:131)
    org.apache.commons.fileupload.DefaultFileItem.getO utputStream(DefaultFileItem.java:55
    org.apache.commons.fileupload.FileUploadBase.parse Request(FileUploadBase.java:406)
    org.apache.struts.upload.CommonsMultipartRequestHa ndler.handleRequest(CommonsMultipartRequestHandler .java:233)
    org.apache.struts.util.RequestUtils.populate(Reque stUtils.java:1209)
    org.apache.struts.action.RequestProcessor.processP opulate(RequestProcessor.java:821)
    org.apache.struts.action.RequestProcessor.process( RequestProcessor.java:254)
    org.apache.struts.action.ActionServlet.process(Act ionServlet.java:1482)
    org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:709)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:802)
    -----------------
    1. im using both Linux Open SUSE, Windows
    2. How to increase Heap size or Solution for above error

  10. #10
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    You should always Google first

    Setting Heap Sizes

    note that it may be you have a programming error that is causing the memory exhaustion. 1) too many threads started but not ended 2) a recursing function that is not terminating in a reasonable amount of cycles.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...