Tuesday, April 26, 2016

Nikon WU-1a wifi adapter unstable connection fix/solution

I'ts been a year since I bought my Nikkon D3300 DSLR Camera.
When I bought it, I also bought it's wireless adapter module called the WU-1a.
I thought the wireless module was a must to have since it allowed me to connect my Smartphone to the camera to take pictures or to download em directly.

But, after I played around few times with it, I immediately felt disappointed.
The WiFi connection was unstable. It kept disconnecting randomly while taking pictures or when I view the pictures.

I tried many things including resetting the adapter setting and reinstalling the smartphone application. But none of them worked. The connection was still dropping randomly and it frustrated me like hell!

I thought maybe the WiFi module was not compatible with my Smartphone so I gave up using it and had to go back using timer and USB cable to take and manage my pictures.

But then,  I came across this discussion on the web. Link below:

http://reviews.nikonusa.com/7022/27081/nikon-inc-wu-1a-wireless-mobile-adapter-reviews/reviews.htm?page=3&sort=submissionTime&dir=asc

Specifically to this post that says:
"Just bought the D3200 package deal, specifically because this adapter came included. I had to reach out to Samsung tech support to finally successfully get connected. It would see the connection in Wi-Fi but with an error that "Network disabled because internet connection is slow". Samsung sent me the following solution below which did work (happy dance) I just hope that it remains stable.
The software and features could probably be more robust but I just wanted to get pics to my phone for that instant gratification of sharing them out :)
Samsung Solution:
open Apps >> Settings >> Connectivity >> Wi-fi >> Menu >> Advanced.
Auto-network switch. Unckeck if any."
My LG-G4 Smartphone doesn't have that kind of setting but from what I understand, it must be related to my Smartphone's WiFi logic and turned out It does!
Here is why...
The WU-1a Wireless adapted when in use is acting as an AP or Access Point. This means it should be a gateway for the Internet connection.
So when my Smartphone connected to it, it automatically redirect all internet based operations through it.
When those operations failed, my Smartphone assumed that the AP is bad and then drop it immediately.
This is why we got that unstable connection problem of WU-1a. Well at least in my opinion.
So what is the solution to it?
Well in may case. I just disable all internet connection by simply activating the "Airplane Mode", reactivate the WiFi connection and then reconnect the WiFi to the WU-1a again. Voila! the connection is now stable and not a single dropped connection occurred ever again :)

I don't know about your Smartphone, but if you can't activate the WiFi while in "Airplane Mode", maybe you can try disable the data connection instead by turning off the "GLOBE" icon.
Let me know if this solution worked for you ;)



Tuesday, February 22, 2011

BlackBerry BIS-B SOAP returns issue

I've currently been very stressed out with the problem that I just found when using BIS-B connection while getting SOAP message return over Http connection. Somehow those return messages appear to be encrypted or using unknown encoding while using BIS-B but not when using direct TCP or Wifi connection. 
So what is the problem anyway?? 

For an example, let say the server returns "<body>This is a body message</body>" but when using BIS-B it returns "&Auml;&Oslash;Body&Auml;&Oslash;This is body message&Auml;&Oslash;body&Auml;&Oslash;"
Not only that, the messages also altered and has been added with some string like "RIM-X AAaaaAaaaaaaaAGBGASDa/JASFyJFKDSKLDSF" that I didn't know what the heck is it means.

At first, I just check on the server side to make sure that there was no encryption process or encoding changes what so ever during connection and yes, there weren't any. Then I try to ask directly to RIM about this issue and still not getting the right answer that I've been looking for. They suggest me to look on the Basic Authentication process but I think it is not the problem. Here is the code that I showed to RIM:


HttpConnection midpConnection = (HttpConnection) Connector.open(url);

// Add some basic authentication
StringBuffer buf = new StringBuffer(username); buf.append(':').append(password); byte[] raw = buf.toString().getBytes(); buf.setLength(0); buf.append("Basic "); org.kobjects.base64.Base64.encode(raw, 0, raw.length, buf); midpConnection.setRequestProperty("Authorization", buf.toString());

midpConnection.setRequestProperty("SOAPAction", soapAction);
midpConnection.setRequestProperty("Content-Type", "text/xml");
midpConnection.setRequestProperty("Content-Length", "" + requestData.length);
midpConnection.setRequestProperty("User-Agent", "BlackBerry-MyApp");
midpConnection.setRequestMethod(HttpConnection.POST);
os = midpConnection.openOutputStream();
os.write(requestData, 0, requestData.length);
os.close();
requestData = null;

int status = midpConnection.getResponseCode();
if (status != HttpConnection.HTTP_OK) {
final int statusx = status;
UiApplication.getUiApplication().invokeLater(new Runnable() {
public void run() {
Dialog.alert("Connection Error: " + statusx);
}
});
} else {
String contentType = midpConnection.getHeaderField("Content-type");
ByteArrayOutputStream baos = new ByteArrayOutputStream();
InputStream responseData = midpConnection.openInputStream();
byte[] buffer = new byte[10000];
int bytesRead = responseData.read(buffer);
while(bytesRead > 0) {
baos.write(buffer, 0, bytesRead);
bytesRead = responseData.read(buffer);
}

String strResponse = new String(baos.toByteArray());
baos.close();
}
After nearly give up with this but then my colleague suddenly pointed me to this http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/Support_-_HTTP_transmits_incorrectly_when_User-Agent_includes__BlackBerry_.html?nodeid=1367249&vernum=0