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.

[SOLVED] Help needed for microchip RN4020 bluetooth module

Status
Not open for further replies.

MUKESH.K.S

Full Member level 1
Full Member level 1
Joined
Jan 31, 2014
Messages
98
Helped
14
Reputation
28
Reaction score
13
Trophy points
1,288
Location
KERALA
Activity points
1,891
Has anyone have experience in using RN4020 module, please help me.
I was trying to configure RN4020 in mldp mode, but it not responding as described in datasheet. When it starts, it sends 'END' and "CMD" on serial terminal. But as per the datasheet it should respond with "MLDP" on serial port when the cmd pin is high. But it always show "END" and "CMD"
This is my code . I am using pic mcu


Code C - [expand]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#define  CMD LATD.B0
 #define  HW LATD.B1
 #define  SW LATD.B2
 
void main() {
 
TRISD=0X00;
ANCON0=0XFF;
ANCON1=0X1F;
TRISC=0X80;
 UART1_Init(115200);
 HW=1;
 SW=1;
 CMD=0;
 
   while(1);
 UART1_Write_Text("SR,20000000");
 UART1_Write_Text("R,1");
  UART1_Write_Text("A");
   CMD=1;
            while(1)
            {
            
            }
 
 
 
 
}

 
Last edited by a moderator:

I cant find MLDP mode in the datasheet

Post your circuit and relevant datasheet
 

THANKS FOR THE REPLY, please check the datasheet
 

Attachments

  • rn4020.pdf
    922.9 KB · Views: 145
  • rn40201.pdf
    1.2 MB · Views: 130

PIN 8 of module connected to microcontroller and made high to enter MLDP mode ? Are you using two RN4020 modules and are both set to MLDP mode ?
 

I am using only one rn4020 module, i want to communicate it with some softwares like blueterm . I have connected pin 8 to high . but it not responding with "MLDP". Also i cant find the device from my phone. How can i make it visible.
 

Page no 96 of the document you posted says.

To use the MLDP service between two RN4020
devices, both devices must enable MLDP with the proper parameters using the “SR”
command. MLDP mode can only be started when two RN4020 modules both have
MLDP enabled and are connected together.
 

Actually i wanted to connect it with my mobile by Bluetooth link and to pc via serial port.so that i can send data from my mobile to pc. Thats why i needed to use mldp mode
 

I don't know whether you can do that or not. Datasheet mentions that both RN4020 devices should be put in MPDP mode and should be connected. Only then you can use MLDP communication.
 

The problem is now solved. The MLDP mode and and pin will only work when the device is connected. Another problem is that it only gets connected with the MLDP terminal app from the Microchip also your phone should require Bluetooth version 4 . I tried with MLDP terminal app. Now its working fine.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top