Redirect 302 get only when connected via BES loop

Hello

I have a problem when I am connected via BES, I get a server redirection loop (it returns a 302 with the originial URL response in the "location" header field). When it is connected via the BIS-B, WiFi or carrier, the server returns redirects as expected and the app works. However I require a BES connection and him give a priority when they are available.

Note that I checked the connection returned by Networking.java string is correct (we add ";) (deviceside = false' when BES is to be using).

Here's the network code I use:

package [redacted]

/*
 * Networking.java
 *
 * This code is based on the connection code developed by Mike Nelson of AccelGolf.
 * http://blog.accelgolf.com/2009/05/22/blackberry-cross-carrier-and-cross-network-http-connection
 *
 */

import net.rim.device.api.system.CoverageInfo;
import net.rim.device.api.system.DeviceInfo;
import net.rim.device.api.system.WLANInfo;

public class Networking
{
    Networking()
    {
    }

// Whether or not to the simulator should use MDS to connect.
// By default this should be false, however if you are testing
// in an environment where MDS will be the expected connection method,
// set this to true to have the simulator attempt to use MDS.  This variable
// has no effect on what happens on a real device.
    private static final boolean isMDS = false;

    // the timeout
    public static final int TIMEOUT = 30000;

    /**
     * Determines what connection type to use and returns the necessary string
     * to use it.
     *
     * @return A string with the connection info
     */
    public static String getConnectionString()
    {

        String connectionString = null;

        // Simulator behavior is controlled by the USE_MDS_IN_SIMULATOR variable.
        if (DeviceInfo.isSimulator())
        {
            if (isMDS)
            {
                connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=false";
            }
            else
            {
                connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=true";
            }
        }

        // Check for an MDS connection instead (BlackBerry Enterprise Server)
        else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_MDS) == CoverageInfo.COVERAGE_MDS)
        {
            System.out.println("MDS coverage found");
            connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=false";
        }

        else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_BIS_B) == CoverageInfo.COVERAGE_BIS_B)
        {
            // otherwise, use the Uid to construct a valid carrier BIS-B request
            System.out.println("Using BIS");
            connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=false;ConnectionType=[redacted]";
        }

        // Wifi is the preferred transmission method
        else if (WLANInfo.getWLANState() == WLANInfo.WLAN_STATE_CONNECTED)
        {
            System.out.println("Using WIFI");
            connectionString = ";interface=wifi";
        }

        // Is the carrier network the only way to connect?
        else if ((CoverageInfo.getCoverageStatus() & CoverageInfo.COVERAGE_DIRECT) == CoverageInfo.COVERAGE_DIRECT)
        {

            // Has carrier coverage, but not BIBS.  So use the carrier's TCP network
            System.out.println("Device is connected Direct");
            connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=true";

        }

        // If there is no connection available abort to avoid bugging the user unnecssarily.
        else if (CoverageInfo.getCoverageStatus() == CoverageInfo.COVERAGE_NONE)
        {
            System.out.println("There is no available connection.");
        }

        // In theory, all bases are covered so this shouldn't be reachable.
        else
        {
            System.out.println("no other options found, assuming device.");
            connectionString = ";ConnectionTimeout=" + TIMEOUT + ";deviceside=true";
        }

        return connectionString;
    }
}

Here is sendRequest managed the connection method and the redirection:

