BLE5101 NICERF-WIRELESS-TECHNOLGY | Alldatasheet

Document overview

  • Manufacturer or author: Provided By alldatasheet.com(free datasheet download site)
  • PDF pages: 28

Technical content

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 2 - sales@nicerf.com Catalogue

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 3 - sales@nicerf.com Note:RevisionHistory Revision Date Comment V1.0 2021-7 Firstrelease V1.1 2021-11 ModifiedsomeATcommandsandtheirfunctions

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 4 - sales@nicerf.com 1. Overview 1.1ProductIntroduction BLE5101 is a Bluetooth-to-serial transceiver module based on Bluetooth protocol version 5.1, coexistence of master and slave roles, small size, low power consumption, and the working signal frequencybandis2.4GHz. TheBLE5101moduleisdevelopedbyShenzhenNiceRFWirelessTechnologyCo.,Ltd.Themodule supports the coexistence of master and slave roles, can connect to the master and slave at the same time, and can flexibly set the number of master and slave connections, and can support up to 20 connections. Maximum support for data transmission at 115200bps baud rate. The module usesAT commandstosetparameters,andtheoperationissimpleandeasytouse.Modulescanbewidelyused in smart wear, smart home, automobiles, lighting, smart automation data collection, smart control, wirelesssensing,electronictagsandotherscenarios. Module CE FCC Shield BLE5101 Yes Yes Yes 1.2Features  SupportBluetoothBLE5.1protocol  Supportthecoexistenceofmasterandslave roles,andcanconnectmultiplemastersand slavesatthesametime,upto20connections  Support 2 working modes of configuration andtransparenttransmission  Supportover-the-airupgrade(OTADFU)  Support multiple serial port parameter configuration  Supportautomaticbroadcasting,scanning, connection  Support manual connection and automatic connection2connectionmethods  ThemaximumMTUis247bytes  Supportcustom16-bitUUID,includingone Service uuid and two Characteristic uuid, which can be flexibly configured and compatiblewithsimilarBLEproducts  Maximum communication distance 150m (10dBm,1mbps)  Support custom modification of the local macaddress  Support mac address binding, up to 8 devices(regardlessofmasterandslave)  Supportlowpowersleep 1.3Application  Wirelessmeterreadingwirelesssensor  Smarthome  Industrialremotecontrol,telemetry  Smartbuildings,smartbuildings  Automateddatacollection  Healthsensor  Smartwearabledevice  Wirelesssensing  Electronictags  Intelligentcontrol

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 5 - sales@nicerf.com 2. Precautionsforuse 2.1BLEdescription 2.1.1MTU Referstothe payload size ofBLE airsingle packet data.The MTU ofthe BLE4.0/4.1 protocol is27 bytes, which can be expanded to 251 bytes from the MTU of BLE4.2 and higher. In actual use, the single packet data is MTU-3, that is, the user can send a maximum of 24 bytes using BLE4.0/4.1 protocolsinglepacket,andBLE4.2andhigherversionscanbeexpandedto247bytes. Itshouldbenotedthatinactualapplications,theMTUofdifferentdeviceswillbedifferent. 2.2Precautionsformoduleapplication 2.2.1Judgmentconditionsfortheroleofmasterandslave When the module actively scans and connects to other Bluetooth devices, the module assumes the role of the master in this connection; when the module is connected by other Bluetooth devices due tobroadcastingitself,themoduleactsastheslaveinthisconnection. 2.2.2Responseofdistancetodatatransmissionrate The module uses PCB antenna. Compared with ceramic antennas, BLE wireless signals have stronger transmitting and receiving capabilities with external antennas. Nevertheless, the data transmissionspeedofthemodulewillstillbeattenuatedduetotheincreaseindistance. 2.2.3Moduledatatransmissionspeedchanges The data transmission speed of the module will decrease as the distance increases.And because the module sends data in the form of pollingconnections,when there are multiple connections, the total data sending time will vary due to the distance and the number of connections. In the case of multipleconnections,itisrecommendedtoaddacertaindelaybetweeneachpacketofdata. 2.2.4Modulecurrentmaybetoohighinlowpowerconsumptionmode When the module is connected, the connection will remain undisconnected in low power consumption mode, so the current of the module may be slightly higher, but it is always less than 100uA.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 6 - sales@nicerf.com 3. ElectricalCharacteristics Parameter Min. Typ. Max. Unit Condition OperationConditions Workingvoltagerange 1.71 3.3 4.3 V Operatingtemperature range -40 60 ℃ CurrentConsumption Receivecurrent 7.1 mA Emissioncurrent 7.4 mA Sleepcurrent ≦fgf <7.5 uA Idlecurrent 《 <6.58 mA Idlestate:referstonoconnection, nobroadcasting/scanningofthe module RFParameter FrequencyRange 2400 2483.5 MHz Transmitpower -16 10 dBm Receivingsensitivity -95 dBm 4.Pindefinition PinNO. Pinname I/O Pinfunction Description 1,9 GND GND Powerground

