direct tcp socket connection over wifi

Hi people,

I am trying to establish a direct connection over wifi with the last 4.7.0 JDE, Simulator tests (9530) and my bb Bold. I am trying to connect with a code similar to the following:

import javax.microedition.io.Connector;import javax.microedition.io.StreamConnection;

String URL = "socket://192.168.1.88:31339;interface=wifi;deviceside=true";

connection = (StreamConnection)Connector.open(URL);

But I'm not having any luck. I have that (to reading the documentation) this interface addition = wifi & deviceside = true for the connection string was all it takes. Am I missing something obvious here?

I presume that you have reviewed the video of transport network:

http://www.BlackBerry.com/DevMediaLibrary/view.do?name=NetworkingTransports

You'll find that a number of WiFi on the threads on this forum, which contain interesting information.  I suggest that consult you these.  There are others, but I think that your questions are answered in these.

http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&message.ID=16000

http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&thread.ID=898

Tags: BlackBerry Developers

Similar Questions

  • TCP Socket connection outbound monitor reading 1

    Hey people, does anyone know if or not the Agent HQ followed a TCP Socket has its own connection as a metric? I am tracking not a port of the remote database. When the first set of data was posted hyperic has reported that there is an outgoing connection.  I tried d@#$ about everything trying to figure out what might be this connection. Before you go further and lose more sleep is - anyone know if Hyperic reports its own ping as a connection?

    Either way, I did check netstat -, lsof and various records / proc and impossible to find a process bound to that port. Unfortunately I can't use a sniffer of packets due to limitations in the solaris containers.

    Thank you

    Deeboh

    Hi Deeboh,

    I think you're right, the connection you see is the verification of socket raw is the agent for the port of database.  Given that the life expectancy of this link is so short you probably won't see it netstat or/proc.

    -Ryan

  • Skype cannot connect over 3g but connects over wifi

    I recently had problems on my galaxy tab 2 every time I want to log in to Skype on 3 g network. It never connects, but it works well when am on wifi network. AV checked all the limitations of parameters and the data, but nothing seems to work. Someone has an idea?

    I have found 2 alternative. I downloaded hotspot protect the phone and every time I want 2 connect on Skype on mobile data network 3 g, I launch the hotspot to protect first and make sure that it is connected, so my ip address will change before my Skype is able 2 connect.
    Yes it works that way at the moment and I don't see any harm using d hotspot shield.

  • Direct TCP - Tunnel connection failure

    Yes, I already read a lot of discussions with the same problem, but unfortunally, I can't solve my problem.

    I tried all this URL

    String url = 'socket://url.com:80; deviceside = true; »

    String url = "socket://url.com:80; deviceside = true; NPA = apnumt.movistar.com.uy.

    and the last one also with "TunnelAuthUserName = movistar; TunnelAuthPassword = movistar.

    String url = 'socket://url.com:21; deviceside = true; »

    String url = 'socket://url.com:4444; deviceside = true; »

    Con StreamConnection = Connector.open (url) (StreamConnection);

    or

    String url = "http://url.com;deviceside=true;"

    String url = "http://url.com;deviceside=true;apn=apnumt.movistar.com.uy".

    and the last one also with "TunnelAuthUserName = movistar; TunnelAuthPassword = movistar.

    HttpConnection con = Connector.open (url) (HttpConnection)

    Yes, I also re-branded the apn, user & password in the options of my camera and I removed also.

    Yes, I hava a data plan and my browser work properly.

    I've always had "Tunnel fail."

    Yes, I hate blackberry.  :/

    EDIT: This can be a problem of my data plan?

    mmm...

    ConnectionFactory cf = new ConnectionFactory();
    ConnectionDescriptor cd = cf.getConnection("http://blackberry.com");
    final String url = cd.getURL();
    HttpConnection con = cd.getConnection();
    UiApplication.getUiApplication.invokeLater(new Runnable(){
              public void run(){
                     Dialog.alert(url);
              }
    });
    

    And printed to the console:

    http://blackberry.com;deviceside=true;ConnectionUID=WAP2 trans2
    

    So, this has been fixed, my browser use wap too.

  • Conntecting to webservice using wifi and direct tcp

    Hello

    I am trying to connect to a Web service using ksoap2. How can I connect using wifi and direct tcp? I am able to open a socket connection, but problems using wifi. Any ideas?

    Thank you!

    Kind regards

    M.

    You have the wifi interface parameter in your URL?

    See this knowledge base article:

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

  • Connection Wi - Fi, direct tcp/ip with the internal IP address

    Hi all

    I hope that someone has been able to do successfully before and knows the answer we've been beating our heads for days on it.  We have read the publication on the wireless Internet, as well as the other threads and tried various implementations without success.

    We strive to open a tcp /ip via the wifi connection to an internal ip address. for example. 192.168.1.99. inevitably the tunnel connection times out.  We tried interface = wifi, deviceside settings, and a combination of two of them.  Of course, they work the Simulator because the Simulator uses the connection IP has the development machine but when we try on a device, the connection times out.

    No one knows the correct way to work to open a connection directly from a particular device;

    (1) the parameters of the call real connector

    (2) settings on the phone. for example, "BOLD" to ensure that it can access the network internal

    Thank you very much

    Resolved - found the problem.  If you put a semicolon at the end of the list of parameters in the url such as:

    "socket://192.168.1.99:3000; interface = wifi; ConnectionTimeout = 15000; »

    This will not return an error or an exception of the Simulator or device but do not do what you expect.  It uses no wifi.  Blackberry setting in this Analyzer does not take into account all the parameters and tries to open the socket with no parameters and thus do not.

    This can be particularly troublesome if you add the parameters programmatically.  There should be an exception that is thrown as invalid or another parameter list, but there isn't.

  • Settings of the AFN for a direct TCP (3G v.s. GPRS) connection

    Today, I read a lot of articles about the transportation options for the Blackberry network.

    I installed the Tool of Network Diagnostics on my device (BlackBerry 9300 v5.0).

    I'm Tournai on "Mobile network" and disabled the "WiFi". Therefore, my device must use the direct TCP (HTTP protocol) only.

    According to this article, for a cell TCP connection, we need to set up the APN settings, otherwise we will have 'Tunnel failed' error

    http://docs.BlackBerry.com/en/developers/deliverables/21128/Network_transport_options_1293321_11.jsp

    However, without specifying the AFN, I was still able to have labour Direct TCP (HTTP).

    I'm in New Zealand, I tested the Network Diagnostic tool with 2 dgree and vodafone sim cards. Two of them work properly. Two of them are 3 G networks

    However, a lot of people on the internet saying that if they do not specify the APN for GPRS or EDGE networks, they would get the error "failure of Tunnel.

    So, I had the impression that with 3G networks, don't need us to specify the APN.

    I don't know if that's okay?

    One of the really annoying things on the treatment on the Blackberry network is its inconsistency.  I think you've hit one of them.  I saw this in the past with Vodafone, I wasn't sure that this has happened with other networks but maybe so.

    The inconsistency is the following.

    If your connection URL looks like

    http://...; deviceside = true

    If you think that this will force the connection to use the carrier TCP aka Direct TCP.  However, on some phones of brands, including Vodafone, is not correct.  On these phones a connection as it goes actually on WAP.

    To force the direct TCP, you must follow the instructions in this post:

    http://supportforums.BlackBerry.com/T5/Java-development/Vodafone-UK-direct-TCP/m-p/463081#M92387

  • TCP/udp connection via the private wifi network

    I want to develop applications using the wireless private network with tcp/udp connection for my Blackberry 8320 (Version 4.2.2.180 without SIM), do I need authorisation from RIM so that they work in the unit? If it is true, how can I get permission?

    I noticed http://www.blackberryforums.com/wifi-hotzone/100800-8320-wi-fi-limited.html

    who says:

    "The Blackberry 8320 with wi - fi connection is limited. The only program that can use the wi - fi is the Blackberry browser... all the third-party programs... ie. Opera Mini, JiveTalk and even RIM's instant messaging programs. Yahoo Messenger, Windows Live Messenger, are all designed to connect using data from EDGE of the phone... None of them can detect or use the wi - fi! »

    If it is true now?

    You can use the interface = wifi parameter in the URL to specify that the connection should be performed by Wi - Fi.  However, please note that this setting is available in version 4.5.0 and highest BlackBerry device software.  Therefore, you must first put your BlackBerry handheld.  FURTER details can be found here:

    What - in different ways to establish an HTTP connection or socket
    Article number: DB-00396

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

  • No Socket connection avaialbel

    Hello

    I met a strange on a BB (8820 OS 4.5 AT & T) behaviour when I tried to open the socket connection:

    I disconnected the WIFI device and then tried to open the socket of my application in several ways but non of them works even if I managed to browse the internet (GPRS is shown on main Ribbon of BB).

    I tried to use the following suffixes:

    (1); deviceside = false (for BES connection type)

    (2); deviceside = true (for direct TCP connection type)

    (3); deviceside = true; interface = Wi - Fi (for direct TCP connection with WLAN type)

    I checked the correct APN settings (same as written in 3 different sites) on the BB, but I keep getting error messages such as: timeout 120 sec, invalid tunnel name. When WIFI is connected to the socket is opened successfully and works, but without it, nothing happens.

    Another test I did, I read the link: http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

    and tried to add the UID WAP2, I found in the device but I still have the connection timeout.

    Is there a way I can connect without WIFI in such situation?

    I discovered that I used the WAP2 incorrectly so that there was a valid WAP2 entry in full book

    I used it incorrectly and causing the failure of the connections.

  • Connection stuck when connecting over BES/MDS

    I have an application called customer MC (later called 'client') who uses a socket connection to communicate with a server, the controller of Mobile (later called "controller").
    The connection is used to exchange information of signaling for control of calls, instant messaging and presence information and uses the SIP protocol.
    There are two ways how I can connect the Client to the controller:
    -Direct TCP (with a configured APN)
    -WIFI
    BES/MDS

    While the first two modes operate smooth we are facing problems with the connection on the SDM service method.

    The client uses the deviceside = false parameter to initialize the socket via the MDS Server connection.
    We did several tracks on the controller and the client and have the impression that the TCP stream is somehow blocked on the BES between the customer and the controller.

    Following things that we discover that day:
    -The TCP connection negotiation works very quickly. Handshake ACK SYN, SYNACK, is always quick.
    -The data channel itself seems to block / latency of data.
    Initially the application did not send data in decision-making, that data was sent to the origin of the side front controller. I worked around this by sending a single packet of data to the stream with data fictitious "\r\n" on the controller to the client directly after the establishment of the connection.
    In this way a steam machine is usable by the customer immediately, but after two messages flow seems to block again.

    I use Windows Server 2007 SP2 64-bit with a BlackBerry® Enterprise Server Express version and an SDM connection BlackBerry Service: 5.0.1.39

    Description of the scenario:
    [13:40:21.737] Client send data first Packet 'REGISTER'
    -Package is received the controller and responded with "401 Unauthorized" immediately after 15.8 msec (see trace packet)
    [13:40:25.619] Client receives the '401 Unauthorized '.
    -Package comes a little late, but still in time (after 3.8 seconds)
    [13:40:26.054] Client sends the REGISTRY with the authorization response
    -the second package never reaches the controller, the connection has expired

    The Server BES itself seems to be functional, since other applications like e-mail or the SSH of Rove client seem to work well.

    -Is it possible to influence the BES server how packages for a socket MDS connection are transferred? Is there a good way to solve the problems on the BES Server?
    I look in the newspapers, the more information I can find a connection is opened and closed again.

    Any tips?

    I finally found a solution for this.

    We have modified the client application to do a function flush() after writing in the stream object.

    Looks like there is a mayor unlike the behavior of the object of the steam of a plug.

    With direct TCP and WIFI all data are send immediately, whereas with the MDS connection all gots queued for the seconds until a flush() function is made.

    So remember: when using the socket via MDS connection allways drain when using the communication of critical data in time.

  • Connect via WiFi

    Hello

    I know that it was discussed during a lot of messages, but I couldn't find an exact answer:

    If I use a direct TCP connection and the device works with WiFi I might still add "interface = wif.

    or the operating system will automatically use WiFi?

    I know how it works for BES, but it the same work over direct TCP?

    Thank you.

    No, at least not in any OS prior to 5.0 (5.0 has some interesting options in this area).

    So if your choice is WiFi or direct TCP, you'll have to first consult WiFi and return to direct TCP if the WiFi does not exist or does not work.  The system do it for you.

    However, be aware that, in order for a BES connection it will automatically use the WiFi, it must be able to get a WiFi connection secure to your BES.  So if you are on a public WiFi hot spot and NOT VPN'ed in to your corporate network, you will get free WiFi.  However, in this case, if you tried to force the WiFi, you will get the problem called "split-pipe".  Look for more information on hit-pipe if there is a potential problem for you.

  • Direct TCP APN question

    Hello

    I recently created a blackberry application that consumes a web service using TCP direct to help our carrier APN. I discovered the AFN in this site: http://forums.pinstack.com/f24/tcp_apn_wap_gateway_and_port_carrier_settings-360/

    However when I asked our tech support carrier, it does not seem to be aware of such a CAMERA. So I'm just confused as to who provides this APN. Is RIM who welcomes direct TCP APN as they do with BIS? And it seems to be free because I was inapplicable to such a service before using it. Hope someone can enlighten me on that.

    Thank you
    Sally

    In my view, a number of carriers don't support direct TCP.  See for example:

    http://supportforums.BlackBerry.com/Rim/Board/message?board.ID=java_dev&view=by_date_ascending&Messa...

    Some of them also carry all traffic in France through this gateway is the traffic of a browser and they apply to their optimization to the source engine to reduce the data sent over the network.  It will screw you up if you wanted really want has been sent.

    If you are WAP and TCP, I think you're going to cover the majority of cases.  This will tell you how to do WAP 2, without any intervention of the user:

    What - in different ways to establish an HTTP connection or socket
    Article number: DB-00396
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

  • 15 t: new laptop HP 15 t do not connect or stay connected to Wifi

    I got my new laptop for about three weeks and everything worked perfectly on it. I downloaded 1/20th of what I had on my old HP laptop. All of a sudden, we arrived at the cottage a day and my laptop wouldn't stay is no longer connected to wifi. I turned my laptop on / off power several times and nothing is fixing the issue. Thinking it was the wifi connection, I deleted it only to have it not even be able to connect in this respect more. This laptop is brand new and I'd hate to send it back because I am me such a lot on it and everything I wanted came with this laptop.

    If I can't find the solution, I'll be forced to send it back and get a different brand.

    Is there someone who is having the same problems as me?

    Thank you

    Jill

    Hello @Jillybean124,

    Welcome to the HP Forums! I read your post that your laptop HP 15 t is having a wireless connection issues and I wanted to join you.

    Here is a list of steps that solve common problems with wireless connectivity.

    First of all, we have a step by step guide to guide you through the process of diagnosis here:
    Troubleshooting your wireless network and Internet access

    A second option is to try the following steps:
    Powercycle the network:
    1. turn off your laptop.
    2. unplug the power to your router.
    3. disconnect the power to your modem.
    4. wait at least 45 seconds.
    5 reconnect the modem and wait for it to come back online.
    6 plug in the router and wait for it to come back online.
    7. turn on your laptop and test your connection.

    Turn off the power to the adapter:
    1. open Device Manager. (Win Key + R > type devmgmt.msc > OK)
    2. expand the network adapters.
    3. right click on the Ethernet adapter / wireless, and then click Properties.
    4. click on the power management tab.
    5 remove the check mark next to allow the computer to turn off this device to save power.
    6. click on OK.
    7 test cycle.

    Reset the TCP/IP settings on your PC:
    1. go to your start screen/menu and type CMD.
    2. right-click on the command prompt icon and select run as administrator.
    3. in the window that opens type "netsh int ip reset resetlog.txt" without the quotes and press ENTER.
    4 restart your PC and test.

    It can also help to reset the winsock catalog:
    1. go to your start screen/menu and type CMD.
    2. right-click on the command prompt icon and select run as administrator.
    3. in the window that opens type "netsh winsock reset" without the quotes, and then press ENTER.
    4 restart your PC and test.

    Reinstall the NIC drivers:
    1. download the drivers from here , but do not run them again.
    2. go to your Start menu/screen and type Device Manager.
    3. expand network adapters.
    4. right click on the wireless adapter and choose uninstall.
    5 install the drivers downloaded in step 1.
    6. restart your PC and test.

    Test an ethernet connection:
    Explicit. Test if the problem persists on a wired connection to the adapter hardware troubleshooting wireless can be directed to the appropriate areas.

    Test another connection:
    Many people excluded their home network as a problem if another device working on the same network. Networking is not as simple as that. Each device interacts differently with your router or modem and it is impossible to exclude the settings for this device until the laptop has been tested on another network.

    If these steps do not resolve the problem, try this document published by Microsoft for network management issues: wired and wireless network problems. You can change the operating system with the drop-down list in the upper right of the document.

    Source

    Please let me know how it goes. If this helps you to find a solution, please click on the button accept as Solution down below in this message.

    Thank you!

  • Direct TCP and APN (Please Help)

    Hi, I recently published a music streaming application in the wild. In doing so, I was contacted by a number of international users (outside the U.S.) and was informed that they experience difficulty streaming the songs with my application. I did the fundamental duties that we all go when it's time to connect to our software to the outside world (read post from Peter, reverse engineered the diagnostics utility, watched the public domain HTTP connection factory), and I have it set on the use of a slightly modified version of the factory of HTTP connections in my code.

    It seems to work well enough for users in the United States (a few complaints side), but I'll have almost no success networks such as Telstra, Vodafone, Wind Mobile, etc. I've been Googling autour and heard some people mention that they need to connect through direct TCP with AFN customized to operate on some networks. Has anyone taken the approach of the course of credentials of the AFN and try them one at a time when everything else fails or is it a bad idea? I'd be better to manually enter an APN? I feel that direct TCP uses by default the AFN phone, so no credentials is specified. Is this true and if so, are they reliable these defautls?

    I talked to RIM mount on BIS - B; However, they indicated that it is not practical for my application because of the large amount of bandwidth it consumes. My feelings on the subject at this stage would be better characterized as desperate... Help, please.

    BlackBerry most have not all APN settings configured for direct TCP (or HTTP) under Options-> advanced-> APN. If you want your application to work over direct TCP you can ask your users to configure the APN settings to access the Internet (e.g., APN not = 'internet' and no user name or password for Vodafone UK).

    To make things worse, many users have data plans that do not have access to the Internet (which means non-BIS/BES) non-BlackBerry. In this case, there is no APN settings that make the direct TCP to work. You need to do your users to communicate with their provider and find our if they have Internet access non - BlackBerry and that AFN, they should use for this.

  • Socket connection does not work with SIM network

    Hi all

    I created a socket connection. It works fine when I use the WiFi and iam able to download the data and get a correct answer successfully.   But when I use the network GPRS/SIM I get "Unauthorized response" as an answer. I already check with the default blackberry, here internet browser works very well.

    Can someone tell me why socket connection does not work when I use the SIM card network.

    If anyone knows about internal or the following BlackBerry setting that also tell me

    "Option-> advanced-> TCP Option.

    Thank you

    Neeraj Chauhan

    Thanks Peter,.

    For your support... Now my application works very well in both cases (SIM and Wi - Fi network). So I close my ticket.

    Thank you & best regards

    Neeraj Chauhan

Maybe you are looking for