public HttpResponse sendRequest(HttpRequest request)
    {
        String url = request.getUrl();
        if (url == null)
        {
            HttpResponse result = new HttpResponse();
            result.responseCode = 404;
            result.responseMessage = "Not Found";
            return result;
        }

        ConnectionWrapper cw = connectionWrapperForRequest(request);
        if (cw == null)
        {
            return null;
        }

        boolean compressionEnabled = !request.disableCompression() && COMPRESSION_ENABLED;

        HttpResponse result = new HttpResponse();
        try
        {
            String finalURL = url.trim() + Networking.getConnectionString();
            cw.connection = (HttpConnection) Connector.open(finalURL, Connector.READ_WRITE, false);
            System.out.println("Connection string: " + Networking.getConnectionString());
            System.out.println("Full connec.  URL: " + finalURL);

            if (cw.connection == null)
            {
                result.errorMessage = "Could not open a network connection.";
                result.completedWithError = true;
                return result;
            }

            cw.connection.setRequestMethod(request.getHttpMethod());

            if (compressionEnabled)
            {
                cw.connection.setRequestProperty("Accept-Encoding", "gzip");
            }

            cw.connection.setRequestProperty("User-Agent",
                    "" + DeviceInfo.getManufacturerName() + "/" + DeviceInfo.getDeviceName() + "/" + Config.getVersionNumber());
            if (request.username() != null)
            {
                cw.connection.setRequestProperty("Authorization", "Basic " + Utils.base64Encode(request.username() + ":" + request.password()));
            }

            // set this header so BES servers will not change the content of the headers
            cw.connection.setRequestProperty("x-rim-transcode-content", "none");

            //add cookies
            if (HttpCookieJar.getInstance().cookieCount() > 0)
            {
                cw.connection.setRequestProperty("Cookie", HttpCookieJar.getInstance().getCookiesAsString());
            }

            //pull request headers from HttpRequest

            Hashtable headers = request.getHeaders();
            for (Enumeration e = headers.keys(); e.hasMoreElements();)
            {
                String key = (String) e.nextElement();
                cw.connection.setRequestProperty(key, (String) headers.get(key));
            }

            byte[] upstreamBytes = request.requestBytes();
            if (upstreamBytes != null && upstreamBytes.length > 0)
            {
                Logger.getLogger().log(new String(upstreamBytes));
                cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE,
                        HttpProtocolConstants.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED);
                cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(upstreamBytes.length));
                cw.outputStream = cw.connection.openOutputStream();
                cw.outputStream.write(upstreamBytes);
            }

            Logger.getLogger().log("Get response");

            result.responseCode = cw.connection.getResponseCode();
            result.responseMessage = cw.connection.getResponseMessage();

            Logger.getLogger().log("Status Code: " + result.responseCode);
            Logger.getLogger().log("Status Message: " + result.responseMessage);

            //suck out the cookies here
            int fieldNo = 0;
            String headerField;
            while ((headerField = cw.connection.getHeaderField(fieldNo)) != null)
            {
                if (cw.connection.getHeaderFieldKey(fieldNo).equals("Set-Cookie"))
                {
                    HttpCookieJar.getInstance().setCookie(headerField);
                }
                fieldNo++;
            }

            System.out.println("get redirect");

            //get redirect location
            String location;
            if ((location = cw.connection.getHeaderField("Location")) != null)
            {
                if (location == url.trim())
                {
                    Logger.getLogger().log("Redirect loop");
                }
                Logger.getLogger().log("Redirect: " + location);
                result.redirectLocation = location.trim();
            }
            else
                result.redirectLocation = null;

            byte[] buffer = new byte[HTTP_BUFFER_SIZE];
            int count;

            System.out.println("compression");

            cw.inputStream = cw.connection.openInputStream();
            if (compressionEnabled)
            {
                String encoding = cw.connection.getEncoding();
                if ("gzip".equalsIgnoreCase(encoding))
                {
                    cw.inputStream = new GZIPInputStream(cw.inputStream);
                }
            }

            cw.inputStream = new DataInputStream(cw.inputStream);

            System.out.println("output stream");

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            try
            {
                while ((count = cw.inputStream.read(buffer)) >= 0)
                {
                    out.write(buffer, 0, count);
                }
                result.bytes = out.toByteArray();
            }
            finally
            {
                out.close();
            }
            cw.close();
            Logger.getLogger().log("Response complete");
        }
        catch (IOException e)
        {
            result.errorMessage = e.getMessage();
            result.completedWithError = true;
            Logger.getLogger().log("ERROR!:" + e.getMessage());
        }
        finally
        {
            removeConnectionWrapper(cw);
        }
        return result;
    }

