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.

wireless communication with PIC24f and MRF24WB0MA

Status
Not open for further replies.
I'm glad to hear you got the PICkit mod working.

It's actually quite a nice mod for the Explorer 16 Dev Board.

I went ahead and attached the latest firmware for the Explorer 16 PICkit mod, just in case the following website should vanish in the sands of time.

**broken link removed**

BigDog
 

Attachments

  • PK2_Explorer16_V0210007-BL.zip
    46.7 KB · Views: 80

I can use ICD3 also with explorer 16 booard?
 

Please i have two question :
1. in wireless Communicatin protocol 802.11, it was defined frame format ie the frame that containing specific FCS, Dest adress, source adress ... and the data transmitting to the receiver will be in the frame; My problem is that I 'm not understand how I can know the values of FCS, or it will be automatically calculated by the RN171 module and I can display the values of these variables?
2. Another question about the PCB for example when I will using explores16 board so the PCB will be in my case the explorer 16? or what is the PCB please exactly?
thanks in advance
 

Please i have two question :
1. in wireless Communicatin protocol 802.11, it was defined frame format ie the frame that containing specific FCS, Dest adress, source adress ... and the data transmitting to the receiver will be in the frame; My problem is that I 'm not understand how I can know the values of FCS, or it will be automatically calculated by the RN171 module and I can display the values of these variables?
when you receive a UDP datagram or a TCP connecton you can get information regarding the source address, port, etc, e.g.java TCP when we have done a serverSocket.accept()
Code:
 System.out.println("Chat client connect from IP address " + socket.getInetAddress()
                + " port " + socket.getPort());
br  = new ObjectInputStream( ( socket.getInputStream() ) );
pw = new ObjectOutputStream( socket.getOutputStream() );
or Visual C++
Code:
TcpClient^ client = server->AcceptTcpClient();            
s=(String::Format( "Remote client connected IP address {0} port {1}\n" ,IPAddress::Parse(dynamic_cast<IPEndPoint^>(client->Client->RemoteEndPoint)->Address->ToString())
				,(dynamic_cast<IPEndPoint^>(client->Client->RemoteEndPoint)->Port)));
terminalTextBox->AppendText(s);

2. Another question about the PCB for example when I will using explores16 board so the PCB will be in my case the explorer 16? or what is the PCB please exactly?
thanks in advance
PCB stands for Printed circuit board - in this case you would probably have two the Explorer 16 PCB andd the RN171 Pictail PCB
 
  • Like
Reactions: ings

    ings

    Points: 2
    Helpful Answer Positive Rating
1. so the socket contains all the information about the data transmitted from the emitter RN171 and when i just testing the comunication without sending any information it will display me the destintaion adress, the value of FCS ...?
2. another question please in datasheet of RN171, it use DSSS as modulation technique so can i for example change this tehnique with another technique like ofdm (802.11a) to improve my communication or this technique is fixed in rn171 and i will just add in my porgamm of pic24f some instruction to improve the quality of my communication or with RN171 it is impossible to improve the quality of communication ?
thanks in advance
 
Last edited:

you need to run a server program on the PC - this can be written in C, C++, Java, etc

the RN171 then joins the local WiFi network, sets up the IP address and port and sends data
e.g. this sets up the network SSID and password, joins the network, sets up the IP (192.168.1.11) and port (999) that the server is listening on, exits command mode and sends a message
Code:
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

the server is waiting on UDP port 999 to receive data, e.g.
View attachment 110735

Hello,
plz i triiying too configur my module RN171 with Tera term but he dsplay me a error. I thnik the problem is with the serial port because when i write $$$ in tera term he write me
ERR:?-Cmd
and i m sure that my link wth seria prot is true
Thanks in advance
 

you are probably already in command mode
Code:
CMD
$$$
ERR: ?-Cmd
<4.00>
when I enter the first $$$ it responds with CMD
when I enter $$$ again it gives an error
 
  • Like
Reactions: ings

    ings

    Points: 2
    Helpful Answer Positive Rating