2 NC Danglingfeet

3 SWCLK SWCLK/GPIO

ConnecttointernalIO,usedtoburnprogram,itcanbe usedasnormalIOwhenrunning

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 7 - sales@nicerf.com

4 SWDIO SWDIO/GPIO

ConnecttointernalIO,usedtoburnprogram,itcanbe usedasnormalIOwhenrunning

5 PA00 I CS

ModulesleeppinCS(lowlevelwork,highlevelsleep, defaulthighlevel)

6 PA1 I SET

ModuleconfigurationpinSET(highlevelduring normalcommunication,enterconfigurationmode whenSETpinispulledlow,defaulthighlevel)

7 PD5 O USART1_TX

ModuleserialdatatransmissionpinTXD(level voltageisupto3.3V)

8 PD4 I USART1_RX

ModuleserialdatareceivingpinRXD(levelvoltage upto3.3V)

10 VCC

VCC Connecttothepositivepoleofthepowersupply (1.71-4.3V)

11 PD7

O CS_DETECTION Sleep status indicator pin (low level when sleeping, high levelwhenworking)

12 RESET

I RESET Module reset pin, high level reset, there is a pull-down resistorinside.

13 PD6

O MODE_DETECTION Working status indicator pin (high-level output is broadcaststate,low-leveloutputisnon-broadcaststate)

14 PC5 I/O PC5 GPIO

15 PA3 I/O PA3 GPIO

16 PA2 I/O PA2 GPIO

17 PA7 I DISC

Bluetoothconnectionenablepin,pulldownto disconnectBluetoothconnection,defaulthighlevel

18 PA6 I/O PA6 GPIO

19 PA4 I/O GPIO GPIO

20 PA5 O SET_DETECTION

