Package: bleuio
Python library v1.3.1 for BleuIOSupports BleuIO v.2.3.0 or laterNOTE: Does not support 2.2.0 or earlier version of BleuIO firmwareChanges1.3.1Added support for SUOTA commands introduced in BleuIO fw version 2.4.0Fixed a bug when running on MacOS where the serial responses sometimes are returned in two parts instead of just one. The library expected one but can now handle two or more.1.3.0Added support for commands introduced in BleuIO fw version 2.2.2 and 2.3.0Fixed a bug where the BLE status variables for connection wasn't updated properly.Increased the time trying to connect to the selected Dongle COM port before aborting.1.2.0Supports and makes use of the new Verbose mode introduced 2.2.1InstructionsInstall the library by running:pipinstallbleuioIn the python file import:frombleuio_lib.bleuio_funcsimportBleuIOHere is an example on how to get started:# (C) 2023 Smart Sensor Devices ABimporttimefromdatetimeimportdatetimefrombleuio_lib.bleuio_funcsimportBleuIO# Description# This is an example script that showcase how to get started with the BleuIO library for Python.# It will show how to setup callback functions for scan results and events.# How to send a command and what responses you get and how you can handle them.# How to start and stop a scan.# How to start and stop advertising.# How to check the BLE Status of the dongle.# Creating a callback function for scan results. For this example we just prints out the result.# Here you can add your code to parse the data.defmy_scan_callback(scan_input):print("\n\nmy_evt_callback: "+str(scan_input))# Creating a callback function for events. For this example we add a timestamp and just prints out the event.# Here you can add your code to parse the data.defmy_evt_callback(evt_input):cbTime=datetime.now()currentTime=cbTime.strftime("%H:%M:%S")print("\n\n["+str(currentTime)+"] my_evt_callback: "+str(evt_input))# Start# Initiates the dongle. If port param is left as 'auto' it will auto-detect if BleuIO dongle is connected.# :param port: str# :param baud: int# :param timeout: int# :param debug: bool# Auto-Detect donglemy_dongle=BleuIO()# Specific COM port (Win) 'COMX'# my_dongle = BleuIo(port='COM7')# Specific COM port (Linux) 'dev/tty.xxxxx...'# my_dongle = BleuIo(port='/dev/tty.123546877')# Specific COM port (Mac) 'dev/cu.xxxx...'# my_dongle = BleuIo(port='/dev/cu.123546877')# Registers the callback functions we created earlier.my_dongle.register_evt_cb(my_evt_callback)my_dongle.register_scan_cb(my_scan_callback)print("Welcome to Test BleuIO Python Library!\n\n")# Here we send a simple AT Command. All commands will return a BleuIORESP obj.# The object have 4 attributes:# Cmd: Contains the command data.# Ack: Contains the acknowledge data.# Rsp: Contains the response data.# End: Contains the end data.at_exemple=my_dongle.at()# The attributes are in JSON format. Here we we print the different attributes.print(at_exemple.Cmd)print(at_exemple.Ack)print(at_exemple.Rsp)# Not every ccommand has a Response message, AT for example doesn't so this will return an empty listprint(at_exemple.End)print("\n--\n")# We can try with the ATI command, it has information in the Response message.# An AT command can have several response messages so it will return a list of JSON objectsati_exemple=my_dongle.ati()print(ati_exemple.Cmd)print(ati_exemple.Ack)print(ati_exemple.Rsp)print(ati_exemple.End)print("\n--\n")# If we only want to see if the was successful we can do like this:print("Err: "+str(ati_exemple.Ack["err"]))# orprint("errMsg: "+str(ati_exemple.Ack["errMsg"]))# Here is an example on how to scan.# First we need to put the dongle in Central or Dual Gap Rolemy_dongle.at_dual()# Now we start scanningresp=my_dongle.at_gapscan()print(resp.Cmd)print(resp.Ack)print(resp.Rsp)print(resp.End)# We can either send in a timeout as a parameter for the at_gapscan() command or stop the scan when we're done.# Here we just set a three second sleep then stop scan.# Notice that all the scan data will be printed by our my_scan_callback() function.time.sleep(3)print("stop scan")my_dongle.stop_scan()print("\n--\n")# The BLEStatus class can help you keep track of if you are currently advertising for example.# """A class used to handle BLE Statuses# :attr isScanning: Keeps track on if dongle is currently scanning.# :attr isConnected: Keeps track on if dongle is currently connected.# :attr isAdvertising: Keeps track on if dongle is currently advertising.# :attr isSPSStreamOn: Keeps track on if dongle is currently in SPS stream mode.# :attr role: Keeps track of the dongle's current GAP Role.# """print("isScanning: "+str(my_dongle.status.isScanning))print("isConnected: "+str(my_dongle.status.isConnected))print("isAdvertising: "+str(my_dongle.status.isAdvertising))print("isSPSStreamOn: "+str(my_dongle.status.isSPSStreamOn))print("role: "+str(my_dongle.status.role))print("\n--\n")# If we start advertising and check isAdvertising we will see that is changes to True.resp=my_dongle.at_advstart()print(resp.Cmd)print(resp.Ack)print(resp.Rsp)print(resp.End)print("\nisAdvertising: "+str(my_dongle.status.isAdvertising))print("\n--\n")# Here we stop the advertising.resp=my_dongle.at_advstop()print(resp.Cmd)print(resp.Ack)print(resp.Rsp)print(resp.End)print("\nisAdvertising: "+str(my_dongle.status.isAdvertising))FunctionsclassBleuIo(object):def__init__(self,port='auto',baud=57600,timeout=1,debug=False):"""Initiates the dongle. If port param is left as 'auto' it will auto-detect if bleuio dongle is connected.        :param port: str:param baud: int:param timeout: int:param debug: bool"""defregister_scan_cb(self,callback):"""Registers callback function for recieving scan results.:param callback: Function with a data parameter. Function will be called for every scan result.:type callback : hex str:returns: Scan results.:rtype: str"""defregister_evt_cb(self,callback):"""Registers callback function for recieving events.:param callback: Function with a data parameter. Function will be called for every event.:type callback : hex str:returns: Event results.:rtype: str"""defunregister_scan_cb(self):"""Unregister the callback function for recieving scan results."""defunregister_evt_cb(self):"""Unregister the callback function for recieving events."""defstop_scan(self):"""Stops any type of scan.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defstop_sps(self):"""Stops SPS Stream-mode.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat(self):"""Basic AT-Command.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defata(self,isOn):"""Shows/hides ascii values from notification/indication/read responses.:param isOn: True=On, False=Off:type isOn : bool:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defatasps(self,isOn):"""Toggle between ascii (Off) and hex responses (On) received from SPS.:param isOn: True=On, False=Off:type isOn : bool:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defatds(self,isOn):"""Turns auto discovery of services when connecting on/off.:param isOn: (boolean) True=On, False=Off:type isOn : bool:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defate(self,isOn):"""Turns Echo on/off.:param isOn: (boolean) True=On, False=Off:type isOn : bool:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defati(self):"""Device information query.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defatr(self):"""Trigger platform reset.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_advdata(self,advdata=""):"""Sets or queries the advertising data.:param: Sets advertising data. If left empty it will query what advdata is set. Format: xx:xx:xx:xx:xx.. (max 31 bytes):type advdata: hex str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_advdatai(self,advdata):"""Sets advertising data in a way that lets it be used as an iBeacon.Format = (UUID)(MAJOR)(MINOR)(TX)Example: at_advdatai("5f2dd896-b886-4549-ae01-e41acd7a354a0203010400"):param: Sets advertising data in iBeacon format. If left empty it will query what advdata is set:type advdata: hex str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_advstart(self,conn_type="",intv_min="",intv_max="",timer=""):"""Starts advertising with default settings if no params.With params: Starts advertising with <conn_type><intv_min><intv_max><timer>.:param: Starts advertising with default settings.:type conn_type: str:type intv_min: str:type intv_max: str:type timer: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_advstop(self):"""Stops advertising.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_advresp(self,respData=""):"""Sets or queries scan response data. Data must be provided as hex string.:param: Sets scan response data. If left empty it will query what advdata is set. Format: xx:xx:xx:xx:xx.. (max 31 bytes):type respData: hex str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_cancel_connect(self):"""While in Central Mode, cancels any ongoing connection attempts.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_central(self):"""Sets the device Bluetooth role to central role.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_clearnoti(self,handle):"""Disables notification for selected characteristic.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_clearindi(self,handle):"""Disables indication for selected characteristic.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_client(self):"""Sets the device role towards the targeted connection to client. Only in dual role.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_divicename(self,name=""):"""Gets or sets the device name.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_dis(self):"""Shows the DIS Service info and if the DIS info is locked in or can be changed.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_dual(self):"""Sets the device Bluetooth role to dual role.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_enter_passkey(self,passkey):"""Respond to Passkey request. When faced with this message: BLE_EVT_GAP_PASSKEY_REQUEST use this command to enterthe 6-digit passkey to continue the pairing request.:param passkey: str: six-digit number string "XXXXXX":returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_findscandata(self,scandata,timeout=0):"""Scans for all advertising/response data which contains the search params.:param scandata: Hex string to filter the advertising/scan response data. Can be left blank to scan for everything. Format XXXX..:type scandata: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_frssi(self,rssi):"""Filters scan results, showing only results with <max_rssi> value or lower.:param rssi: RSSI value. Must be negative. eg. -67:type rssi: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapaddrtype(self,addr_type=""):"""Change device Address Type or queries device Address Type.:param addr_type: Range: 1-5. If left blank queries current Address Type.:type addr_type: int:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapconnect(self,addr,intv_min="",intv_max="",slave_latency="",sup_timeout="",):"""Initiates a connection with a specific slave device. [<addr_type>]<address>=<intv_min>:<intv_max>:<slave_latency>:<sup_timeout>:param addr: hex str format: [X]XX:XX:XX:XX:XX:XX:param intv_min: str:param intv_max: str:param slave_latency: str:param sup_timeout: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapdisconnect(self):"""Disconnects from a peer Bluetooth device.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapdisconnectall(self):"""Disconnects from all peer Bluetooth devices.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapiocap(self,io_cap=""):"""Sets or queries what input and output capabilities the device has. Parameter is number between 0 to 4.:param io_cap: str: number:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gappair(self,bond=False):"""Starts a pairing (bond=False) or bonding procedure (bond=True).:param bond: boolean:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapunpair(self,addr_to_unpair=""):"""Unpair paired devices if no parameters else unpair specific device. This will also remove the device bond datafrom BLE storage.Usable both when device is connected and when not.:param addr_to_unpair: hex str format: [X]XX:XX:XX:XX:XX:XX:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapscan(self,timeout=0):"""Starts a Bluetooth device scan with or without timer set in seconds.:param: if left empty it will scan indefinitely:param timeout: int (time in seconds):returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gapstatus(self):"""Reports the Bluetooth role.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gattcread(self,uuid):"""Read attribute of remote GATT server.:param uuid: hex str format: XXXX:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gattcwrite(self,uuid,data):"""Write attribute to remote GATT server in ASCII.:param uuid: hex str format: XXXX:param data: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gattcwriteb(self,uuid,data):"""Write attribute to remote GATT server in Hex.:param uuid: hex str format: XXXX:param data: hex str format: XXXXXXX..:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gattcwritewr(self,uuid,data):"""Write, without response, attribute to remote GATT server in ASCII.:param uuid: hex str format: XXXX:param data: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_gattcwritewrb(self,uuid,data):"""Write, without response, attribute to remote GATT server in Hex.:param uuid: hex str format: XXXX:param data: hex str format: XXXXXXX..:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_get_conn(self):"""Gets a list of currently connected devices along with their mac addresses and conn_idx.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_get_mac(self):"""Returns MAC address of the BleuIO device.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_get_services(self):"""Discovers all services of a peripheral and their descriptors and characteristics.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_get_servicesonly(self):"""Discovers a peripherals services.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_get_service_details(self,uuid):"""Discovers all characteristics and descriptors of a selected service.:param uuid: hex str format: XXXX:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_indi(self):"""Show list of set indication handles.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_noti(self):"""Show list of set notification handles.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_numcompa(self,auto_accept="2"):"""Used for accepting a numeric comparison authentication request (no params) or enabling/disabling auto-acceptingnumeric comparisons. auto_accept="0" = off, auto_accept="1" = on.:param auto_accept: str format: "0" or "1":returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_peripheral(self):"""Sets the device Bluetooth role to peripheral.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_scantarget(self,addr):"""Scan a target device. Displaying it's advertising and response data as it updates.:param addr: hex str format: "xx:xx:xx:xx:xx:xx":returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_sec_lvl(self,sec_lvl=""):"""Sets or queries (no params) what minimum security level will be used when connected to other devices.:param sec_lvl:  str: string number between 0 and 4:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_server(self):"""Sets the device role towards the targeted connection to server. Only in dual role.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_setdis(self,manuf,model_num,serial_num,hw_rev,fw_rev,sw_rev):"""Sets the DIS Service info.:param manuf: str:param model_num: str:param serial_num: str:param hw_rev: str:param fw_rev: str:param sw_rev: str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_set_noti(self,handle):"""Enable notification for selected characteristic.:param handle: hex str format: "xxxx":returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_set_indi(self,handle):"""Enable indication for selected characteristic.:param handle: hex str format: "xxxx":returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_set_passkey(self,passkey=""):"""Setting or quering set passkey (no params) for passkey authentication.:param passkey: hex str format: "xxxxxx":returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_show_rssi(self,show_rssi=True):"""Shows/hides RSSI in AT+FINDSCANDATA and AT+SCANTARGET scans.:param show_rssi: bool:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_spssend(self,data=""):"""Send a message or data via the SPS profile.Without parameters it opens a stream for continiously sending data.:param: if left empty it will open Streaming mode:type data: str or None:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_target_conn(self,conn_idx=""):"""Set or quering the connection index which is the targeted connection.:param conn_idx: connection index, format: xxxx:type conn_idx : hex str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_scanfilter(self,sftype:str=None,value:str=""):"""Sets or queries the scanfilter. There are three types of scanfilter, filter by name, filter by uuid or by manufacturer specific ID.:param sftype: scan filter parameter type:type sftype : str:param value: value:type value : str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_customservice(self,idx:int=None,cstype:str=None,value:str=""):"""Sets or queries Custom Service. Max 5 Characteristics can be added.Several values cannot be changed while connected/connecting or advertising.:param idx: service index:type idx : number:param cstype: custom service parameter type:type cstype : str:param value: value:type value : str:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_customservice_start(self):"""Starts the Custom Service based on the settings set by AT+CUSTOMSERVICE= Command.Cannot be started while connected/connecting or advertising:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_customservice_stop(self):"""Stops the Custom Service.Cannot be changed while connected/connecting or advertising.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_customservice_reset(self):"""Stops the Custom Service and resets the Custom Service settings set by the AT+CUSTOMSERVICE= command to it's default values.Cannot be changed while connected/connecting or advertising..:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_suota_start(self):"""Enables the SUOTA Service and start the SUOTA Advertising.Cannot be started while connected/connecting or advertising.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defat_suota_stop(self):"""Disables the SUOTA Service and stops the SUOTA Advertising.Cannot be used while connected/connecting.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects.:rtype: obj BleuIORESP"""defhelp(self):"""Shows all AT-Commands.:returns: Object with 4 object properties: Cmd, Ack, Rsp and End. Each property contains a JSON object, except for Rsp which contains a list of JSON objects. except for Rsp which contains a list of JSON objects.:rtype obj BleuIORESP"""#Enjoy!