Unable to make direct TCP connections on blackberry application - blackberry

In my blackberry application I'm establishing network connection by appending ;deviceSide=true in the url. It is working fine on simulator but its not working on device. I've correct APN settings as other third party apps are running fine.
Please let me know the possible reason for this issue!!!

Its not necessary that your app always connect via direct TCP.
For taking care all types of networks available in blackberry for your app refer this article.
How to programmatically connect to the internet in blackberry

Network Diagnostic Tool
download this network diagnostic tool developed by RIM and check weather direct TCP is working or not in your mobile.

Related

ASCII code on an external device through USB port

Is it possible to send an ASCII code on an external device through USB port using IOS API? I assume that it is possible through bluetooth connection, but I'm not sure through USB connector. Any thoughts?
I would appreciate if someone could put me in the right direction.
Thanking you in advance
That largely depends on the level of sophistication of this "external device". If this external device is just a bare metal embedded device without some sort of operating system you definitely need MFI.
Otherwise, you can run a usbmuxd server (e.g. on Raspberry PI with Linux) to establish a connection via USB. Usbmuxd is basically the technology that Apple uses to communicate between iOS devices and Desktop apps such as iTunes or Xcode. And yes, it is App Store compliant, e.g., Duet Display uses this approach to make an iPad a secondary display for your Desktop via USB.
There are several open source libraries that provide a high level API, e.g., PeerTalk or DarkLightning.

How does this iOS app communicate over the USB port?

This app promises to turn your iOS device into a second monitor and uses the standard USB cable to connect to the computer, as opposed to the network which all other similar apps use.
Back when I heard about it, it wasn't yet available so I thought it was a scam. To my surprise, they released the app and it actually works as described.
How does it work ? As far as I know there are no APIs to drive the USB port in iOS, and the computer connected via USB through the standard charging/syncing cable doesn't count as an MFI accessory.
Note that they provide the server software (the one that installs on the Mac and streams the desktop to the device) on their download page for free, reverse-engineering it could shed some light on this but I unfortunately don't have the skills for that.
Dean told about it on his blog.
Duet uses Peertalk, an open source library allowing to pass TCP connections through the USB connection without being part of the MFI program.
The information, code and tools to accomplish generic USB port communication is available to those who join the Apple MFi program. You have to do the paperwork and get licensed by Apple.
http://developer.apple.com/programs/mfi/
The libraries necessary are included in the app and then the usual streaming libraries and code do the rest.

iOS socket list of hosts wlan

I have some WLAN-Device, that I communicate with.
At first I go to IOS Settings and connect to the device directly.
Then in my App I need to input the ip and port to open a socket.
Until now I knew the IP and Port, to open a socket connection to this device.
But if I am already connected (Adhoc) to the device, why I can not find this stuff automatically?
I already saw some solutions, but most of them need the usage of dynamic libs or just not longer available in iOS7.1. I can not use dynamic libs, because this App should go to AppStore.
There is no other way since iOS 6.
You have to scan the location. "Reachability" could help you, if you know the name of the host. Also you could try to scan the posible IP's. With Thread limited by 5 Operations it could go preaty fast.

iOS app-level communication over USB

Is it possible to to communicate between MAC/Windows programs and an application on iOS through USB?
Requirements:
No jailbreak required
App store approval
I looked into USBMuxConnectByPort and it requires SSH/Jailbreak.
Is there any other option?
It is possible.
'USBMuxConnectByPort' is the function from the private framework MobileDevice.framework
See usage example here: https://github.com/smirn0v/imux
imux – application I wrote that ties local tcp port on your mac with tcp port on your ipad/iphone. So connection to 127.0.0.1:someport will actually connect you to your iPhone/iPad via usb.

Communicate between iPhone and macbook laptop

In an effort to learn more about networking I'd like to do an exercise: write some code on an iPhone and macbook laptop that allows the devices to communicate over HTTP.
How would I set this up in general? I could write a very simple web server as illustrated in Beej's Guide. Then run this and make requests from the phone. Assume the two devices will be on the same wifi network.
In this book you can find an example of how to make a network to connect a Mac OS X app with an iOS app using Bonjour.
http://my.safaribooksonline.com/book/programming/mobile/9780132757058/bonjour-and-web-servers/ch28
Hope this helps you.
Using HTTP between two apps is very inefficient. Use NSNetService and raw sockets.
NSNetService Docs
There is an example project that shows how to setup the service for publishing, connect 2 services, and consume data from a socket connection.

Resources