Hello;
when i open tera term in onother PC where my card is cnnected
he dont display me this message (he diplay me this message one time but now when i test my cad he dont dsplay me this message)
Code:
wifly_pass_thru_demo_exp16_p24...
version: 00.01
build date: Nov 27 2014
build time: 17:20:32

use a terminal emulator to communicate directly with the module...

(optional) press S4 on Explorer16 to reset WiFly to factory defaults...

wifly-EZX Ver 4.00.1, Apr 19 2013 11:47:16 on RN-171
MAC Addr=00:06:66:80:74:1b
*READY*
and when i scan he display me the wifi that exist
and when i choice one ofthis wifi and write the password hedsplayme thos mesage error
Code:
set wlan h abir
AOK
<4.00>
set wlan p ***********
AOK
<4.00>

join
Auto-Assoc roving1  chan=0 mode=NONE FAILED
<4.00>
Joining abir now..
ERR
this error because the pcc where are the emulator not connected to wifi because i have this architecture
PC+Explorer16+RN171+terminlEmultor(not conct in wifi)
PC+1wifi+Java(receiver)
thanks in avanc
 
Last edited:

rather than
Code:
set wlan h abir
try
Code:
set wlan ssid abir
to set the SSID with which the module associates.
 
  • Like
Reactions: ings

    ings

    Points: 2
    Helpful Answer Positive Rating
yes th problem is in ssid
i m succedto doing all this instruction but i cant send message
Code:
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
ie after Exit i can't write any instuction
thanks in dvance

- - - Updated - - -

the problm i think tha in
Code:
set ip host 192.168.1.11
AOK
because i forget to put this line
and when i m puttin the IP adress of the receiver(server)
i havethe sae problem and cant write any thing
 

have you set the UDP protocol
Code:
set ip protolcol 1
AOK
<4.00>
get ip
IF=DOWN
DHCP=ON
IP=192.168.1.17:888
NM=255.255.255.0
GW=192.168.1.1
HOST=192.168.1.11:999
PROTO=UDP,
MTU=1
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
<4.00>
exit
EXIT
if yoou do get ip it will show the current configuration
 

hello i m trying with get ip so he display me this value :
Code:
set wlan ssid abir
AOK
<4.00>
Code:
set wlan pass password
AOK
<4.00>
Code:
join
Auto-Assoc abir chan=9 mode=OPEN SCAN OK
<4.00>
Joining air now..
Associated!
DHCP: Start
DHCP in 1842ms, lease=43200s
IF=UP
DHCP=ON
IP=172.21.185.255:2000
NM=255.255.0.0
GW=172.21.0.9

Code:
set ip protolcol 1
AOK
<4.00>
Code:
get ip
IF=UP
DHCP=ON
IP=172.21.185.255:2000
NM=255.255.0.0
GW=172.21.0.9
HOST=0.0.0.0:999
PROTO=UDP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
<4.00>


Code:
set ip host 172.21.0.9
AOK
<4.00>
Code:
set ip remote 999
AOK
<4.00>
Code:
set ip local 2000
AOK
<4.00>
Code:
exit
EXIT

and when i write exit i cant write any other message
like hello wrld
thanks in advance
 

UDP is an unreliable protocol with no gurantee of delivery

I have found if the received signal strength is low UDP does not work

e.g. if I scan and look at the RSSI (third parameter)
Code:
SCAN:Found 3
01,01,-69,02,1104,14,00,00:19:5b:42:d1:3a,horace1
02,01,-60,04,1104,18,00,58:98:35:28:56:7c,test
03,07,-78,00,2104,00,00,00:02:6f:bc:e5:85,Ferry
in this configuration UDP does not work with the horace1 WiFi network but it does work with the Test network (using the same laptop, programs, firewall, etc)
if I move the horace1 router closer to the RN171 the UDP starts to work

what is your RSSI value?

also have you configured the firewall on the receiver PC to accept UDP datagrams on the specified port?
 

the firewll is desactivate;
what can i fond the value of rssi
in your case you are testing the simultion in the same PC;
i tink that the problem is in this line
Code:
set ip host 172.21.0.9
because when i clo=ki ipconfig n my oc (servor)
@ipv4 is 172.21.248.196
and when i try with this adress he diplay me thismessage
Discon from wifinp,LOST-AP
and if you are using the same pc you put
set ip host
but in may case i try with two pc it is true to put
set ip host ..
thansk in advance
 

