ings
Member level 4
- Joined
- Sep 8, 2014
- Messages
- 78
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 6
- Activity points
- 988
Hello,
plz i have a problem in the connection wit two RN171
so i have two rn171 one conected with explore 16 (pictail)
the other conneted with PC(RN EK)
for the configuration the first one i choose the program of microchip in demo application
and the emulator tera terminal
the nxt one i have thecodee java with udp
so in the first i chose to conect the two rn171 in the same pc
in the emultor terminal i have succed to see the rn171 but i cant send messaage and i thnk the propbelm is in the ip adress
and can some one gve me this true instuction in te emulator because i m trying with thiss instruction
my pproblem is with the value of ip
and the code of java is it true and i will run the programm when i termine the cconfiguration of the modle
thanks in advance
plz i have a problem in the connection wit two RN171
so i have two rn171 one conected with explore 16 (pictail)
the other conneted with PC(RN EK)
for the configuration the first one i choose the program of microchip in demo application
and the emulator tera terminal
the nxt one i have thecodee java with udp
Code:
import java.io.*;
import java.util.*;
import java.net.*;
//package udp_server;
/**
*
* @author THV-JD
*/
public class Udp_server extends Thread
{
public static void main(String args[])
{
int receivePort=999; // port to receive datagrams from
InetAddress remoteIPaddress; // IP address of remote host
int remotePort; // port on remote host to send frames too
byte[] buffer = new byte[65507]; // array to put datagrams in
DatagramPacket dp = new DatagramPacket(buffer, buffer.length); // create packet for datagrams
try
{
// open DatagramSocket to receive and a DatagramePacket to hold the datagrams
DatagramSocket ds = new DatagramSocket(receivePort);
// loop forever reading datagrams from the DatagramSocket
while (true)
{
ds.receive(dp); // wait for next datagram
byte[] data = dp.getData(); // get datagram contents
String s = new String(data, 0, dp.getLength()); // create a string from the data
System.out.println("\nFrom IP " + dp.getAddress() + " UDP string received " + s + "\n");
}
}
catch (IOException se) {System.err.println("error " + se);}
System.exit(1); // exit on failure
}
}
so in the first i chose to conect the two rn171 in the same pc
in the emultor terminal i have succed to see the rn171 but i cant send messaage and i thnk the propbelm is in the ip adress
and can some one gve me this true instuction in te emulator because i m trying with thiss instruction
Code:
scan
set wlan host roving1
join
get ip
set ip host
set ip remote
set ip local
my pproblem is with the value of ip
and the code of java is it true and i will run the programm when i termine the cconfiguration of the modle
thanks in advance