Here's the whole HttpService.java for the context of the SendRequest method above:

//#preprocess

//package
//imports

public class HttpService
{
    private static HttpService _instance;

    private static final boolean COMPRESSION_ENABLED = false;
    private static final int HTTP_BUFFER_SIZE = 1024;

    public static synchronized HttpService instance()
    {
        if (_instance == null)
        {
            _instance = new HttpService();
        }
        return _instance;
    }

    private WorkQueue _requestQueue = new WorkQueue(1024, 4);
    private Hashtable _connections = new Hashtable(10);

    private HttpService()
    {
        // singleton
    }

    private ConnectionWrapper connectionWrapperForRequest(HttpRequest request)
    {
        ConnectionWrapper cw = null;
        synchronized (request)
        {
            if (!request.cancelled())
            {
                cw = new ConnectionWrapper(request);
                synchronized (_connections)
                {
                    _connections.put(request, cw);
                }
            }
        }
        return cw;
    }

    private void removeConnectionWrapper(ConnectionWrapper cw)
    {
        synchronized (_connections)
        {
            _connections.remove(cw.request);
        }
        cw.close();
    }

    public void cancelRequest(HttpRequest request)
    {
        ConnectionWrapper cw = null;
        synchronized (request)
        {
            synchronized (_connections)
            {
                cw = (ConnectionWrapper) _connections.remove(request);
            }
            request.setCancelled();
        }
        if (cw != null)
        {
            cw.close();
        }
    }

    public void executeRequest(final HttpRequest request)
    {
        _requestQueue.addWorkItem(new Runnable()
        {
            public void run()
            {
                HttpResponse response = sendRequest(request);
                if (!request.cancelled() && response != null)
                {
                    request.completeRequest(response);
                }
            };
        });
    }

    public HttpResponse sendRequest(HttpRequest request)
    {
        String url = request.getUrl();
        if (url == null)
        {
            HttpResponse result = new HttpResponse();
            result.responseCode = 404;
            result.responseMessage = "Not Found";
            return result;
        }

        ConnectionWrapper cw = connectionWrapperForRequest(request);
        if (cw == null)
        {
            return null;
        }

        boolean compressionEnabled = !request.disableCompression() && COMPRESSION_ENABLED;

        HttpResponse result = new HttpResponse();
        try
        {
            String finalURL = url.trim() + Networking.getConnectionString();
            cw.connection = (HttpConnection) Connector.open(finalURL, Connector.READ_WRITE, false);
            System.out.println("Connection string: " + Networking.getConnectionString());
            System.out.println("Full connec.  URL: " + finalURL);

            if (cw.connection == null)
            {
                result.errorMessage = "Could not open a network connection.";
                result.completedWithError = true;
                return result;
            }

            cw.connection.setRequestMethod(request.getHttpMethod());

            if (compressionEnabled)
            {
                cw.connection.setRequestProperty("Accept-Encoding", "gzip");
            }

            cw.connection.setRequestProperty("User-Agent",
                    "" + DeviceInfo.getManufacturerName() + "/" + DeviceInfo.getDeviceName() + "/" + Config.getVersionNumber());
            if (request.username() != null)
            {
                cw.connection.setRequestProperty("Authorization", "Basic " + Utils.base64Encode(request.username() + ":" + request.password()));
            }

            // set this header so BES servers will not change the content of the headers
            cw.connection.setRequestProperty("x-rim-transcode-content", "none");

            //add cookies
            if (HttpCookieJar.getInstance().cookieCount() > 0)
            {
                cw.connection.setRequestProperty("Cookie", HttpCookieJar.getInstance().getCookiesAsString());
            }

            //pull request headers from HttpRequest

            Hashtable headers = request.getHeaders();
            for (Enumeration e = headers.keys(); e.hasMoreElements();)
            {
                String key = (String) e.nextElement();
                cw.connection.setRequestProperty(key, (String) headers.get(key));
            }

            byte[] upstreamBytes = request.requestBytes();
            if (upstreamBytes != null && upstreamBytes.length > 0)
            {
                Logger.getLogger().log(new String(upstreamBytes));
                cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE,
                        HttpProtocolConstants.CONTENT_TYPE_APPLICATION_X_WWW_FORM_URLENCODED);
                cw.connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(upstreamBytes.length));
                cw.outputStream = cw.connection.openOutputStream();
                cw.outputStream.write(upstreamBytes);
            }

