A library for communication with Adafruit BlueSmirf Bluetooth Modem.
Diff: blueSMIRF.h
- Revision:
- 4:c57439dbda24
- Parent:
- 3:b5ecc07f54e1
--- a/blueSMIRF.h Sat Nov 11 12:59:47 2017 +0000 +++ b/blueSMIRF.h Mon Nov 13 11:29:50 2017 +0000 @@ -65,6 +65,13 @@ */ int setDeviceClass(int value); + /** Factory Defaults + * @returns + * 1 on success + * 0 on error + */ + int factoryDefaults(void); + /** Mode * @param mode 0:Slave, 1:Master, 2:Trigger, 3:Auto, 4:DTR, 5:Any * @returns @@ -73,14 +80,30 @@ */ int setMode(int mode); + /** Mode + * @param name of device + * @returns + * 1 on success + * 0 on error + */ + int setName(char * name); + /** Connect/Disconnect Status String - * $param str + * @param str * @returns * 1 on success * 0 on error */ int setStatusString(char * str); + /** Connect/Disconnect Status String + * $param str PinCode + * @returns + * 1 on success + * 0 on error + */ + int setPinCode(char * pinCode); + /** Special Configuration Settings * @param value 0, 4, 8, 16, 128, 256 * @returns @@ -89,6 +112,14 @@ */ int setSpecialConf(int value); + /** This command sets the remote configuration timer + * @param value + * @returns + * 1 on success + * 0 on error + */ + int setConfTimer(int value); + /** GET COMMANDS **********************************************************/ /** Get Basic Settings @@ -192,7 +223,7 @@ /** Connect to Address in Fast Mode */ - void connectAddressFast(int address); + void connectAddressFast(char * address); /** Connect and Immediately Go into Fast Data Mode Using Last Address Found */ @@ -225,7 +256,7 @@ * @param response char array to data to return * @param classCOD is the optional COD of the device class for which you are scanning */ - void deviceScan(int time, char * response, int classCOD); + void deviceScan(int time, char * response, int classCOD = 0); /** Device Scan Inquiry, Returns NAMEs * @param time is the scan time in seconds @@ -331,6 +362,10 @@ /** Flush Serial */ void flushSerial(void); + + /** Set Baud + */ + void setBaud(int baud); private: BufferedSerial serial;