Highlevel=Transparenttransmissionmode Lowlevel=ATconfigurationmode

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 8 - sales@nicerf.com 5. Typicalapplicationcircuit 6.Mechanicalsize(unit:mm)

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 9 - sales@nicerf.com 7.FunctionDescription 7.1Roledescription The module supports three roles: master, slave, and master-slave coexist. These three types can be modifiedbysendingATcommandAT+CONS. The module supports up to 20 connections, supports transparent transmission, and supports manual andautomaticconnections. 7.1.1Host  Command AT+CONS=x,y. When the value of y is greater than 0, the host role is enabled andthescanningfunctioncanbeused.  In configuration mode, send command AT+SCAN to start scanning, which is used to manuallyconnecttotheslave;  In the transparent transmission mode, the module will automatically scan the connected slaves.  Supports one-master and multiple-slave connections.The maximum number of connections dependsontheAT+CONScommand,andthemaximumnumberisnotmorethan20.  Whenthenumberofconnectedslavesreachestheset maximumvalue,themodulewillstop scanningandallscanningfunctionswillbeinvaliduntilanyslaveisdisconnected. 7.1.1.1Hostconnectionstrategy ThemodulefiltersbroadcastpacketsbyserviceUUID. UUID filtering is based on the content filtering configured byAT+UUID, and this condition cannot beclosed. The module will analyze the scanned broadcast packet during scanning. If the broadcast packet contains Service UUID and the UUID is the same as the Service UUID of the module itself, the module will automatically initiate a connection. After the connection is established, the module as the host role will try to read the Characteristic UUID under the Service UUID of the peer device. If themoduledoesnotreadtheServiceUUIDandtheCharacteristicUUIDunderit,ortheUUIDvalue readdoesnotmatchthemoduleitself,themodulewillautomaticallydisconnectitsconnection. Thisfilterconditionappliestomanualconnectionandautomaticconnection.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 10 - sales@nicerf.com 7.1.2Slave  CommandAT+CONS=x,y. When the value of x is greater than 0, the slave role is enabled andthebroadcastfunctioncanbeused.  SendcommandAT+MODE=Ainconfigurationmodetostartbroadcasting.  Inthetransparenttransmissionmode,themodulewillautomaticallybroadcastitself.  Support one-slave multi-master connection. The maximum number of connections depends ontheAT+CONScommand,andthemaximumnumberisnotmorethan20.  The broadcast content includes the device name, mac address, and Service UUID required fortransparentdatatransmission.  When the number of connected hosts reaches the set maximum value, the module will stop broadcasting itself, and all broadcasting functions will be invalid until any host connection is disconnected. 7.2Powermode Themodulesupports2powermodes:lowpowerconsumptionmodeandwake-upmode. 7.2.1Lowpowermode Lowpowerconsumptionmodemeansthat whenthemoduleentersthismode,theBLE functionwill continue to run, turn off some peripherals, stop broadcasting and scanning, in order to minimize the powerconsumptionofthemodulewhenitisrunning. Howtoenterthelow-powermode:pulluptheCSpin,whentheindicatorpinispulledlow,itmeans thatithasenteredthelow-powermode. Howtoexitthelow-powermode:pulldowntheCSpin. In low-power mode, when there is an undisconnected connection, such as the module receives data from the opposite end, or when the connection status changes, the module will temporarily wake up and process related tasks.After thetask iscompleted, the module will enter immediatelywhen there isnotasktemporarily.Sleep. 7.2.2Wakemode Wake-up mode refers to the state when the module is operating normally outside of the low-power mode,andallperipheralsandfunctionsareoperatingnormally. Howtowakeup:pulldowntheCSpin.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 11 - sales@nicerf.com 7.3Datatransparenttransmission Datatransparenttransmissionmeansthatthedatareceivedbytheserialportissenttothepeerdevice viaBLE without anyprocessing, orthedata receivedbyBLE isoutputtotheserial port withoutany processing. All data is transmitted in ASCII format. The module sends the data to every connected Bluetooth device through polling connection when the data is transparently transmitted. Under extreme conditions,itcannotbeguaranteedthateverydevicewillreceivethedata. Donotonlysendthedata"+++\\r\\n" within50msduringdatatransparent transmission,otherwise the modulewillentertheconfigurationmodeduetomisoperation. 7.4UUIDdescription TheUUIDvalueslistedinthetablecanbemodifiedbyATcommands,exceptforUUIDattributes. 7.5Connectionhandle 1. Normally, the connection handle of the module is the number of the specified link (0-19). In principle,thehandleofthemoduleconnectionmaynotbethesameeachtime. 2. In the case of a multi-master and multi-slave connection, each module on the connection handle mayhaveamasterroleoraslaverole,dependingontheconnection. 3.ThedesignatedlinkcanbeoperatedthroughATcommands. 7.6Airupgrade(OTADFU) The module supports over-the-air upgrade of firmware, and the best functional experience can be obtainedthroughover-the-airupgrade.Userscanalsocustomizethefirmwaretheyneed. Forspecificupgradesteps,pleaserefertoChapter9QuickUse. ServiceUUID FFF0 CharacteristicUUID UUID Attributes Description FFF1 Read/Notify Theslavesends,thehostreceives thedatachannel FFF2 Write/Writeno response Thehostsendsandtheslave receivesdatachannels

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 12 - sales@nicerf.com 8.ATcommand Themodule mustenter theconfigurationmode tosendATcommands, otherwisethe commandswill notrespond. 8.1Instructions  AllATcommandsaretransmittedinASCIIformat.  The"\\r\\n"appearingintheATcommandsetareallcarriagereturnandlinefeedcharacters.  Command sending format:All commands begin with "AT" and end with "\\r\\n". Commands mustbecapitalizedexceptforparameters.  Command return format: return the relevant string corresponding to the sent command, all endingwith"\\r\\n".  ThesendingintervalofeachATcommandshouldbemorethan50ms.  Entering the configuration modewill temporarily disable the low power consumptionmode (CSpinfunctionisinvalid).  In the configuration mode, in order to prevent data interference, the data sent from other deviceswillnotbedisplayed.  Whenever the command response is successful (that is, when the command success response returns OK), the program will start a 500mstimer,and after the time isup, theAT command data that can be saved at power-off will be automatically saved in the internal Flash,sowhenyousetthecommandTrytoavoidsuddenpowerfailure. 8.2Howtoenterandexitconfigurationmode 1)Howtoenter: 1. In the transparent transmission mode, "+++\\r\\n" is sent separately within 50ms. In the configuration mode entered in this way, the serial port parameter configuration is the same as the transparenttransmissionmode. 2. The transparent transmission mode pulls down the SET pin. In the configuration mode enteredinthisway,theserialport parameterswillbereconfigured(115200bps,8databits,1stopbit, Noneparity). 2)Howtologout: 1. Sendthecommand"AT+EXIT\\r\\n"inconfigurationmode.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 13 - sales@nicerf.com 2. PullhighwhentheSETpinislow. 3. Whenexitingtheconfigurationmode,theserialportparameterswillberestoredtothesame configurationasthetransparenttransmissionmode. 8.3Errorcode When the command sent does not meet certain conditions, the module will return an error in the format"+ERROR=<Errornum>\\r\\n". 8.4Statusprinting Theserialportwilloutputstatusduringsomeoperations. Error num Description Wrongreason Solution -1 Instructiondoesnot exist ATcommandcharacters arewrong CheckATcommandstringformat -2 Notconnected Noconnectionis establishedbythemodule Theslavesends,thehostreceivesthe datachannel Themaximumnumber ofhostconnectionshas beenreached Thenumberofhosts connectedtothemodule hasreachedthemaximum valueortheDISCpinis pulledlow Modifythenumberofconnectable hoststhroughthecommand AT+CONS;checkwhethertheDISC pinishigh Themaximumnumber ofslaveconnections hasbeenreached Thenumberofslaves connectedtothemodule hasreachedthemaximum Modifythenumberofconnectable slavesbycommandAT+CONS -5 Parametererror Thecommandformatis wrongortheparameteris notwithinthevaluerange Comparetheinstructiontodetermine theinstructionformatandvaluerange -6 Busy Themoduleisexecutingan instruction Waitfortheinstructionoperationto complete -7 Linkdoesnotexist Themoduledoesnothave aconnectionhandle correspondingtothelink number Operateotherlinknumbersorwaitfor thelinknumbertobeusedbefore operating -8 Thebounddeviceis full Alldeviceswithbinding recordsareconnected -9 Failedtoenterupgrade mode Themoduleisnot configuredinIDLEstatein advance SendAT+MODE=Icommandbefore enteringupgrademode

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 14 - sales@nicerf.com

