Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ai enabling #1209

Open
OutsiderSV opened this issue Jan 12, 2024 · 7 comments
Open

Ai enabling #1209

OutsiderSV opened this issue Jan 12, 2024 · 7 comments
Labels
bug Something isn't working

Comments

@OutsiderSV
Copy link

I'm pretty new to this so bare with me, I recently built my pwnagotchi and I have been reflashing trying different configurations, I am currently on version 1.5.5 but have tried beta 1.5.6 v2 the 1.5.6 does not start capturing anything while the 1.5.5 that I have currently does not have working ai, I checked the logs and this is the error I receive for the AI
[2024-01-12 04:19:11,219] [ERROR] error while starting AI (numpy.ndarray size changed, may indicate binary incompatibility. Expected 44 from C header, got 40 from PyObject)
Ive tried sudo pip3 install --upgrade numpy like other forums suggested but my cmd prompt keeps getting caught up at this point
Running setup.py bdist_wheel for numpy ... /

I have left it at that for 2 hrs and still nothing
any help is appreciated

@OutsiderSV OutsiderSV added the bug Something isn't working label Jan 12, 2024
@kontrakote
Copy link

What RPi do you use?

@OutsiderSV
Copy link
Author

What RPi do you use?

Sorry I have a RPi 0 WH
with a waveshare v4
and pisugar 3

@kontrakote
Copy link

So strange. 1.5.6 beta v2 should work on RPi 0 WH.

@OutsiderSV
Copy link
Author

So strange. 1.5.6 beta v2 should work on RPi 0 WH.

when I do the beta v2 it doesnt scan networks at all and the bottom left displays 0(0) and never updates

@Yzord
Copy link

Yzord commented Jan 17, 2024

So strange. 1.5.6 beta v2 should work on RPi 0 WH.

when I do the beta v2 it doesnt scan networks at all and the bottom left displays 0(0) and never updates

Are you in AUTO mode?

@renewedbullet
Copy link

What RPi do you use?

Sorry I have a RPi 0 WH with a waveshare v4 and pisugar 3

should look at some of the newer pwnagotchi repos 2.6.4 torch in mind

@gagregrog
Copy link

@OutsiderSV likely it is still building when you leave it there even though it doesn't look like anything is happening. The pi zero is resource constrained, so building the wheel will take ages.

My advice: increase swapsize and build in verbose mode.

Here's some notes I wrote when I got v1.5.5 working on my pi0:

Increase Swapfile

Downloading numpy will require it to compile on the RPi which will take a very long time. In order not to go insane we need to bump the swapfile so that the Pi has more memory. The process outlined below comes from here.

  1. Stop the swap: sudo dphys-swapfile swapoff
  2. Change the CONF_SWAPSIZE from CONF_SWAPSIZE=100 to CONF_SWAPSIZE=1024 in sudo nano /etc/dphys-swapfile
  3. Initialize the swapfile with sudo dphys-swapfile setup
  4. Start the swap with sudo dphys-swapfile swapon

After building numpy go back and set the swap back to 100.

Upgrade numpy

Now that we have increased the swapsize we can finally upgrade numpy. This will take a very long time, so make sure to install it using --verbose so that we can monitor the progress.

  1. SSH into the pi
  2. Start a screen session so that if we get disconnected for some reason we can get back into it: screen bash (to exit, ctrl-a and then d. To rejoin screen -r. To kill the session ctrl-d)
  3. Start the install: sudo pip3 install --verbose --upgrade numpy --no-cache-dir
  4. Once it successfully installs, go back and reset the swap size

You should be good to go now!
Restart the service and boot it into Auto mode and watch the logs and you should see that the AI model now loads after about 20 minutes: sudo touch /root/.pwnagotchi-auto && systemctl restart pwnagotchi && tail -f /var/log/pwnagotchi.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants