updated network tasks to threads. fixed bug with locking ble adapter