            Logger.getLogger().log("Get response");

            result.responseCode = cw.connection.getResponseCode();
            result.responseMessage = cw.connection.getResponseMessage();

            Logger.getLogger().log("Status Code: " + result.responseCode);
            Logger.getLogger().log("Status Message: " + result.responseMessage);

            //suck out the cookies here
            int fieldNo = 0;
            String headerField;
            while ((headerField = cw.connection.getHeaderField(fieldNo)) != null)
            {
                if (cw.connection.getHeaderFieldKey(fieldNo).equals("Set-Cookie"))
                {
                    HttpCookieJar.getInstance().setCookie(headerField);
                }
                fieldNo++;
            }

            System.out.println("get redirect");

            //get redirect location
            String location;
            if ((location = cw.connection.getHeaderField("Location")) != null)
            {
                if (location == url.trim())
                {
                    Logger.getLogger().log("Redirect loop");
                }
                Logger.getLogger().log("Redirect: " + location);
                result.redirectLocation = location.trim();
            }

            byte[] buffer = new byte[HTTP_BUFFER_SIZE];
            int count;

            System.out.println("compression");

            cw.inputStream = cw.connection.openInputStream();
            if (compressionEnabled)
            {
                String encoding = cw.connection.getEncoding();
                if ("gzip".equalsIgnoreCase(encoding))
                {
                    cw.inputStream = new GZIPInputStream(cw.inputStream);
                }
            }

            cw.inputStream = new DataInputStream(cw.inputStream);

            System.out.println("output stream");

            ByteArrayOutputStream out = new ByteArrayOutputStream();
            try
            {
                while ((count = cw.inputStream.read(buffer)) >= 0)
                {
                    out.write(buffer, 0, count);
                }
                result.bytes = out.toByteArray();
            }
            finally
            {
                out.close();
            }
            cw.close();
            Logger.getLogger().log("Response complete");
        }
        catch (IOException e)
        {
            result.errorMessage = e.getMessage();
            result.completedWithError = true;
            Logger.getLogger().log("ERROR!:" + e.getMessage());
        }
        finally
        {
            removeConnectionWrapper(cw);
        }
        return result;
    }

    private static class ConnectionWrapper
    {
        final HttpRequest request;
        InputStream inputStream = null;
        OutputStream outputStream = null;
        HttpConnection connection = null;

        public ConnectionWrapper(HttpRequest request)
        {
            this.request = request;
        }

        public void close()
        {
            try
            {
                if (outputStream != null)
                    outputStream.close();
            }
            catch (Exception e)
            {
            }
            try
            {
                if (inputStream != null)
                    inputStream.close();
            }
            catch (Exception e)
            {
            }
            try
            {
                if (connection != null)
                    connection.close();
            }
            catch (Exception e)
            {
            }
        }
    }
}

Sorry for the amount of code.

I had our BES admin visit problematic page via a browser on the Server BES itself.

Running, the Web server was an update of AJAX-style page that informs the user that they had no access to that particular content. Programmatically, see us all is "the page has been moved here" - but in a browser, it's a different story.

