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
Joined
Jan 31, 2014
Messages
98
Helped
14
Reputation
28
Reaction score
13
Trophy points
8
Location
KERALA
Activity points
607
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:

nandhu015

Advanced Member level 5
Joined
Feb 11, 2006
Messages
1,965
Helped
300
Reputation
600
Reaction score
224
Trophy points
1,353
Location
India
Activity points
9,845
I cant find MLDP mode in the datasheet

Post your circuit and relevant datasheet
 

MUKESH.K.S

Full Member level 1
Joined
Jan 31, 2014
Messages
98
Helped
14
Reputation
28
Reaction score
13
Trophy points
8
Location
KERALA
Activity points
607
THANKS FOR THE REPLY, please check the datasheet
 

Attachments

  • rn4020.pdf
    922.9 KB · Views: 21
  • rn40201.pdf
    1.2 MB · Views: 11

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
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 ?
 

MUKESH.K.S

Full Member level 1
Joined
Jan 31, 2014
Messages
98
Helped
14
Reputation
28
Reaction score
13
Trophy points
8
Location
KERALA
Activity points
607
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.
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
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.
 

MUKESH.K.S

Full Member level 1
Joined
Jan 31, 2014
Messages
98
Helped
14
Reputation
28
Reaction score
13
Trophy points
8
Location
KERALA
Activity points
607
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
 

milan.rajik

Banned
Joined
Apr 1, 2013
Messages
2,528
Helped
540
Reputation
1,078
Reaction score
524
Trophy points
1,393
Activity points
0
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.
 

MUKESH.K.S

Full Member level 1
Joined
Jan 31, 2014
Messages
98
Helped
14
Reputation
28
Reaction score
13
Trophy points
8
Location
KERALA
Activity points
607
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

Top