Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

J2ME socket connection

  • 08-03-2006 5:29pm
    #1
    Closed Accounts Posts: 86 ✭✭


    Hi all,
    I have written simple client/server applications - the client application in J2ME and the server application in J2SE.

    I have tested the J2ME code on an emulator and it worked fine - it could connect to the server and could send strings to the server.

    Now that I have downloaded the client application onto my mobile phone - a nokia 6020 - it is not longer able to connect to the server it gives me the following error

    "java.io.IOException: error occurred whilst opening connection"

    does anyone know what the problem might be with making this connection?

    any help would be really appreciated!

    Thanks,
    Emer


Comments

  • Closed Accounts Posts: 324 ✭✭madramor


    1:
    You could have a firewall on your server

    2:
    You could be using the computer name rather than the ip address


  • Closed Accounts Posts: 86 ✭✭emee


    Hi,
    Thanks for replying,

    I thought myself it might be the firewall the first time i tried to connect but after turning off the firewall it still wouldn't connect.

    I got the IP address by doing an ipconfig on my computer that should give me the right one shouldn't it?

    Any other ideas?

    Thanks,
    Emer


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    What are you using as a gateway between the phone and the server? If you're just going through your mobile provider, you're not going to be able to see a private range IP address.


  • Closed Accounts Posts: 86 ✭✭emee


    Hi Aidan,

    Ya i'm just using the mobile provider to access the server.... i didn't think there'd be a problem doing this :/

    any suggestions about how to get around this?

    Thanks,
    Emer


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    emee wrote:
    Hi Aidan,

    Ya i'm just using the mobile provider to access the server.... i didn't think there'd be a problem doing this :/

    any suggestions about how to get around this?

    Thanks,
    Emer
    See if the college (?) has access to a small, local mobile pone service box. This will let you set up a short range network that you can connect to as though you were connected to your regular provider. Put this on the same network as the server and you should be able to access it once you configure your phone properly.

    If they don't, see if you can get a static public IP address off your administrator that can map to a static private IP, which you will give to the server. Use this public IP to connect to the computer.

    Failing that, you might have to look into a public shell account that will let you run Java programs on their machines.


  • Advertisement
  • Closed Accounts Posts: 86 ✭✭emee


    crap i was hopin it'd just work by itself by some miracle :) thanks a million for your help i guess its back to the drawing board for me!


  • Registered Users, Registered Users 2 Posts: 211 ✭✭Surrender


    I'm running into the exact same issue as emee but I've configured my home wireless router to allow traffic through on a specified port.
    I'm using my public ip address (89.234.....) to connect to the PC as well.
    If anyone can help with this I'd really appreciate it as I'm sick to death of this.


  • Closed Accounts Posts: 1 MiguelBarcelo


    emee wrote: »
    Hi all,
    I have written simple client/server applications - the client application in J2ME and the server application in J2SE.

    I have tested the J2ME code on an emulator and it worked fine - it could connect to the server and could send strings to the server.

    Now that I have downloaded the client application onto my mobile phone - a nokia 6020 - it is not longer able to connect to the server it gives me the following error

    "java.io.IOException: error occurred whilst opening connection"

    does anyone know what the problem might be with making this connection?

    any help would be really appreciated!

    Thanks,
    Emer

    Hi emee.
    Sorry, I need your help in simple client (J2ME)/server(J2SE) applications.
    Do I should use Sockets? I need you to show me the way.
    Thank you very much.


  • Registered Users, Registered Users 2 Posts: 40,038 ✭✭✭✭Sparks


    Hi emee.
    Sorry, I need your help in simple client (J2ME)/server(J2SE) applications.
    Do I should use Sockets? I need you to show me the way.
    Thank you very much.
    From the forum charter:
    Homework and how to ask a question.
    RIGHT YOU 'ORRIBLE LOT!!!!

    If you are a learning to code in college, in your first job or just out of interest here are the rules for beginners when asking questions:
    Try and give a good description of your problem in the thread title.
    Post a sample of your code no matter how poor you may think it is. It shows an effort on your behalf and that's really important
    Try and explain your attempt in the previous point
    Now ask any questions you may have
    If there are any errror codes, messages, or a stack trace then post that too. I might look like gobbledegook to you but it contains everything you need to know to solve your problem.

    Follow these rules everywhere, here, on other forums, in work, in college and anywhere else you can ask a question. A willingness to learn to very important in development and nobody will fault you for asking a question as long as you've made a prior effort.

    You should also learn how to search the web. It's an acquired skill. If you repeatedly fail to come with a solution when searching well you should probably document your own efforts for the next person along, you young groundbreaker you!

    Follow the three rules here and we'll get along fine. Repeat offenders will be banned. Anyone who laughs and points, sneers or generally gets sniffy at a poster following these rules will be banned for sure.

    All is well, consume.

    Also, this thread ended two years ago...


This discussion has been closed.
Advertisement