How to bypass MDS-CS in BlackBerry? - blackberry

I have sample tcp server running # localhost:5050. Connecting to it from BlackBerry is via MDS-CS simulator,and it caches the data with max of 8192. From the Blackberry forums, i understood that, there is a way to bypass it directly to the server.
My Configuration is as follows,
IDE : BlackBerry JDE 4.7.0
Platform : Vista
Server : TCP Server running localhost:5050

You can use direct TCP. When running in the simulator you can just add ";deviceside=true" to the end of your URL. Out on a real phone I don't think it is so easy - I'm also looking for a solution.

Related

Read/Write between Mac and iPhone using libusbmuxd

I current use libimobiledevice to work around Mac and iPhone. libusbmuxd is very helpful to get device (iPhone/iPad) information when connects to Mac app through USB.
I want more, I want to read/write data (a file like document, image, video, ...) from Mac to iPhone and vice versa but I can't get any document or tutorial on the Internet guiding how to do it.
Can anyone help me
If you want to transmit data between OSX and iOS via usbmuxd it is basically a two step process:
Start a socket server on an arbitrary port on iOS or tvOS
Open a socket connection to the usbmuxd server on OSX at /var/run/usbmuxd.
After you have done that you will receive some control messages from the usbmuxd server on OSX including events for device attach and detach. Each device that has been attached to the usbmuxd server has a unique device id. This device id in combination with the port of the socket server can be used to bind the socket connection to the socket server.
If you want to save yourself the trouble of implementing this procedure from scratch you can have a look at the following frameworks. They both provide a high level API in Objective-C.
https://github.com/rsms/peertalk
https://github.com/jensmeder/DarkLightning
this is actually quite easy.
Have a further look at https://github.com/libimobiledevice
Especially look at the iFuse example.
libusbmuxd is a library to use the usbmuxd, which tunnels any socket connections on the iOS device over USB to a local socket.
On every iOS device you can find an open socket on port 62078. This is the so-called lockdownd, which is used for many things.
With lockdownd you can start the AFC service (Apple File Conduit), which is a network filesystem service.
libimobiledevice does all of this for you. (Look at libimobiledevice/afc.h, here are all filesystem related functions like reading a file, retrieving a directory, etc.)
Things you have to do:
call lockdown_client_new_with_handshake(..)
call lockdownd_start_service(..) with the "com.apple.afc" service
if your device is jailbroken, you get full filesystem access with the "com.apple.afc2" service, but otherwise the standard service should do well.
By the way: The lockdownd connection works only if your device is unlocked.
Ciao, Arno

Control mac with http

I would like to be able to control my mac over http post commands.. (Launching apps for example)
I have this jailbreak tweak (activate command) on my iphone that can send shell commands and http post requests (using curl)
But the problem is that i don't know how to prepare my mac for receiving and processing these requests.. Should I use python or php scripts (any tutorials on receiving post requests?) or are there any easy-to-setup restful api's to setup on my mac?
Thanks guys
What you're talking about already exists, in mutltiple forms actually.
RDP: You're probably already aware of Remote Desktop Clients which should be sufficient enough. If you're really inclined on launching apps via command line, you can just open up terminal and do it remotely.
SSH: You can set up a secure shell server on both devices and launch a connection over the LAN. There are multiple clients that I know of on dos systems such as PuTTY or WinSCP. On UNIX systems, there is an SSH shell which you can use for remote connections on either ends. However everything you do will be command-line so you should already have a knowledge of the file system structure and how to navigate it and actually use it.
If you are looking for a script on iOS, I've had very little experience with developing in Python and I don't even know if it can pull off what you are asking. iOS 7.X >= compiles in Objective-C, iOS 8.X compiles in Swift, and the upcoming iOS 9 will be compiling in Swift 2.

Windows phone development - can't run emulator with internet connection

Background
A few years ago I was developing for C#, WPF and Silverlight and then moved to developing for Android.
I've decided to give Windows phone a try, and install the newest Visual Studio Pro 2012 with its Windows phone sdk, together with the latest version of Windows - windows 8 pro.
I've created a new Windows phone project hoping I will start learning from a hello world project, and I've launched the emulator .
Some specs information
OS is windows 8 pro (final) . 64 bit CPU .
Visual Studio Pro 2012
Windows phone sdk 8
Connected by usb to a wireless D-Link device (DWA-140) .
The problem
Just as soon as I've started the emulator, a dialog came asking if I want to enable networking:
When I chose that I want, an error has appeared:
After selecting ok, the emulator crashed.
Knowing how to search for solutions on the internet, I've found a few (like here and here ) that suggested me to delete the network switches, create an internal switch, and whatnot.
The question
I don't understand what I'm doing wrong, and this is just my starting point. Can anyone please help me with this error and how to make the emulator work?
Please tell me the exact steps that I need to take.
EDIT: after uninstallation of anything related to VS and WP , i've re-installed them both and i still get the same errors.
Not only that , but when trying to create a new external switch (which some websites offered) , it showed me the next error :
How could such a basic feature of an emulator be missing out of the box ?
You might try a couple of things.
First, verify the network connection settings for the "vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)" adapter.
To do so, open "Control Panel\Network and Internet\Network Connections" in Control Panel. Right click on the "vEthernet (Internal Ethernet Port Windows Phone Emulator Internal Switch)" adapter, and choose "Properties". Under "This connection uses the following items:" verify that ONLY the following options are selected:
Client for Microsoft Networks
QoS Packet Scheduler
File and Printer Sharing for Microsoft Networks
Microsoft LLDP Protocol Driver
Link-Layer Topology Discovery Mapper I/O Driver
Link-Layer Topology Discovery Responder
Internet Protocol Version 6 (TCP/IPv6)
Internet Protocol Version 4 (TCP/IPv4)
In addition, you may want to review the network adapter settings for the emulator image in "Hyper-V Manager"
Verify the network adapters that are shown are valid. You might try disabling some (like the adapters connected to the WiFi or Wired Ethernet adapters on your machine) if the adapters they are bound to are not currently enabled in the OS.
Let me know if that helps!
I suspect you may be running afoul of UAC. As you've noted, it's trying to create a virtual device. Doing so requires elevated permissions. If I were you I would either run VS2012 as Administrator or completely disable UAC until it's all installed and configured, and then you can turn UAC back on if you prefer it on. I think Allen's comment about manually creating a VM with the appropriate networking is astute and a worthwhile experiment, since it sidesteps the possible UAC issues.

how to make apps on blackberry emulator to connect internet when the PC is behind a proxy server

My PC configured behind a proxy server for internet access. I referred to the blackberry simulator related posts and changed my MDS server setting as follows
application.handler.http.proxyEnabled = true
application.handler.http.proxyHost=hostname
application.handler.http.proxyPort=hostport
application.handler.http.proxyUser=username
application.handler.http.proxyPass=password
After this when MDS is started with simulator, I am able to use the browser. But when I click the browser it asks for the username, password and domain name. After this the internet works properly
Here is the problem. For the same settings when I click the maps app in the blackberry it is not working. Kindly let me know what has to be changed.
Not all apps will use the MDS transport to communicate - for example if the app uses Direct TCP or Wi-Fi, it will bypass your MDS server and go directly over the computer's TCP/IP stack (when running in the simulator). Unfortunately in this case the simulator doesn't use any system-level proxy settings (i.e. the proxy settings set in IE) -- so it won't know about your proxy server and probably fail.
I've mentioned this deficiency to RIM and I'm hopeful they'll address it in future emulators. It would make it so much easier to debug with tools such as Charles or Fiddler.

Unable to make direct TCP connections on blackberry application

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.

Resources