Argonone.sh

From Void-Byte
Jump to navigation Jump to search

Krogstad,

I was facing this problem myself. I've already had a troublesome experience with Manjaro but that one had more to do with the packaging method. Anyway, I just managed to get it working on "Kali Linux RaspberryPi 2 (v1.2), 3 and 4 (64-Bit). My case is Argon1 for Raspberry PI4 from Argon40.

Follow these steps:

1. If you just want to get on with business quickly, run:

"sudo curl https://raw.githubusercontent.com/me...ster/argon1.sh |bash". This will install the required files and any required dependencies.

Otherwise, if you want to keep your file for future use, go to your home directory and create a folder like "argonone". download the following script from C?dric Meuter which was intended for it to be used on Ubuntu 20.04

( The URL to his great work is: https://github.com/meuter/argon-one-case-ubuntu-20.04 )

Make the script executable (chmod +x filename.sh) and then run it.

2. Configure your Argon1 to run the fan permanently. This will help you know if you have gotten the fan to work properly on the spot.

"argonone-config" followed by "1" for "Always on".

If the fan doesn't run, follow these steps:

a) Check your config.txt file

"sudo nano /boot/config.txt"

and make sure you have uncommented "dtparam=i2c1=on" somewhere in the configuration:

b) run the argononed service as a python script to get more details from Python:

"sudo /usr/bin/python3 /usr/bin/argononed.py"

If you get the following error:

Traceback (most recent call last):

File "/usr/bin/argononed.py", line 11, in <module>

bus = smbus.SMBus(1)

FileNotFoundError: [Errno 2] No such file or directory

The problem is probably caused because either the fan is not connected or Kali didn't load the i2c Module. Let's check that out first.

"sudo i2cdetect -y 1"

If you get this error:

Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory

Run lsmod and look for anything with "i2c"

"lsmod |grep i2c"

You should see something like:

i2c_bcm2835 16384 0

If you do, turn on the corresponding Linux module

"sudo modprobe i2c-dev"

Now look for i2c again in lsmod

"lsmod |grep i2c"

You should see something like:

i2c_dev 20480 0

i2c_bcm2835 16384 0

So now the module is up and running.

We can verify that by typing:

"sudo i2cdetect -y 1"

If the module has been loaded successfully, you should see something like:

0 1 2 3 4 5 6 7 8 9 a b c d e f

00: -- -- -- -- -- -- -- -- -- -- -- -- --

10: -- -- -- -- -- -- -- -- -- -- 1a -- -- -- -- --

20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

70: -- -- -- -- -- -- -- --

Now you can test the Argon1 python3 script:

"sudo /usr/bin/python3 /usr/bin/argononed.py"

You should now be able to hear the fan.

One last step is to ensure we boot with the module turned on so the fan and buttons work as expected.

"sudo nano /etc/modules" and add on:

i2c-dev

Don't forget to configure the fan behaviour by running "argonone-config"

In addition to the great work from C?dric Meuter, the following Pi Forum thread helped me figure the last part of the problem. https://www.raspberrypi.org/forums/v...c.php?t=115080