So from what you wrote, it appears to be failing at:
this section.
Basically, for whatever reason,
wpa_cli status isn't returning "wpa_state=COMPLETED" within 5 seconds.
You could try increasing the timeout to 10 seconds or more, eg: in "nickel-usbms.sh", change
Code:
if [ ${WIFI_TIMEOUT} -ge 20 ];
to
Code:
if [ ${WIFI_TIMEOUT} -ge 40 ];
at line 153.
Also look at
this issue, where a similar issue is discussed.