set wlan h localWiFi
set wlan p password...
set wlan host wifissid
AOK
<4.00>
set wlan pass password
AOK
<4.00>
join
Auto-Assoc horace1 chan=1 mode=WPA2 SCAN OK
<4.00>
Joining horace1 now..
Associated!
DHCP: Start
DHCP in 2136ms, lease=86400s
IF=UP
DHCP=ON
IP=192.168.1.17:888
NM=255.255.255.0
GW=192.168.1.1
set ip host 192.168.1.11
AOK
<4.00>
set ip remote 999
AOK
<4.00>
set ip local 888
AOK
<4.00>
exit
EXIT
hello UDP server
yes, you don't need a second RN171so i can test my wirelles communication between pic24f and PC without using another RN171 with pc and using the local wireless cmmunication in pc and execute the commaand in pc and seeing what my server (PC) received like information
// simple UDP server waiting for datagrams and extracting a string
import java.io.*;
import java.util.*;
import java.net.*;
public class UDPserver 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
}
}
in the lib subdirectory the .c files are general purpose functions that the project may make use ofHello,
please i have another questions about this project wifly_pass_thru_demo_exp16_p24 :
1. In the file console.c there are these functions:
a. putssconsole //send a null terminated string to the UART2 serial port
b. * getconsole // is to verify that no more data to be transmitted ??
char getConsole(void) reads a single character from the serial
char *getsnConsole(char *s, uint16_t len) reads a string of characters
line
U1TXREG = U2RXREG; // console Rx --> wifly Tx
if your project has switches replace the explorer code 16 ones else remove the code2. the file switch.c for example for explorer16 board the switches already exist but in case what i must relaize my own card I must construct the switchs??
they are general functions available for use in end users projects3. in wiflydrive.c : he is interested to initiaiser UART1 and it is the same function that it has already exist in console.c ; just the difference is that with UART1; so can I known what is the difference between UART1 and UART2??
then getwifly,putWiFly, putsWiFly, getsnWiFly are never used in the project so what's the utility of these functions??
Thanks in advance
/*** Interrupt Service routine for UART1 RX ******************************/
void __attribute__ ((interrupt,no_auto_psv)) _U1RXInterrupt(void)
{
IFS0bits.U1RXIF = 0; // Clear the interrupt status of UART1 RX
while(!U1STAbits.URXDA);
while (U1STAbits.UTXBF); // wait while Tx buffer full
U2TXREG = U1RXREG; // wifly Rx --> console Tx
}
yes, at the moment I used a Real ICE but in the past have used an ICD2 and an ICD3and you have using a programmer to send your code to the explorere 16 board (icd3)
the explorer 16 is not a starter kit with its own programmer
it needs an external programmer such as an ICD3
yes, at the moment I used a Real ICE but in the past have used an ICD2 and an ICD3
I would assume a PICKIT3 would work but worth checking documentation
I never managed to get the onboard PIC18 programmer to work on the Explorer 16 - talked to various people at Microchip and in the end was advised that it did not work - gave up and used an ICD2I thought I should also mention the PIC18F4550 onboard the Explorer 16 can be programmed with PICkit 2 firmware, alleviating the need for and external programmer/debugger. I have test this modification and it seems to work fine for both programming and debugging.
BigDog
Update: I realized it had been quite some time since I tested the PICkit 2 firmware, so I just did so on a Windows 7 platform running the latest MPLABX version and the XC16 compiler. I had no issues programming or debugging the Explorer 16 using the PICkit 2 firmware. Windows 7 recognized and loaded the PICkit 2 driver and MPLABX allowed the selection of PICkit 2 for both programming and debugging.
Programming Target (08/11/2014 08:32:27)
PIC24FJ128GA010 found (Rev 0x3002)
Erasing Target
Programming Program Memory (0x0 - 0x10FF)
(Using Programming Executive)
Verifying Program Memory (0x0 - 0x10FF)
(Using Programming Executive)
Programming Configuration Memory
Verifying Configuration Memory
PICkit 2 Ready
Programming Target (08/11/2014 08:35:30)
PKWarn0003: Unexpected device ID: Please verify that a PIC24FJ128GA010 is correctly installed in the application. (Expected ID = 0x40D0000, ID Read = 0xFF800000)
Erasing Target
Programming Program Memory (0x0 - 0x10FF)
PE Error: Using ICSP
Verifying Program Memory (0x0 - 0x10FF)
PE Error: Using ICSP
PK2Error0027: Failed verify (Address = 0x0 - Expected Value 0x40200 - Value Read 0xA600)
PICkit 2 Ready
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?