BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-18-2009, 09:38 AM   #1 (permalink)
New Member
 
Join Date: Nov 2009
Model: 9000
PIN: N/A
Carrier: student
Posts: 7
Post Thanks: 0
Thanked 0 Times in 0 Posts
Smile how to connect blackberry with laptop with socket

Please Login to Remove!

Hello,

I write a program to connect the blackberry with laptop with socket

try{
add(new RichTextField("Start to connection ..."));
SocketConnection sc = (SocketConnection)Connector.open("socket://134.91.99.178:4000;deviceside=true;interface=wifi" , Connector.READ_WRITE, false);

DataOutputStream os = sc.openDataOutputStream();

os.writeUTF("please show the position of the tag");
os.flush();
os.close();
sc.close();
}

catch (IOException e)
{
e.printStackTrace();
System.out.println("the server is not lisenning");
}

on laptop side, i write a program which open a server socket to listen. but the string "please show the position of the tag" cannot be correctly displayed on the laptop side, evertime it displays "NULL".

who can help me?

LT_java
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

NEW ALLEN BRADLEY POWERFLEX 753 Model #: 20F11ND8P0AA0NNNNN
$1245.0
NEW ALLEN BRADLEY POWERFLEX 753 Model #: 20F11ND8P0AA0NNNNN  picture2014 New Sealed Allen Bradley 2090-CPWM6DF-16AA09 Power Cable TLY Motor 9m GA
$94.59
2014 New Sealed Allen Bradley 2090-CPWM6DF-16AA09 Power Cable TLY Motor 9m GA pictureBosch Rexroth VT-13477-22/1 amplifier card VT13477-22/1
$533.45
Bosch Rexroth VT-13477-22/1 amplifier card VT13477-22/1 pictureSiemens SIMODRIVE 611-D, 6SN1118-0DM13-0AA1, Seller Refurbished, Fully Tested
$1126.92
Siemens SIMODRIVE 611-D, 6SN1118-0DM13-0AA1, Seller Refurbished, Fully Tested picture2015 New Sealed Allen Bradley 2090-CFBM6DF-CBAA09 Feedback Cable Motor M-Circ GA
$102.0
2015 New Sealed Allen Bradley 2090-CFBM6DF-CBAA09 Feedback Cable Motor M-Circ GA picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.