+
+* get the raw response with data = await .response() or use .afbresponse() to get structured data
+
+PyAGL is written with asyncio so you'd need an event loop to get your code running.
+Most modules have standalone CLI functionality, which is done via ArgumentParser and each module that
+is CLI usable inherits static base parser and extends its arguments as shown in the example below:
+
+```python3
+async def main(loop):
+ args = GeoClueService.parser.parse_args()
+ gcs = await GeoClueService(args.ipaddr)
+
+ if args.location:
+ msgid = await gcs.location()
+ print(f'Sent location request with messageid {msgid}')
+ print(await gcs.afbresponse())
+
+if __name__ == '__main__':
+ loop = asyncio.get_event_loop()
+ loop.run_until_complete(main(loop))
+```
+`GeoClueService` will try to return an instance with connection to the service. It will throw an exception if it fails to do so.
+`AGLBaseService.afbresponse()` method is a wrapper on top of .response() which will prepare, validate and format data for a convenient usage intended for CLI usage.
+`AFBResponse.__str__` is also a convenience method to be able to print all relevant data in regarding state of the response.
+
+```console
+(aglenv) user@debian:~$ python3 -m pyagl.services.geoclue 192.168.234.251 --location
+matching services: ['afm-service-agl-service-geoclue--1.0--main.service']
+Sent location request with messageid 29188435
+[RESPONSE][Status: success][29188435][Info: GeoClue location data][Data: {'latitude': 42.6898421, 'longitude': 23.3099069, 'accuracy': 107.4702045}]
+```
+
+
+# 4. Environment variables
+The following environment variables are used in the PyAGL project:
+
+Variable | Description
+--- | ---
+**AGL_TGT_IP** | **required**
+**AGL_TGT_PORT** | **optional**, when this is used portfinder() routine is skipped, attempts direct websocket connection to this port.
+**AGL_TEST_TIMEOUT** | **optional**, over-ride the default 5 second timeout value for binding responses. This is useful in many cases where a long-standing request has taken place - e.g. importing few thousand entries from a phonebook
+**AGL_AVAILABLE_INTERFACES** | **optional**, specify which of ethernet, wifi, and bluetooth interfaces are available. The value is a comma separated list, with a default value of "ethernet,wifi,bluetooth".
+**AGL_BTMAP_RECIPIENT** | **optional**, when running Bluetooth MAP tests, this would be used as phone number to write text messages to.
+**AGL_BTMAP_TEXT** | **optional**, when running Bluetooth MAP tests, messages will be composed with this text.
+**AGL_CAN_INTERFACE** | **optional**, specify the CAN interface to use for CAN testing, default value is "can0".
+**AGL_PBAP_PHONENUM** | **optional**, when running Bluetooth PBAP tests, this phone number will be used to .search().
+**AGL_PBAP_VCF** | **optional**, for the Bluetooh PBAP tests query a contact entry out of the phonebook.
+**AGL_BT_TEST_ADDR** | **optional**, for the Bluetooth tests pair/connect/disconnect with an actual Bluetooth device(phone)'s address . The address should have the DBus address style as "dev_00_01_02_03_04_05" instead of a regular colon-separated MAC address.
+
+# 5. Debugging
+PyAGL uses pythons logger library so you can rise the logging level and see the output from most of the modules,
+but was disabled by default because of the massive amount of output produced. When the default logger is enabled
+all other libraries will show their output with pyagl - e.g. websockets, asyncssh etc.