evilsocket / pwnagotchi

(⌐■_■) - Deep Reinforcement Learning instrumenting bettercap for WiFi pwning.
https://pwnagotchi.ai/
Other
7.36k stars 1.13k forks source link

No display and No start with Waveshare V4 #1187

Closed nickba86 closed 7 months ago

nickba86 commented 7 months ago

Hello Everyone!! I hope you are doing well

Describe the bug The screen does not show Anything. The: "systemctl status pwnagotchi" Shows: image

The Log Shows: image

To Reproduce Steps to reproduce the behavior:

  1. Make a Fresh copy of the pwnagotchi ISO in a SD card.
  2. ... Connect to the pwnagotchi with FTP and replace the files with the last version on github image That's because the image available to download does have the latest changes with the support for the last type of screen
  3. Modify the CONFIG.TOML with: ui.display.type = "waveshare213inb_v4" I understand that's the way to it because in the init we have the last modification: image

Expected behavior I want to see the screen working with image.

Environment (please complete the following information):

Thank you very much!!!!!

Necr0byte commented 7 months ago

Out of curiosity, can you try running journalctl -u pwnagotchi.service when you start it to see if it's writing anything to stderr before crashing?

spitecho commented 7 months ago

I had the same issue. I think it's because the most recent image (version 1.5.5, released April 18, 2021) doesn't have the Waveshare v4 update (released January 18, 2023).

I fixed it by copying the git cloned pwnagotchi folder and binary file from this repo:

ssh pi@10.0.0.2
sudo systemctl stop pwnagotchi.service
git clone https://github.com/evilsocket/pwnagotchi.git
cd pwnagotchi
sudo mv /etc/pwnagotchi /etc/pwnagotchi.bak
sudo cp -r pwnagotchi /etc/pwnagotchi
sudo mv /usr/local/bin/pwnagotchi /usr/local/bin/pwnagotchi.bak
sudo cp bin/pwnagotchi /usr/local/bin/pwnagotchi

Then I edited the /boot/config.toml to have 'ui.display.type = "waveshare213inb_v4"' and rebooted. This brought the screen up, but with flashing. Then I edited the /etc/pwnagotchi/config.toml to:

ui.display.type = "waveshare_3"
ui.fps = 0.5

Setting it to "waveshare_3" (despite the screen being labeled v4) removes the constant screen flashing and everything works as expected.

nickba86 commented 7 months ago

Hi all !!! Thanks for the answer!! I am still facing issues: @Necr0byte , the log does not says much: image

@spitecho , I am really sorry but I am afraid I was able to follow your instructions. Please help me to understand what I'm doing wrong:

  1. "Then I edited the /boot/config.toml to have 'ui.display.type = "waveshare213inb_v4"" I was not able to find the config.toml in the boot image As you can see in the image there no config.toml in boot.

2./etc/pwnagotchi/config.toml
In this case I was able to modify but I am confuse because I understood there I should put 'ui.display.type = "waveshare213inb_v4"'

  1. In this path I put the last version:/usr/local/src/pwnagotchi image

  2. I did not know why doing this: sudo mv /etc/pwnagotchi /etc/pwnagotchi.bak sudo cp -r pwnagotchi /etc/pwnagotchi

It like putting the files in folder with the config???

Thank you very much for the help!!!!!!!!!

spitecho commented 7 months ago

You create the /boot/config.toml yourself and add the configuration lines to it. The lines are read at next boot, saved to /etc/pwnagotchi/config.toml, after which, the /boot/config.toml file is removed.

As for the rest, you're basically replacing one file (/usr/local/bin/pwnagotchi) and one folder (/etc/pwnagotchi/) with the updated versions from this project's main page.

LookaD commented 7 months ago

hi @spitecho im also having the same issue, i have a question about your method, i installed with the image found in the release, so i dont have all the files inside of the pwnagotchi that are in the updated repo, so im not sure its working correctly.

i mean the image doesnt have all the .py files etc..

spitecho commented 7 months ago

@LookaD @nickba86 My mistake, I misremembered the location to copy the repo files to. Instead of "/etc/" the pwnagotchi folder from this repo should be copied to "/usr/local/lib/python3.7/dist-packages/".

LookaD commented 7 months ago

@spitecho ok so i did as you said, but i suppose im still missing something doing journalctl -u pwnagotchi.service is giving these errors

so i mean, updating the pwnagotchi folder in "/usr/local/lib/python3.7/dist-packages/" and the file in /usr/local/bin/

i also did chmod 755 to make it as same as the original and chown for root:root

immagine

Thank you for helping btw!

Update: I tried doing a clean install doing again your procedure but still not working, unluckly

Update 2: today i did some other research and found another issue https://github.com/evilsocket/pwnagotchi/issues/712#issuecomment-564126449 in which is suggested to update the "/usr/local/src/pwnagotchi" folder as follows

cd /usr/local/src/pwnagotchi
git pull
pip3 uninstall -y pwnagotchi
pip3 install .

i had to follow the share network procedure to connect the pwnagotchi to internet

added a dns (1.1.1.1) to /etc/resolv.conf

followed the procedure above

and finally this solved my issue!

nickba86 commented 7 months ago

Thank you very much @spitecho. In order to make it work I had to follow your instructions. I will recap for others:

  1. Update the pwnagotchi after clone the image 1.5.5
  2. Follow the Guerilla Guide: https://github.com/Xyl0se/Pwnagotchi-new-guerilla-guide
  3. Update the code: /usr/local/lib/python3.7/dist-packages/" (With the code in Github the last image does not have the last version). image image
  4. Make a config.toml and put in the boot image In this case you must put image
  5. In /etc/pwnagotchi you put the other config.toml image in this case you must put: ui.display.type = "waveshare_3" in the config.toml
  6. Enjoy

THANKS!!!!!!!! :) 👍