8.5 ATcommandset

8.5.1Testinstruction 8.5.2AT+FLASHSaveinstruction 8.5.3AT+RESETResetcommand Status Printinformation Connectionsucceeded Establishaconnection asahost \\r\\n[SLAVECONNECT]\\r\\n Establishaconnection asaslave \\r\\n[MASTERCONNECT]\\r\\n Disconnect Thepeerdeviceasthe host \\r\\n[MASTERDISCONNECT]\\r\\n Thepeerdeviceacts asaslave \\r\\n[SLAVEDISCONNECT]\\r\\n Enterconfigurationmode \\r\\n[ENTERATMODE]\\r\\n Exitconfigurationmode \\r\\n[EXITATMODE]\\r\\n Enterlowpowermode \\r\\n[ENTERSLEEP]\\r\\n Exitlowpowermode \\r\\n[EXITSLEEP]\\r\\n instruction response AT OK Description:None instruction response AT+FLASH OK Description AfterEffectiveimmediately,themoduleresetsandrestarts immediately. instruction response AT+RESET OK

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 15 - sales@nicerf.com 8.5.4AT+DEFAULTReset 8.5.5AT+VERSIONQuerythefirmwareversionnumber 8.5.6AT+NAMEModifymodulename Note:Aftersendingthiscommand,themodulewillrestorethedatatothedefaultparametersandrestart automatically. Thedefaultvalueoftheparametercanbeset: AT+NAME:BLE5101 AT+MAC:65:12:6e:1b:4a:32 AT+UART:8,1,0,0 AT+TXPOWER:0 AT+ADVINT:0 AT+UUID:FFF0,FFF1,FFF2 AT+CONS:10,10 AT+ENATMODE:1 instruction response AT+DEFAULT OK Note:Aftersendingthiscommand,themodulewillrestorethedatatothedefaultparametersand restartautomatically. Thedefaultvalueoftheparametercanbeset: AT+NAME:BLE5101 AT+MAC:65:12:6e:1b:4a:32 AT+UART:8,1,0,0 AT+TXPOWER:0 AT+ADVINT:0 AT+UUID:FFF0,FFF1,FFF2 AT+CONS:10,10 AT+ENATMODE:1 instruction response AT+VERSION? +VERSION=<param> Description <param>:modulefirmwareversionnumber instruction response

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 16 - sales@nicerf.com 8.5.7AT+MACModifythelocalMACaddressofthemodule

