Skip to content

How to change name and pin

Tomáš Kováčik edited this page Sep 10, 2018 · 1 revision

Required HW

Arduino compatible board, capable of running example from this repository.

How to connect

In case of 5V arduino, power module from 5V pin on arduino via silicone diode (1nXXXX) to battery pin of module, this will provide 0.7V drop so module is powered with 4.3V. Connect pin Rx,Tx pins via 3k3 resistor (to provide over voltage protection) specified in serial port used to communicate with module.

SW part

Upload sketch from example directory to arduino.

If debug mode is not implemented in OVC3860.h some command did not output anything, so have DEBUG defined in OVC3860.h is recomanded if using PSKey configuration mode with example from this repository.

Run serial monitor and wait while automatic communication stop, at the start of sketch basic module information are requested. After while type . (dot) and hit enter this will run function to enter PSKey configuration mode, repeat this until "Config Mode!" is writen on serial console, like this:

press h for help
sending AT#MF

sending AT#CY

sending AT#MV

BT Disconnected
Music stoped/paused.
Auto connect Off
AutoConnect Off
Auto answer Off
HFP Disconnected
reseting module
sending raw data: c5c7c7c9d0d7c9d1cd
Config mode!

now you can hit 'h' to show help menu, which tell you this:

read name n
write name N
read pin p
read all PSKeys A
quit config mode q
read baudrate b
setBaudrate:
use B0 for 1200b
use B1 for 2400b
use B2 for 4800b
use B3 for 9600b
use B4 for 14400b
use B5 for 19200b
use B6 for 38400b
use B7 for 57600b
use B8 for 115200b
use B9 for 230400b
use BA for 460800b
use BB for 921600b
read mode m
read class of device c
write class of device C

typing Nnewname and hiting enter will write new name to module eeprom:

Writing name:newname
sending raw data: 31c70106e65776e616d65000000000
received raw data: 41c7010

hiting n will read currently writen name:

Reading name
sending raw data: 11c7010
received raw data: 21c70106e65776e616d65000000000
21 !
C7 ⸮
0
10
6E n
65 e
77 w
6E n
61 a
6D m
65 e
0
0
0
0
0
0
0
0
0

same works for pin: p for reading pin ad P12345678 for seting PIN to 12345678:

Writing pin: 12345678
sending raw data: 31bf083132333435363738
received raw data: 41bf08

Reading Pin
sending raw data: 11bf08
received raw data: 21bf083132333435363738
21 !
BF ⸮
0
8
31 1
32 2
33 3
34 4
35 5
36 6
37 7
38 8

read baudrate did not work for me, but writing it works: B8 set baudrate to 115200 as help stated.

q will end configuration mode and module will return to standard mode.