Pwnagotchi: [BUG] pwnagotchi stops working after short time

Created on 10 Oct 2019  路  11Comments  路  Source: evilsocket/pwnagotchi

Describe the bug
After starting the pwnagotchi (RPI0W with waveshare v2) via PWR USB and waiting for around 5-10 min, the pwnagotchi stops working, no screen refreshes anymore, no ethernet ssh access. Same happens if started manually via ssh.

To Reproduce
Steps to reproduce the behavior:

  1. Unplug pwnagotchi
  2. Plug in (USB PWR)
  3. wait < 30 min
  4. no screen refreshes, looks dead

Expected behavior
The unit should stay on and refreshes the screen periodically, especially if it encounters new wifis.

Screenshots
None

Environment (please complete the following information):

  • Pwnagotchi version: RC2
  • Type of hardware: RPI0W
  • Any additional hardware used: waveshare v2 eink display

EDIT2:
running in manual mode does NOT introduce this problem.

EDIT:
last dmesg before it gone

[   20.658858] device usb0 entered promiscuous mode
[   22.680434] Bluetooth: Core ver 2.22
[   22.680604] NET: Registered protocol family 31
[   22.680612] Bluetooth: HCI device and connection manager initialized
[   22.688617] Bluetooth: HCI socket layer initialized
[   22.688642] Bluetooth: L2CAP socket layer initialized
[   22.688702] Bluetooth: SCO socket layer initialized
[   22.717028] Bluetooth: HCI UART driver ver 2.3
[   22.717044] Bluetooth: HCI UART protocol H4 registered
[   22.717226] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   22.720672] Bluetooth: HCI UART protocol Broadcom registered
[  487.404531] device mon0 entered promiscuous mode

last output from python

Jul 10 01:54:25 gotchialpha pwnagotchi-launcher[679]: [2019-07-10 01:54:25,392] [WARNING] Entity <bound method Flatten.call of <tensorflow.python.layers.core.Flatten object at 0x9db648b0>> could not be transformed and will be executed as-is. Please report this to the AutoGraph team. When filing the bug, set the verbosity to 10 (on Linux, `export AUTOGRAPH_VERBOSITY=10`) and attach the full output. Cause: converting <bound method Flatten.call of <tensorflow.python.layers.core.Flatten object at 0x9db648b0>>: AttributeError: module 'gast' has no attribute 'Num'
Jul 10 01:54:25 gotchialpha pwnagotchi-launcher[679]: [2019-07-10 01:54:25,622] [INFO] CHANNEL 6
Jul 10 01:54:25 gotchialpha pwnagotchi-launcher[679]: [2019-07-10 01:54:25,945] [INFO] 10 access points on channel 6
Jul 10 01:54:30 gotchialpha pwnagotchi-launcher[679]: [2019-07-10 01:54:30,606] [INFO] sending association frame to NETGEAR51 (omitted Netgear) on channel 6 [0 clients]...
Jul 10 01:54:30 gotchialpha pwnagotchi-launcher[679]: [2019-07-10 01:54:30,807] [INFO] error 400: omitted is an unknown BSSID or it is in the association skip list.
Jul 10 01:54:30 gotchialpha pwnagotchi-launcher[679]: [2019-07-10 01:54:30,812] [INFO] it looks like omitted is not in range anymore :/
Shared connection to 10.0.0.2 closed.

EDIT3: from the log output with debug enabled


Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2838.962687] Internal error: Oops: 37 [#1] ARM

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.001014] Process pwnagotchi (pid: 855, stack limit = 0x851d08a3)

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.003019] Stack: (0xd8d29e28 to 0xd8d2a000)

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.004976] 9e20:                   00000000 d7690668 00000000 da5d5000 00000055 006000c0

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.008798] 9e40: 000937b0 937b0000 d64fe4d8 d64fe4d8 00000000 00000000 00000000 00000000

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.012616] 9e60: 00000000 00000000 00000000 e93284c3 d8d29e9c d8d29fb0 da57d400 00000000

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.016456] 9e80: 00000817 937b0000 da5aa820 da5aa858 d8d29ef4 d8d29ea0 c070f318 c01672bc

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.020354] 9ea0: d8d29ed4 d8d29eb0 c00d6394 c00d748c 00000000 da6f9c00 00000000 00000800

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.024445] 9ec0: 00000000 00000055 d8d29f0c c0a4821c 00000817 c0a43028 c070efec 937b0000

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.028718] 9ee0: d8d29fb0 937bf486 d8d29fac d8d29ef8 c001abc4 c070eff8 00000000 da5aa820

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.033142] 9f00: d8d29f6c d8d29f10 c070a09c c004b544 00400040 0003dfc8 0000000a 00000000

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.037748] 9f20: c006bb44 c070a5e8 fefa6c80 00000294 00000001 dac2c000 00000000 e93284c3

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.042465] 9f40: 00000002 c0014468 d8d29fb0 00000000 00000000 d8d28000 d8d29f84 d8d29f68

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.047276] 9f60: b6cd77f0 c0a59a48 b6cd77f0 c0009c7c ffffffff 00c5387d 00c5387d 0017c1f9

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.052173] 9f80: d8d29fac e93284c3 b6cd77f0 20000010 ffffffff 00c5387d 00c5387d 0017c1f9

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.057098] 9fa0: 00000000 d8d29fb0 c0009c84 c001ab7c 937afff8 939b0008 0000f3fe ac4abc13

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.062023] 9fc0: 9a0dbb95 a3243b12 a5a5bca3 aafebd31 d4e0bb79 0017c1f9 937bf486 00000001

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.066947] 9fe0: 68c3bd8c b4bfc5a4 9ef6bc22 b6cd77f0 20000010 ffffffff 00000000 00000000