Thanks again Peter for your insight!

Tags: BlackBerry Developers

Similar Questions

  • D1370 "Scan type not the Remote Scan value... "Why this error when connected via USB

    Printer D1370 MF w / usb on win7 x 64 machine connection.

    I understand that when networked, I owe to the printer and manually press , then then before you scan using the software MF Toolbox on my PC and then must go to the printer once the scan is complete and cancel this setting manually before I can print or use other functions. What is total pain BTW...

    However, I also have a MF6530 and can scan directly from MF Toolbox without manually change the setting of the printer when connected via USB.

    So, I would like to connect one of my PC via USB for scanning to eliminate the requirement to manually configure the printer for the mode. But, when I do this I always get the error "type of analysis is not defined for [Remote scanner] on the device" even though I am connected via usb.

    1. I do something wrong when I try to scan via a usb connection that causes the error "remote scanner?

    2. that this has something to do with D1370 being a network printer. My MF6530 isn't a network printer.

    3 is there a manual for the software MF Toolbox? The manual on the installation disc is for 'Send email' and 'Store to Shared Folder. The manuals provided in the box do not address MF Toolbox. There must be a detailed operating manual provided by Canon for this program?

    4. What is the error Code 162,0,0?

    5. where is the complete list of the error codes for MF Toolbox.

    6 help!

    Hi monza.

    I know that this issue is frustrating and I'll be happy to help you.

    The new imageCLASS machines are designed so that you can select an option to scan the machine.  There is no way to set a default scan on this computer option.  You will need to select [Remote scanner] or [computer].  This is to ensure that your device correctly handles the scan project.  For this reason, the ability to program a specific mode is not available.

    Although an extra step to make, an advantage to choose the mode desired for a respective scanning can ensure that poor communication of scanner does not occur if it was programmed to a different mode.

    The 162,0,0, the error indicates the Toolbox does not detect the scanner mode "Remote Scanner.  Scanning is not supported with a connection on the USB hub, as the hubs can cause communication problems, trying to transmit data to the computer.  We recommend a direct connect between the printer and the computer.  Once you have connected the printer directly, perform the following steps and check if you receive the same error 162,0,0:

    1. Check that the MF Toolbox is closed on the computer and press the [SCAN] button on the printer.
    2. Select [Remote scanner], then press [OK].  The display reads, "remote scanner. Waiting in line... ».
    3. On the computer, open the MF Toolbox and select [PDF].
    4. Click the [START] button green on the window [PDF].  The machine begins to deal with the scan.

    Then I recommend to download and install the e-manual for the device to your computer.  It gives very detailed instructions on each of the functions of the machine.  The e-manual should be included in the manual on CD-ROM supplied with the machine.  If you are unable to access it from there, please click the link below to download the electronic Handbook:

    imageCLASS D1370 - Brochures & manuals

    I hope this information is useful for you.  However, if you need more assistance, please contact us at 1-800-OK-CANON (1-800-652-2666).

  • MCE IR remote stops working when connected via Remote Desktop Win7

    I recently added an IR remote for my computer to Windows 7 (32 bit Ultimate) that I use mainly for playback of mp3. The remote control is only an AVS Gear MG-IR01BK Windows Vista/Window7 MCE Remote control infrared works by attached USB "infrared transceiver eHome.  When I physically connect the machine IR remote works perfectly; as soon as I connect via remote IR Office stops responding.  I had to configure the Audio remotely to RDP to get this to work correctly, but I can't find any setting that controls in response to the infrared remote control.  My quest for answers has turned up nothing so far, someone has suggested?

    Thanks for the suggestion.  At thegreenbutton.com behavior that I have reported was confirmed by others (the MCE Remote control is a HID device, so is related to the "console"). VNC is a viable alternative to remote desktop. I ended up using TightVNC (RealVNC purchase required for support of Windows 7), and the infrared remote control continues to work when I access the machine via the VNC viewer.   I want to remote desktop could provide this capability, but at least I have a working with VNC solution.

  • SP2309W won't go into energy saving mode when connected via HDMI

    Hello

    I just got 2 SP2309W, and I love them, the only problem I encounter is just one of them (the one connected via HDMI) is not in power saving mode, even when I turn off my laptop. Is anyone else having the same problem?

    I have connected the monitor via VGA and DVI and the energy saver works fine but it does not work with HDMI

    I have a XPS 1530, Intel Core 2 Duo processor T9300with a 256 MB NVIDIA GeForce 8600 M GT video card.

    My XPS has a HDMI and VGA input so I have a monitor connected via VGA and the other via HDMI and even when I go around, always one connected via HDMI is not in the standby power mode even if the laptop is turned off (or when he goes to sleep).

    Thanks for your help,

    Ivan

    We left three SP2309Ws on all night to disconnect the HDMI cable and in STFC mode and came this morning to see the message from MONIQUE always there. They all didn't say, 'no HDMI cable. This is normal. In fact, we have tested on several other models of monitors and they all do the same thing.

  • LabVIEW visa getting slow when connected to arduino

    Visa in labview when connected to the arduino prog becomes slow

    I checked it passes the codde required, but the action is slow

    and the most important every time to get the o/p I must stop the prog, then start again.

    I tried to do a new prog with visa in singlw loop it was due to long progs and constant, as a single string, but always thinking of things don't work the way I would like to know fast n without stopping the prog. I have attached my n of the required part of the diag block image files

    I used a string of length 10 char n I have my program and a single visa write.


  • BlackBerry Smartphones phone hangs when connected via USB

    Hi I have a Pearl 8120. There is a problem where the phone will break if I connect it to some PC via USB.

    When I say that it blocks the screen turns off and the red light stays on. To recover from this point, I have to unplug and reinsert the battery.

    But for example if I connect it while the PC is not started in Windows so it will not crash.

    When I connect the phone via a charger cable is also very good, and never, it hangs on my own PC at home.

    Is there a way to fix this?

    Hi, it seems that too much effort for reload software blackberry at this stage.

    Although I solved the problem by changing the option "Auto enable mass Storage Mode when connected" guest.

  • vCAC 6.0 error: user get banned when connecting error

    Hello

    one of the user of the VCAC becomes an error when connecting to vCAC 6.0 "prohibited." Please close the browser window and connecting a new window", when I have the tail of Catalina.out to error on the SSO server located under the log entry

    04/07/22 11:02:21, 282 Builder DEBUG [DefaultIdmAccessorFactory] DefaultIdmAccessorFactory

    2014-07-22 11:02:21, 282 DEBUG [DefaultIdmAccessorFactory] DefaultIdmAccessorFactory getIdmAccessor

    2014-07-22 11:02:21, 282 DEBUG [CasIdmAccessor] CasIdmAccessor constructor called

    2014-07-22 11:02:21, DEBUG state [AuthnRequestState] 282 specified relay has been https://VCAC-UI.abc.local/shell-ui-app/#csp.places.iaas.Default

    2014-07-22 11:02:21, 282 DEBUG [AuthnRequestState] parseRequestForTenant, vsphere.local tenant

    2014-07-22 11:02:21, 283 attack by reconstitution DEBUG [AuthnRequestState] detected - request authentication who REFUSES

    2014-07-22 11:02:21, 283 DEBUG [BaseSsoController] caught exception java.lang.IllegalStateException analysis: forbidden

    2014-07-22 11:02:21, 283 DEBUG [AuthnRequestState] addResponseHeaders, org.apache.catalina.connector.ResponseFacade@144d6c10 response

    2014-07-22 11:02:21, 283 DEBUG [AuthnRequestState] generateResponseForTenant, vsphere.local tenant

    2014-07-22 11:02:21, 283 INFO [BaseSsoController] responded with ERROR 403 Forbidden message! Please close the browser window and connecting a new window

    So when I tried to check for the administrative user account > VCAC users, I have a step able to list out sound it is actually member of ad groups. It's strange because, in reality user groups listed in the Active Directory log.

    Please help me get this problem

    Thanks in advance

    BR,

    MG

    Steve anywhere today...

    2014-07-22 11:02:21, 283 attack by reconstitution DEBUG [AuthnRequestState] detected - request authentication who REFUSES


    This line indicates that someone is trying to reuse an expired session token. Ensure that people use not SSO, or a bookmark of a page being cached for SSO.


    Grant

  • R7000: UPNP Renderer not visible when connected via WiFi

    Hi all

    I use the R7000 as a router and I have the problem that my UPNP renderer (Denon DNP-F109) is not visible if connected via WiFi (via Ethernet, everything works very well).

    Can someone give me a clue what to do here?

    I went on DHCP and UPNP in the configuration. All UPNP (Server/converter/controller) devices are in the same 192.168. * network.

    Thank you very much

    Stefan

    Hello Stefan,

    Please perform a reset of the device and check again if still the same problem.

  • To connect to the PC - tab 8W - not seen when connected via USB - Help!

    My new 8W tab is not seen by the PC connected via USB. Both are Windows 10. Help!

    Out of curiosity I will pick up an OTG cable and let you know the result!

  • I can't get sound through tv when connected via HDMI

    I have a HDX 18 and I connected it to my Olevia via the HDMI. I hear no sound on the tv. I used to be able to. What settings should I and how >

    Hey you probably already found a solution to your problem because you posted this comment a long time ago. But incase you don't have. Here's the answer to your problem. I hope it helps.

    1. So that the audio works fine on HDTV, the device must be configured as peripheral by default in the computer Device Manager. To do:
      1. In Windows® XP:
        1. Note! Before you configure the audio device by default, the following Microsoft driver must first be installed: Universal Audio Architecture (UAA) High Definition Audio class driver
        2. After installing the UAA driver, click Start
        3. Select Control Panel
        4. Select sounds, speech and Audio devices
        5. Select sounds and Audio devices
        6. Click the Audio tab
        7. In the first article entitled audio playback, select the device you want to audio out of
        8. Click OK to save your settings
      2. In Windows Vista®:
        1. Right click on the "speaker" icon
        2. Select the device of reading options
        3. Right click on the device you want the audio to the output of
        4. Set as audio device as the default
        5. Click OK to save your settings
      3. In Windows® 7®:
        1. Go to the Start button
        2. Select Control Panel
        3. Select the material and audio
        4. Select sound
        5. Click the Read tab
        6. Select the device you want to audio out of
        7. Click on set as default
        8. Click OK to save your settings

  • wifi will not work, but when connecting via ethertet (sp?) I can get connection. WiFi works on ipad and iphone... but not cell phone?

    Cannot connect to the wifi, but can be downloaded on the iphone and ipad?

    problem with laptop to guess, but don't know what that... everybody has ideas?

    Hello

    1. What is the operating system installed on your computer?

    Please follow the form as follows the link.

    http://Windows.Microsoft.com/en-us/Windows/help/wired-and-wireless-network-connection-problems-in-Windows

  • Failure of HTTP post when connecting via SIP

    Hi all

    I'm doing HTTP post, but I get corrupted in the response data.

    This problem only occurs on the device (4.5) and only if you use the SIP configuration

    (the problem does not when you use a device via Wifi 4.6)

    Here is my code:

    HttpConnection connection = (HttpConnection)Connector.open(url + ";deviceside=false");connection.setRequestProperty("x-rim-transcode-content", "*/*");connection.setRequestMethod(HttpConnection.POST);connection.setRequestProperty("Content-Type","multipart/form-data; boundary=@---------------------------123");connection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_LENGTH, String.valueOf(data.length));      OutputStream os = connection.openOutputStream();os.write(data);
    
    if (connection.getResponseCode()==HttpConnection.HTTP_OK){   StringBuffer result = new StringBuffer();   byte[] buffer = new byte[2000];   int i = 0;         DataInputStream in = connection.openDataInputStream();
    
       while ((i = in.read(buffer)) != -1){      result.append(new String(buffer, 0, i,"ISO-8859-1"));   }}
    

    Does someone know what I'm doing wrong here?

    (BTW, the system cut the suffix HTTP "ConnectionType =" which should be equal to "mds" + "»' + 'public')

    I guess that your assumption that the "transcode-including" in the request header method caused the problem was correct.

    I changed the method request header, it shows the HttpConnection API:

    ...
    
    // Set the request method and headers
    c.setRequestMethod(HttpConnection.POST);
    c.setRequestProperty("If-Modified-Since","29 Oct 1999 19:43:31 GMT");
    c.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.0");
    c.setRequestProperty("Content-Language", "en-US");
    
    ...
    

    and the problem has been corrected

  • I don't get sound when connecting my LED TV to my laptop under windows 8

    Hello

    I have a laptop HP with windows 8. When I try to connect it to my LED tv using a HDMI cable I get the picture but the sound comes from the laptop only, not LED TV. I don't know the reasons. If anyone can help get the sound on my LED TV.

    Thank you

    Hi Ram,

    I understand that when you connect to LED TV to your Windows 8 HP laptop using an HDMI cable, you get the picture on the LED screen but sound comes only from the laptop. There is no sound in LED.

    This problem can be caused if the digital audio HDMI is disabled. Please follow the provided steps and check to see if that solves the problem:

    Method 1: Activate digital audio HDMI:

    Follow these steps to enable digital audio HDMI:

    (a) the speaker icon on the right side of the taskbar on the right click desktop background.

    (b) click on playback devices

    (c) right click Digital HDMI audio and then click Activate.

    (d) put a check mark: Show disconnected devices and see the disabled devices.

    (e) check if you get audio on the led connected to the laptop via a HDMI cable.

    Method 2: Check if the cables are connected properly:

    See the section under step 2 HDMI cables in the following link:

    No sound in Windows:

    http://Windows.Microsoft.com/en-in/Windows/no-sound-help#no-sound=Windows-8&V1H=win8tab2&V2H=win7tab1&V3H=winvistatab1&v4h=winxptab1

    Hope, it helps to solve the problem, if you have any other questions relating to Windows 8, do not hesitate to post.

    Kind regards

  • Get only limited connectivity

    I have a Windows Vista HP laptop. I try and connect to the internet via my Huawei 3 G modem. Whenever I try to connect, I get "limited connectivity" one way that I can not connect to internet. I tried to reset the IP stack, did not work. I have also tried the fix suggested in http://support.microsoft.com/kb/928233/en-us, doesn't work anymore.

    I know that the modem works for some.  I know I'm getting some sort of connection.  The modem drivers are the latest.

    If anyone has any suggestions please let me know. If you need more information please let me know that too.

    First connect USB Modem. Go to the Control Panel, Manager of devices, expand Modems, double-click your driver to choose Modems (one at a time), click on uninstall, if there is a box (remove the driver for this device) put a check mark in the box. Do this for all Modems are listed except Bluetooth if you have. Then, although still in Device Manager expand Ports (COM & LPT), do the same thing as Modems uninstall the drivers for the ports listed for your Mobile USB only. You may have to restart the computer, do not restart yet. Go to control panel, phone and modems Options, select Modems, highlight and delete all modems listed except Bluetooth. Now go to control panel, programs and features and uninstall the software for your Mobile USB. Remove your USB Modem. Restart your computer. Plug your USB and install it. It should work now. If you have back problems, everything is OK post back anyway and let me know.

  • 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.

Maybe you are looking for