8.5.8 AT+UART Modify the serial port parameters of the module's transparent

Inquire AT+NAME? +NAME=<param> Setup AT+NAME=<p aram> OK Description <param>:devicenamestring,nomorethan16characters Defaultvalue:BLE5101 instruction response Inquire AT+MAC? +MAC=<param> Setup AT+MAC=<par am1> OK

Description

<param>:themacaddressofthedevice <param1>:Themacaddresstobemodified,butwithoutasemicolon Defaultvalue:65:12:6e:1b:4a:32 Note:Ifthereisnoconnectiontothemodulewhenthemacaddressismodified,the modulewillimmediatelychangeitsmacaddresstoapplytothenextBluetooth connection. (Onlyvalidduringcurrentoperation.IfyoudonotsendAT+FLASHcommandto save,themodulewillstillusetheoriginalmacaddresswhenitispoweredonnext time) Example Send:AT+MAC=aabbcc112233\\r\\n Return:OK\\r\\n Description:Modifythelocalmacaddresstoaa:bb:cc:11:22:33 instruction response Inquire AT+UART? +UART=<param>,<param1>,<param2>,<param3> Setup AT+UART=<param>, <param1>,<param2>, <param3> OK Parameter Description Ranges <param> Serialportbaudrate 1:2400bps 2:4800bps 3:9600bps 4:14400bps

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 17 - sales@nicerf.com 8.5.9AT+TXPOWERmodifythetransmitpowerofthemodule 8.5.10AT+ADVINTModifythebroadcastinterval 5:19200bps 6:38400bps 7:57600bps 8:115200bps(default value) <param1> Databit 0:7bits 1:8bits(defaultvalue) <param2> CheckDigit 0:NONE(defaultvalue) 1:EVEN 2:ODD <param3> Stopbit 0:1bit(defaultvalue) 1:2bit Note:Modifyingtheserialportparameterswilltakeeffectimmediatelyinthe transparenttransmissionmode,butifyoudonotsendtheAT+FLASHcommandto save,themodulewillstillusetheoriginalserialportparameterswhenitispowered onnexttime. instruction response Inquire AT+TXPOWER? +TXPOWER=<param> Setup AT+TXPOWER= <param> OK <param>: 0:10dbm(defaultvalue) 1:6dbm 2:3dbm 3:0dbm 4:-3dbm 5:-7dbm 6:-10dbm 7:-16dbm instruction response Inquire AT+ADVINT? +ADVINT=<param> Setup AT+ADVINT= <param> OK <param>: 0:50ms(defaultvalue) 1:100ms

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 18 - sales@nicerf.com 8.5.11AT+UUIDModifyserviceUUID 8.5.12AT+CONSModifythenumberofconnectabledevices 8.5.13AT+ENATMODEModifythemodulepower-ondefaultmode 2:200ms 3:500ms 4:1000ms 5:2000ms instruction response Inquire AT+UUID? +UUID=<param>,<param1>,<param2> Setup AT+UUID=<param>, <param1>,<param2> OK <param>:ServiceUUID <param1>:CharacteristicUUID(read,notify) <param2>:CharacteristicUUID(write,writenoresponse) Valuerange:0000-FFFF Defaultvalue:FFF0,FFF1,FFF2 instruction response Inquire AT+CONS? +CONS=<param>,<param1> Setup AT+CONS=< param>,<para m1> OK <param>:thenumberofmastersthatcanbeconnected,andthemoduleactsasaslave; <param1>:Thenumberofslavesthatcanbeconnected,andthemoduleservesasthe master. Themaximumnumberofmodulesthatcanbeconnectedis20,so<param>+<param1> <=20.When<param>=0,themodulewillbedisabledasaslaveandcannotuseany broadcastfunction;when<param1>=0,themodulewillbedisabledasamasterand cannotuseanyscanningandactiveconnectionfunctions.Throughthiscommand,the numberofconnecteddevicesofthemodulecanbeflexiblyadjusted. Example Command:AT+CONS=0,<x>\\r\\n Return:OK\\r\\n Description:Setthemoduleasonemasterandmultipleslaves.<x>canbeanyinteger from0to20.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 19 - sales@nicerf.com 8.5.14AT+MODEModifythestatusinthemoduleconfigurationmode 8.5.15AT+SCANModulescaninstruction instruction response Inquire AT+ENATMODE ? +ENATMODE=<param> Setup AT+ENATMODE =<param> OK <param>: 0:Theconfigurationmodeisnotenteredbydefaultwhenpoweringon,andthemodule willautomaticallyscan,broadcast,andconnecttodevices; 1:Entertheconfigurationmodebydefaultwhenpoweringon(defaultvalue) instruction response Inquire AT+MODE? +MODE=<param> Setup AT+MODE=<par am> OK <param>: I:IDLEstate,themoduleisnotconnectedinthisstate,andnobroadcastingorscanning operationsareperformed S:STATICstate,themoduleremainsconnectedinthisstate,butdoesnotdobroadcast andscanoperations A:ADVERTISINGstate,themodulecontinuestodobroadcastoperationsinthisstate C:CONNECTINGstate.Inthisstate,themodulewilltrytoscanandconnecttothe devicewiththebindingrecord. U:UPDATEstatus,usedforairupgrade. Note:Whenenteringtheconfigurationmode,ifthemoduleisnotconnected,thedefault isIDLEstate,ifthereisaconnection,itisSTATICstate.TheIDLEstatusandSTATIC statuswilldynamicallychangedependingonthenumberofconnectionsestablishedby themodule.AfterenteringtheUPDATEstate,themodulewillonlyacceptthetwo commands"AT+MODE?\\r\\n"and"AT+MODE=I\\r\\n". instruction response AT+SCAN Aftersendingthiscommand,themodulewillenterthescanningstatefor10seconds, andprintoutallthescanneddeviceinformation.Upto10deviceinformationcanbe printed.Inthisstate,someATcommandscannotbeused.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 20 - sales@nicerf.com 8.5.16AT+CONAConnectBluetoothdevicethroughmacaddress 8.5.17AT+SENDsendsdatatoasingledevicethroughthelinknumber Sendthiscommandagaininthisstatetoendthescanearlier. Example Command:AT+SCAN\\r\\n Return:OK\\r\\n SCANS\\r\\n +SCAN:address:11:22:33:44:55:66type:0rssi:77\\r\\n +SCAN:address:aa:bb:cc:dd:ee:fftype:1rssi:88\\r\\n ... +SCANE\\r\\n Description:Scanexample.addressisthemacaddressofthescannedmodule;typeis thetypeofthemodulemacaddress;rssiisthesignalstrengthoftheoppositemodule. Command:AT+SCAN\\r\\n Return:OK\\r\\n SCANS\\r\\n +SCAN:address:11:22:33:44:55:66type:0rssi:77\\r\\n Command1:AT+SCAN\\r\\n--scancommandtobesentagainhalfway +SCANSTOP\\r\\n +SCANE\\r\\n Note:Anexampleofinterruptscanning,a+SCANSTOPresponsewillbereturned whenthescanningendsearly. instruction response AT+CONA=<param>,<param1> OK <param>:themacaddressoftheBluetoothdevicetobeconnected <param1>:ThemacaddresstypeoftheBluetoothdevicetobeconnected Note:Thiscommandistoscanfirstandthenconnect.Ifthedeviceisnotscanned,the modulewillnotconnect.Thiscommandmayfailtoconnect. Example Command:AT+CONA=112233445566,0\\r\\n Return:OK Description:Asahost,trytoestablishaconnectionwithaBluetoothdevicewithaMac addressof11:22:33:44:55:66andanaddresstypeof0. instruction response AT+SEND=<param>,<param1> OK

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 21 - sales@nicerf.com 8.5.18AT+SENDSenddatatoasingledevicethroughthelinknumber 8.5.19AT+BONDSendabindingrequesttoasingledevicethroughthelinknumber 8.5.20AT+DISCDisconnectBluetoothconnectionbylinknumber <param>:linknumber <param1>:Digitalparameter,whichrepresentsthetotalnumberofbytesofdatasent, andthemaximumdoesnotexceed2048. Function:Turnonone-waydatatransparenttransmissionandsenddataofspecified length Afterreceivingthiscommand,returntothenewlinefirst,andthenstarttoreceive serialportdata.Thedatalengthsenteachtimewillbeaccumulated.Whenthe accumulateddatalengthisfull<param1>,orsend"+++\\r\\n"inasinglepacketWhen thetimeorthespecifiedlinkisdisconnected,theone-waydatatransparenttransmission willend.Atthistime,youcancontinuetosendATcommandstoconfigure Example Fordetails,pleasereferto8.1.4Sendingdatatoasinglelink instruction response AT+SEND=<param>,<param1> OK <param>:linknumber <param1>:Thesentdata.Thecontentcontainedinasetofdoublequotationmarks. Thecontentsentcanonlybeanycombinationofnumbers,letters,andpunctuation(up to50bytes,itisrecommendedtousetheserialportwhenthebaudrateishigh). Example Command:AT+SEND=1,"1234abcd"\\r\\n Return:OK Description:Senddata1234abcdtothepeerdevicewiththelinknumber1. instruction response AT+BOND=<param> OK <param>:linknumber Note:Eachmodulecanstoreupto8devicebindingdata(regardlessofmasterand slave).Iftherearemorethan8,thebindingrequestinitiatedwillbeinvalid. Afterthebindingissuccessful,morereliabledatatransmissioncanbeobtained. instruction response

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 22 - sales@nicerf.com 8.5.21AT+READBONDReadbounddeviceinformation 8.5.22AT+CLRBONDDeletebindinginformation AT+DISC=<param> OK <param>:linknumber Aftersuccessfuldisconnection,theserialportwilloutputstatus.Note:Ifyoudonot enterthelinknumber,itwillberegardedasdisconnectingallconnections Example Command:AT+DISC=1\\r\\n Return:OK\\r\\n Note:DisconnecttheBluetoothconnectionwithlinknumber1. Command:AT+DISC=\\r\\n Return:OK\\r\\n Note:DisconnectallBluetoothconnections instruction response AT+READBOND Description Aftersendingthiscommand,themodulewilloutputallbounddeviceinformation,up to8devices. Example Command:AT+READBOND\\r\\n Return:+REBOND=address:112233445566,type:0\\r\\n +REBOND=address:aabbccddeeff,type:0\\r\\n ... OK\\r\\n instruction response AT+CLRBOND=<param>,<param1 > OK <param>:Themacaddressofthebindinginformationtobedeleted <param1>:macaddresstype Ifyoudonotenter<param>and<param1>,allbindinginformationwillberegarded asdeleted. Example Command:AT+CLRBOND=112233445566,0\\r\\n Return:OK\\r\\n Description:Deletethebindinginformationofthedevicewhosemacaddressis 11:22:33:44:55:66 Command:AT+CLRBOND=\\r\\n Return:OK\\r\\n Description:Deleteallbindinginformation

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 23 - sales@nicerf.com 9.Quickguide 9.1Quicktouse 9.1.1Environmentalpreparation Hardware:2BLE5101modules Software:SSCOMserialdebuggingassistant Note:SincetheCSpinofthemoduleishighbydefault,andthelow-powermodeisactivehigh,itis necessarytopulldowntheCSpininadvancetouseallthefunctionsofthemodulenormally. When the module is used for the first time, it enters the configuration mode by default.You need to use the AT+MAC command to modify the module's own mac address to ensure that the module's macaddressisunique.Themodulecannot activelyconnect toaBluetoothdevicewiththesamemac addressasitsown. 9.1.2Autoconnect When the module is powered on, it enters the configuration mode and sends the command "AT+EXIT\\r\\n" to exit the configuration mode. When both modules are in the transparent transmission mode, the Bluetooth connection will be automatically established.After the connection isestablished,datacanbetransmittedtransparently.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 24 - sales@nicerf.com 9.1.3Manuallyconnect Whenthemoduleisintheconfigurationmode,it isidleand doesnot perform broadcast orscanning operations.Atthistime,manualconnectioncanbeused. Send the command "AT+MODE=A" to moduleAto start broadcasting, and then send the command "AT+SCAN"tomoduleBtostartscanning.ModuleBwillscanandprintoutthedeviceinformation ofModuleA. Sendtheconnectionestablishment commandAT+CONAtomoduleB andwait fortheconnectionto be established. After the connection is successfully established, send the command "AT+EXIT" to bothmodulestoexittheconfigurationmode,andthenthedatacanbetransparentlytransmitted. 9.1.4Senddatatoasinglelink Afterconfirmingthelinknumber,sendAT+SENDcommandinconfigurationmodetostart one-way transparenttransmission. Datavolumewillbeaccumulatedwhensendingdata

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 25 - sales@nicerf.com Whentheaccumulatednumberofbytessentreachesthepresetmaximumvalue,theone-way transparenttransmissionends.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 26 - sales@nicerf.com Whenasinglepacketsendsaspecificcharacterstring"+++\\r\\n",theone-waytransparent transmissionisendedearly 9.2Airupgrade 9.2.1Environmentalpreparation Hardware:1BLE5101module Software: SSCOM serial port debugging assistant, 1 firmware to be upgraded, mobile phone app "Fr8010OTA" 9.2.2Upgradesteps  Ifthemoduleisintransparenttransmissionmode,sendthecommand"+++\\r\\n"tothemoduleor pulldowntheSETpintoentertheconfigurationmode.  Make sure that the module is not connected to other Bluetooth devices and the module is in IDLE state. If yes, send the command "AT+MODE=I\\r\\n" to disconnect all Bluetooth connections.  Sendthecommand"AT+MODE=U\\r\\n"toentertheupgrademode.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 27 - sales@nicerf.com  Openthemobilephoneapp"Fr8010OTA",youcanseeadevicename"OTA-xxxxx"inthescan result,clickconnect.  Aftertheconnectionisestablished,selectthefirmwarefileforupgrading,andthenclickWrite.

www.nicerf.com BLE5101 NiceRF Wireless Technology Co., Ltd. Rev 1.1 - 28 - sales@nicerf.com  After the firmware file is transferred, the module will automatically restart, and the firmware upgradeisnowcomplete.