Message from syslogd@localhost at Jul 10 02:31:09 ...
 kernel:[ 2839.101111] Code: eb00a8f8 e2504000 1afffe79 e59f11f8 (e5993000) 
bug

Most helpful comment

I solved it using over_voltage=1 in the config.txt

Steps to solve:

  1. Check power cable and power supply
  2. Check SD card
  3. use the above fix, see https://github.com/raspberrypi/linux/issues/2555#issuecomment-539514732 for reference

Some models of the RPi0W have a H路 on one of the coils, maybe these have problems.

All 11 comments

I had this problem before with a different project of mine, but not with pwnagotchi (I don't have a screen yet).
I suspect that the wifi enters power saving mode. So, try adding this line :
iw dev mon0 set power_save off in /usr/bin/monstart script and reboot.
Then, please report if this occurs again.

EDIT: nope, it doesn't, crashed again :D

 kernel:[  779.297680] Internal error: Oops: 17 [#1] ARM

OLD:
I tried it. And your fix saved the kernel, but not the python script:

[2019-10-10 21:39:51,679] [DEBUG] Starting new HTTP connection (1): localhost:8081
[2019-10-10 21:39:51,704] [DEBUG] Starting new HTTP connection (1): localhost:8081
[2019-10-10 21:39:51,839] [DEBUG] http://localhost:8081 "GET /api/events HTTP/1.1" 200 None
[2019-10-10 21:39:51,858] [DEBUG] http://localhost:8081 "POST /api/session HTTP/1.1" 200 26
[2019-10-10 21:39:51,982] [WARNING] !!! captured new handshake on channel 1: XXXXX () -> XXXX [XX (Compal Broadband Networks, Inc.)] !!!
[2019-10-10 21:40:05,608] [INFO] sending association frame to XXX (XX Huawei Technologies Co.,Ltd) on channel 1 [0 clients]...
[2019-10-10 21:40:05,714] [DEBUG] Starting new HTTP connection (1): localhost:8081
[2019-10-10 21:40:05,852] [DEBUG] http://localhost:8081 "POST /api/session HTTP/1.1" 200 26
[2019-10-10 21:40:06,725] [DEBUG] Starting new HTTP connection (1): localhost:8081
[2019-10-10 21:40:08,233] [DEBUG] http://localhost:8081 "GET /api/session HTTP/1.1" 200 None
[2019-10-10 21:40:12,510] [INFO] waiting for 10s on channel 1 ...
[2019-10-10 21:40:12,589] [DEBUG] Starting new HTTP connection (1): localhost:8081
[2019-10-10 21:40:12,756] [DEBUG] http://localhost:8081 "GET /api/events HTTP/1.1" 200 None
[gotchialpha:00610] *** Process received signal ***
[gotchialpha:00610] Signal: Segmentation fault (11)
[gotchialpha:00610] Signal code: Address not mapped (1)
[gotchialpha:00610] Failing at address: 0x1
[gotchialpha:00610] *** End of error message ***
Segmentation fault

Looks like I fixed it with different power cable and more amps. Or maybe the SD-Card is shit. So if anyone has the same problem, change either the sd card or the cable/adapter or both

This is getting mysterious. On my laptop booted in manual mode, service stopped and started with /usr/local/bin/pwnagotchi --debug directly, it works, loads AI and ran for more than 1h. If i boot it with power only it get stuck after 5-10 min...

I have had similar problems: in my case the contents of the card were corrupted and upon restart (unplug + plug) the system was not loaded. @evilsocket and others have suggested that the cause could be an old / bad microsd, in fact it seems to be a common problem with the microsd cards used as secondary memory, due to frequent writing, as mentioned here: https://www.raspberrypi.org/forums/viewtopic.php?t=36533
In my case I will try to buy a new micro sd, probably one of those with Application Performance class.. https://www.sdcard.org/developers/overview/application/index.html

I hope I've helped

I can load the system, the MANUAL mode works fine and longer than 10 min. The problem is the AUTO mode.

I already switched sd cards, same behavior for both.

I solved it using over_voltage=1 in the config.txt

Steps to solve:

  1. Check power cable and power supply
  2. Check SD card
  3. use the above fix, see https://github.com/raspberrypi/linux/issues/2555#issuecomment-539514732 for reference

Some models of the RPi0W have a H路 on one of the coils, maybe these have problems.

This should probably go in the docs somewhere?

If you had the same problem & solved it for you, probably yes.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

evilsocket picture evilsocket  路  8Comments

agent932 picture agent932  路  4Comments

Baallrog picture Baallrog  路  6Comments

debian-user-france1 picture debian-user-france1  路  3Comments

Shadyman picture Shadyman  路  7Comments