×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    353

    Using existing WLAN connection to PC for sending/receiving data

    If I have already made a adhoc connection from a WLAN enabled phone to a laptop/PC can I use that connection from J2ME to send and receive text or binary data to the PC?
    Is it possible in J2ME using socket connection or some other level of abstraction? If not which runtime would support this kind of access on a mobile?

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Using existing WLAN connection to PC for sending/receiving data

    You should be able to, using an HttpConnection or SocketConnection. You just need to know the IP address of the PC, and have some software running there to accept the connection.

    Graham.

  3. #3
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    353

    Re: Using existing WLAN connection to PC for sending/receiving data

    Quote Originally Posted by grahamhughes View Post
    You should be able to, using an HttpConnection or SocketConnection. You just need to know the IP address of the PC, and have some software running there to accept the connection.

    Graham.
    Thanks will try it out and update this page with results!

  4. #4
    Regular Contributor
    Join Date
    Sep 2009
    Posts
    353

    Re: Using existing WLAN connection to PC for sending/receiving data

    Quote Originally Posted by KevinBoyd View Post
    Thanks will try it out and update this page with results!
    Well! the results are that I could finally communicate with a underlying WLAN connection between a mobile phone a laptop.
    The connection was an AD-HOC connection, I will try with multiple connections later.

    The issues are that:

    1. I have to set up the WLAN connection at start up from the phone's connectivity option menu and after the connection is done I can then use this as a pipeline to send and receive data.
    2. Is there anyway I can do this with code.
    3. Can I check if the remote client has disconnected or the connection has closed or chech the wlan signal status?

  5. #5
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: Using existing WLAN connection to PC for sending/receiving data

    Strictly, the answer to all your questions is: no.

    Depending on device, you may be able (manually) to configure a WLAN access point as the default for that application.

    On Series 60 3rd Edition FP2 and later, you can find the currently active connection type by:

    Code:
    String connectionType = System.getProperty("com.nokia.network.access");
    This should return "wlan" if a WiFi connection is active for that application. Check the Nokia Java Developer's Library for other values (downloadable from the Documentation section of this forum).

    The only way to see if the connection actually works is to try it, and see if it fails. I don't think you can check WiFi signal level.

    Hope that helps. Probably not much.

    Graham.

  6. #6
    Regular Contributor
    Join Date
    Nov 2009
    Posts
    53

    Re: Using existing WLAN connection to PC for sending/receiving data

    For other devices you will get an exception when you try to access the WLAN which is not active. Catch that exception and handle it.

Similar Threads

  1. USB Connection transfer data from phone to pc
    By koukouJ2ME in forum Mobile Java General
    Replies: 5
    Last Post: 2011-10-05, 06:26
  2. Sending PIM data over Http Connection
    By Patois in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2010-07-08, 15:14
  3. VoIP and wi-fi power-save mode
    By ng1234 in forum VoIP
    Replies: 6
    Last Post: 2009-07-06, 13:05
  4. USB Connection transfer data from phone to pc
    By koukouJ2ME in forum General Development Questions
    Replies: 2
    Last Post: 2009-04-22, 06:37
  5. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00

Posting Permissions

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