i'm testing with the same pc but i have the same problm plz here is my all code in emulator can you find with me this error. i thnok the eror iis in theip aadres because my host have this i p @ 0.0.0.0.
is it logik
and with my code in java jut i run my program when i wie my message ello world?
Code:
CMD
scan
<2.45>
SCAN:Found 4
01,09,-78,00,2104,00,00,00:0b:86:c0:4b:60,abir
02,09,-77,08,3104,28,00,00:0b:86:c0:4b:61,edur
03,13,-77,00,2104,00,00,00:0b:86:c0:6f:00,abir
04,13,-77,08,3104,28,00,00:0b:86:c0:6f:01,edur
END:
<2.45> set wlan ssid abir
AOK
<2.45> set wlan p RhLDbP5
AOK
<2.45> join
Auto-Assoc abir chan=9 mode=OPEN SCAN OK
Joining abir now..
<2.45> Associated!
DHCP: Start
DHCP in 11811ms, lease=43200s
IF=UP
DHCP=ON
IP=172.21.185.255:2000
NM=255.255.0.0
GW=172.21.0.9
Listen on 2000
get ip
IF=UP
DHCP=ON
IP=172.21.185.255:2000
NM=255.255.0.0
GW=172.21.0.9
HOST=0.0.0.0:2000
PROTO=TCP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
<2.45> set ip protocol 1
ERR: ?-Cmd
<2.45> set ip protocol 1
AOK
<2.45> get i^p
IF=UP
DHCP=ON
IP=172.21.185.255:2000
NM=255.255.0.0
GW=172.21.0.9
HOST=0.0.0.0:2000
PROTO=UDP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
<2.45> Disconn from abir,LOST-AP

<2.45> get ip
IF=DOWN
DHCP=ON
IP=172.21.185.255:2000
NM=255.255.0.0
GW=172.21.0.9
HOST=0.0.0.0:2000
PROTO=UDP,
MTU=1524
FLAGS=0x7
TCPMODE=0x0
BACKUP=0.0.0.0
<2.45> set ip host  0.0.0.0
AOK
<2.45> set ip remote 999
AOK
<2.45> set ip local 2000
AOK
<2.45> exit
EXIT
and where can i find the value of rssi exactly
when i clik ipconfig in the console
@ ipv4 is 172.21.248.196
thanks in andvance
 

the RSSI is the third parameter (-69 is the case below)
01,01,-69,02,1104,14,00,00:19:5b:42:d1:3a,horace1

is your server 172.21.248.196 behind a organisation's firewall?
in such a case as well as opening you PCs firewall you probably need to talk to the company IT networks staff to open a port in the organisation's firewall (otherwise it will reject incomming packets)
in such cases I specify the IP address of of my server and the ports (TCP and/or UDP) I want them to open

for initial testing I would run the Java UDP server on a local machine so the server and RN171 are on the same local network
when that is working move the server to an external machine
I have never connected the RN171 to a external UDP server but have connected it to a external FTP server
 

my rssi value is -76
i m trying to test in the same pc the connection but i have the sam problem and about the firewll of my pc is desactivate or it is another firewall of the wlan (school for example) where i m conected
so when you put
set ip local
the value of ip is the value of your ip cmputer
and the value ofprot is defined when i run the jav application
 

the RSSI is a measure of signal strength
on my network UDP would not work when the RSSI was -69 it was OK when it was -60
can you move closer to the WiFi router?
I would expect the school to have its own firewall where it is connected to the internet
then each PC then has its own firewall
however, if both your server and the WiFi router the RN171 connects too are on the school's internal network you should be able to connect
 

so in my case it dn't work because he is equal -76
can i test with tcp protocol ,? or i will have the same problem
another questtion when i put join
he siplay me that he is conected to the wiffi o when he can't let me send any mesage so he is not conected to wifi
andit is posible program the card directly and send message hello world with mlabx without using emulator
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top