Microchip
直播中

王慕涛

7年用户 162经验值
私信 关注
[问答]

RN42 PIN码配置问题:已拒绝配置的PIN码

嗨,我使用的RN42蓝牙模块超过9600 UART,RX/TX。我已经能够成功地进入/退出命令模式,配置设备名称,设置认证模式,并配置PIN。为了测试我的配置,我在Android设备上打开一个SPP串口。我可以看到字节发送到和从我的Android设备如预期。我有困难得到一致或可理解的PIN认证行为。以下是我正在观察的序列:1)进入命令MOD2)配置设备名称,认证模式(4),PIN CODE3)退出命令MOD4)尝试从Android应用程序连接到设备:当我输入4、3、2、1.5)打开的串口到RN42时,由于PIN不正确而导致连接被拒绝。手动确认PIN码是否正确。配置读回命令(“‘’”)确认PIN被设置为4、3、2、1。这是我得到的响应:***设置**bta= 000 066 67 f2164btNord= VBU12345 67 8BAUDRT(SW4)=9600模式= SLavaWord= 4PcONod=4321Boeld= 0Erm=No.SET6)通过发送SN,4321再次手动重复引脚配置。7)尝试Android的连接现在成功了。你知道为什么PIN在第一次出现(显然是成功的)配置后被拒绝了吗?在每个命令之后,我检查RN42模块的响应,它看起来正确(AOK,CMD,或根据输入的结束)。

以上来自于百度翻译


      以下为原文

    Hi,

I'm using the RN42 bluetooth module over 9600 UART, RX/TX only.

I've been able to successfully enter/exit command mode, configure device name, set authentication mode, and configure the PIN. To test my configuration, I'm opening an SPP serial port on an Android device. I can see bytes transmitted to and from my Android device as expected.

I am having trouble getting consistent or understandable PIN authentication behavior. Here's the sequence I'm observing:
1) Enter command mode
2) Configure device name, authentication mode (4), PIN code
3) Exit command mode
4) Attempt connection to device from Android app: connection rejected due to incorrect PIN when I enter 4,3,2,1.
5) Open serial port to RN42. Confirm manually that the pin code is correct. The configuration readback command ('D') confirms that the pin is set to 4,3,2,1.

Here's what I get in response:
***Settings***
BTA=0006667F2164
BTName=VBU12345678
Baudrt(SW4)=9600
Mode =Slav
Authen=4
PinCod=4321
Bonded=0
Rem=NONE SET

6) Manually repeat PIN configuration by sending SN,4321 again.
7) Attempt to connect from Android is successful now.

Any idea why the PIN is rejected after (apparently successful) configuration the first time? After every command, I'm checking the response from the RN42 module and it looks correct (AOK,CMD, or END depending on the input).

回帖(1)

杨叶

2018-11-7 15:32:25
你好,你有哪种固件版本?最新的一个是:RN42-I/RM630(V630)

以上来自于百度翻译


      以下为原文

    Hi,
Which firmware version do you have ?
It seems latest one is : RN42-I/RM630   (v6.30)
Regards
 
举报

更多回帖

发帖
×
20
完善资料,
赚取积分