Wondering how to connect blackberry to desktop or the other around via tcp/ip? I assume both the desktop and the blackberry are connecting to the same router.
+3
A:
If I read your question correctly and you want a TCP connection over a WiFi router on the same LAN as your desktop, then from your BlackBerry app you simply do:
javax.microedition.io.Connector.open("socket://<your desktop's IP/hostname>:<port>;interface=wifi");
(you can replace socket:// with tls:// ssl:// for a TLS or SSL3 socket connection)
If you're going over the cell network the situation is a bit more complex - you'll only be able to connect to your desktop if your device is attached to a BES on the same LAN as your desktop, or if your desktop has a public IP, but the basic syntax is the same (minus the interface=wifi obviously).
Anthony Rizk
2009-02-08 18:27:28
From the API Documentation, the "interface" parameter is only available on 4.6.0 or higher. Is there a way to do this on older phones?
OTisler
2009-08-11 17:46:33