Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Problem in communication of wireless communication with rn 171

Status
Not open for further replies.

ings

Member level 4
Member level 4
Joined
Sep 8, 2014
Messages
78
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Visit site
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

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
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top