x728 icon indicating copy to clipboard operation
x728 copied to clipboard

Software shutdown not working

Open Blackcode opened this issue 4 years ago • 8 comments

Assuming everything is installed correctly:

When i call x728off nothing happens...

maintenance@solarstream:~ $ x728off X728 Shutting down... maintenance@solarstream:~ $

if i bash directly the script x728softsd.sh i get:

maintenance@solarstream:~ $ bash /usr/local/bin/x728softsd.sh /usr/local/bin/x728softsd.sh: line 6: /sys/class/gpio/gpio13/direction: Permission denied /usr/local/bin/x728softsd.sh: line 7: /sys/class/gpio/gpio13/value: Permission denied X728 Shutting down... /usr/local/bin/x728softsd.sh: line 20: echo: write error: Operation not permitted

and if i call the script one more time:

maintenance@solarstream:~ $ bash /usr/local/bin/x728softsd.sh /usr/local/bin/x728softsd.sh: line 5: echo: write error: Device or resource busy X728 Shutting down... maintenance@solarstream:~ $

Blackcode avatar May 09 '21 13:05 Blackcode

Hi, This shell script is base on Raspberrry pi OS.

geekworm-com avatar May 12 '21 07:05 geekworm-com

I am on Raspberrry pi OS.

Blackcode avatar May 16 '21 06:05 Blackcode

Hi,

First of all, congratulations for your work. I am very happy with several of your products.

I am having same problem than Blackcode. I have several systems running RBPi4 and x728. It doesn't matter the OS version we are using. Command "x728off" is never working. It has nothing to do with OS but x728 version. Board x728v1.3 is not able to shutdown if you install software following wiki. Meanwhile, older versions of this boards, work nice. I have tested 4 boards x728(v1.3) and 2 boards x728 (v1.2) with this consistent result.

Geekworm, please, we need help :-)

Belroguim avatar May 18 '21 23:05 Belroguim

Hi,

First of all, congratulations for your work. I am very happy with several of your products.

I am having same problem than Blackcode. I have several systems running RBPi4 and x728. It doesn't matter the OS version we are using. Command "x728off" is never working. It has nothing to do with OS but x728 version. Board x728v1.3 is not able to shutdown if you install software following wiki. Meanwhile, older versions of this boards, work nice. I have tested 4 boards x728(v1.3) and 2 boards x728 (v1.2) with this consistent result.

Geekworm, please, we need help :-)

Hi, I have just tested 2 times, no found any question.

I am using '2021-03-04-raspios-buster-armhf.img', and reaspberry pi 4 model board

I wonder your some questions. could you give us more detail?

Maybe you can refer to here: https://wiki.geekworm.com/X728-Software

Regards,

geekworm-com avatar May 19 '21 02:05 geekworm-com

Hi,

First time I type x728 there is no feedback. Second time feddback is: Device or resource busy

My question is... how can I fix it?

But you are going to need more details in order to figure out why is this happenig. I am out of the office ( I am in Massachusets time ). Tomorrow I will give you detailed information about instructions and its feedback.

Thanks and regards, Miguel

El mar., 18 may. 2021 22:21, geekworm @.***> escribió:

Hi,

First of all, congratulations for your work. I am very happy with several of your products.

I am having same problem than Blackcode. I have several systems running RBPi4 and x728. It doesn't matter the OS version we are using. Command "x728off" is never working. It has nothing to do with OS but x728 version. Board x728v1.3 is not able to shutdown if you install software following wiki. Meanwhile, older versions of this boards, work nice. I have tested 4 boards x728(v1.3) and 2 boards x728 (v1.2) with this consistent result.

Geekworm, please, we need help :-)

Hi, I have just test 2 times, no found any question.

I wonder your some question. could you give us more detail?

Maybe you can refer to here: https://wiki.geekworm.com/X728-Software

Regards,

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/geekworm-com/x728/issues/1#issuecomment-843693787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUGZFEVTKT77JIPQNZRUQDTOMOCPANCNFSM44PDTDZQ .

Belroguim avatar May 19 '21 03:05 Belroguim

Hi,

I have partially solved it.

Attached you can find some files associated with three different tests: Test1: Fresh OS with board v1.2. Everything works properly. Test2: Fresh OS with board v1.3. Same PI, only x728 board was replaced. With some workaround, it seems that "GPIO_13_Set.py" can make softshutdown. After using this py, command x728off has started to work. Test3: OS of our real app (OS2), several libraries and programs were added to a vanilla OS. I guess somehow some of the modules and programs are interfering with software needed for x728 board. You can see in the SSH3 sesion the feedback of several commands that works properly, and x728 not working. In this case "GPIO_13_Set.py" has not the effect of solve the problem, like in OS1.

My questions: Do you understand what happens in test2? Do you plan to release a new version "x728bat_v1.3.py" ? (in my case this is not working) I would like to fix x728 software in OS2. Do you see how I could fix it?

Thanks, Miguel

El mar, 18 may 2021 a las 23:49, Miguel Vilariño (< @.***>) escribió:

Hi,

First time I type x728 there is no feedback. Second time feddback is: Device or resource busy

My question is... how can I fix it?

But you are going to need more details in order to figure out why is this happenig. I am out of the office ( I am in Massachusets time ). Tomorrow I will give you detailed information about instructions and its feedback.

Thanks and regards, Miguel

El mar., 18 may. 2021 22:21, geekworm @.***> escribió:

Hi,

First of all, congratulations for your work. I am very happy with several of your products.

I am having same problem than Blackcode. I have several systems running RBPi4 and x728. It doesn't matter the OS version we are using. Command "x728off" is never working. It has nothing to do with OS but x728 version. Board x728v1.3 is not able to shutdown if you install software following wiki. Meanwhile, older versions of this boards, work nice. I have tested 4 boards x728(v1.3) and 2 boards x728 (v1.2) with this consistent result.

Geekworm, please, we need help :-)

Hi, I have just test 2 times, no found any question.

I wonder your some question. could you give us more detail?

Maybe you can refer to here: https://wiki.geekworm.com/X728-Software

Regards,

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/geekworm-com/x728/issues/1#issuecomment-843693787, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUGZFEVTKT77JIPQNZRUQDTOMOCPANCNFSM44PDTDZQ .

Using username "pi". @.***'s password: Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 19 13:38:52 2021

SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

@.:~ $ sudo hwclock -r 2021-05-19 13:44:12.455712+01:00 @.:~ $ sudo python x728bat_v1.2.py


Voltage: 4.03V Battery: 62%



Voltage: 4.03V Battery: 63%


^CTraceback (most recent call last): File "x728bat_v1.2.py", line 44, in time.sleep(2) KeyboardInterrupt @.:~ $ sudo python x728pld.py 1.Make sure your power adapter is connected 2.Disconnect and connect the power adapter to test 3.When power adapter disconnected, you will see: AC Power Loss or Power Adapter Failure 4.When power adapter disconnected, you will see: AC Power OK, Power Adapter OK Testing Started---AC Power Loss OR Power Adapter Failure--- ---AC Power OK,Power Adapter OK--- ---AC Power Loss OR Power Adapter Failure--- ---AC Power OK,Power Adapter OK--- ^CTraceback (most recent call last): File "x728pld.py", line 20, in raw_input("Testing Started") KeyboardInterrupt @.:~ $ x728off X728 Shutting down... @.:~ $ x728off /usr/local/bin/x728softsd.sh: line 5: echo: write error: Device or resource busy X728 Shutting down... @.:~ $ nano /usr/local/bin/x728softsd.sh @.:~ $ x728off /usr/local/bin/x728softsd.sh: line 5: echo: write error: Device or resource busy X728 Shutting down... @.:~ $

Using username "pi". @.***'s password: Linux raspberrypi 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 19 13:25:39 2021

SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

@.:~ $ cd x728/ @.:~/x728 $ python3 /home/pi/x728bat_v1.3.py python3: can't open file '/home/pi/x728bat_v1.3.py': [Errno 2] No such file or directory @.:~/x728 $ python3 /home/pi/x728/x728bat_v1.3.py File "/home/pi/x728/x728bat_v1.3.py", line 39 print "" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? @.:~/x728 $ cd .. @.:~ $ ls x728 x728bat_v1.2.py x728pld.py @.:~ $ python3 /home/x728bat_v1.2.py python3: can't open file '/home/x728bat_v1.2.py': [Errno 2] No such file or directory @.:~ $ python3 /home/pi/x728bat_v1.2.py File "/home/pi/x728bat_v1.2.py", line 30 print "" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? @.:~ $ sudo python x728bat_v1.2.py


Voltage: 3.98V Battery: 78%



Voltage: 3.98V Battery: 78%


^CTraceback (most recent call last): File "x728bat_v1.2.py", line 44, in time.sleep(2) KeyboardInterrupt @.:~ $ sudo python x728pld.py 1.Make sure your power adapter is connected 2.Disconnect and connect the power adapter to test 3.When power adapter disconnected, you will see: AC Power Loss or Power Adapter Failure 4.When power adapter disconnected, you will see: AC Power OK, Power Adapter OK Testing Started---AC Power Loss OR Power Adapter Failure--- ---AC Power OK,Power Adapter OK--- ---AC Power Loss OR Power Adapter Failure--- ---AC Power OK,Power Adapter OK--- ^CTraceback (most recent call last): File "x728pld.py", line 20, in raw_input("Testing Started") KeyboardInterrupt @.:~ $ sudo python x728pld.py^C @.:~ $ date Wed 19 May 13:33:27 BST 2021 @.:~ $ sudo hwclock -r 2021-05-19 13:33:38.713451+01:00 @.:~ $ @.:~ $ @.:~ $ cd x728/ -bash: @.:~: command not found @.:~ $ @.:~/x728 $ python3 /home/pi/x728bat_v1.3.py -bash: @.:~/x728: No such file or directory @.:~ $ python3: can't open file '/home/pi/x728bat_v1.3.py': [Errno 2] No such file or directory

@.:~/x728 $ python3 /home/pi/x728/x728bat_v1.3.py File "/home/pi/x728/x728bat_v1.3.py", line 39 print "" ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? @.:~/x728 $ cd .. @.:~ $ ls x728 x728bat_v1.2.py x728pld.py @.:~ $ python3 /home/x728bat_v1.2.py python3: can't open file '/home/x728bat_v1.2.py': [Errno 2] No such file or directory -bash: python3:: command not found @.:~ $ @.:~ $ python3 /home/pi/x728bat_v1.2.py -bash: @.:~: command not found @.:~ $ File "/home/pi/x728bat_v1.2.py", line 30 -bash: File: command not found @.:~ $ print "" Error: no such file "" @.:~ $ ^ -bash: ^: command not found @.:~ $ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? -bash: syntax error near unexpected token (' ***@***.***:~ $ ***@***.***:~ $ sudo python x728bat_v1.2.py -bash: ***@***.***:~: command not found ***@***.***:~ $ ****************** -bash: x728: command not found ***@***.***:~ $ Voltage: 3.98V -bash: Voltage:: command not found ***@***.***:~ $ Battery: 78% -bash: Battery:: command not found ***@***.***:~ $ ****************** -bash: x728: command not found ***@***.***:~ $ ****************** -bash: x728: command not found ***@***.***:~ $ Voltage: 3.98V -bash: Voltage:: command not found ***@***.***:~ $ Battery: 78% -bash: Battery:: command not found ***@***.***:~ $ ****************** -bash: x728: command not found ***@***.***:~ $ ^CTraceback (most recent call last): -bash: :s^CTraceback (most recent call last):: substitution failed ***@***.***:~ $ File "x728bat_v1.2.py", line 44, in <module> -bash: syntax error near unexpected token newline' @.:~ $ time.sleep(2) -bash: syntax error near unexpected token 2' ***@***.***:~ $ KeyboardInterrupt -bash: KeyboardInterrupt: command not found ***@***.***:~ $ ***@***.***:~ $ sudo python x728pld.py -bash: ***@***.***:~: command not found ***@***.***:~ $ 1.Make sure your power adapter is connected -bash: 1.Make: command not found ***@***.***:~ $ 2.Disconnect and connect the power adapter to test -bash: 2.Disconnect: command not found ***@***.***:~ $ 3.When power adapter disconnected, you will see: AC Power Loss or Power Adapter Failure -bash: 3.When: command not found ***@***.***:~ $ 4.When power adapter disconnected, you will see: AC Power OK, Power Adapter OK -bash: 4.When: command not found ***@***.***:~ $ Testing Started---AC Power Loss OR Power Adapter Failure--- -bash: Testing: command not found ***@***.***:~ $ ---AC Power OK,Power Adapter OK--- -bash: ---AC: command not found ***@***.***:~ $ ---AC Power Loss OR Power Adapter Failure--- -bash: ---AC: command not found ***@***.***:~ $ ---AC Power OK,Power Adapter OK--- -bash: ---AC: command not found ***@***.***:~ $ ^CTraceback (most recent call last): -bash: :s^CTraceback (most recent call last):: substitution failed ***@***.***:~ $ File "x728pld.py", line 20, in <module> -bash: syntax error near unexpected token newline' @.:~ $ raw_input("Testing Started") -bash: syntax error near unexpected token `"Testing Started"' @.:~ $ KeyboardInterrupt -bash: KeyboardInterrupt: command not found @.:~ $ @.:~ $ sudo python x728pld.py^C -bash: @.:~: command not found @.:~ $ @.:~ $ date -bash: @.:~: command not found @.:~ $ Wed 19 May 13:33:27 BST 2021 -bash: Wed: command not found @.:~ $ @.:~ $ sudo hwclock -r -bash: @.:~: command not found @.:~ $ 2021-05-19 13:33:38.713451+01:00 -bash: 2021-05-19: command not found @.:~ $ @.:~ $ -bash: @.:~: command not found @.:~ $ history > history.txt @.:~ $ x728off X728 Shutting down...

1  sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 
2  sudo raspi-config
3  ping www.google.com
4  sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 
5  ls
6  sudo nano /etc/wpa_supplicant/wpa_supplicant.conf 
7  ping www.google.com
8  ls
9  pwd

10 ping www.google.com 11 sudo raspi-config 12 ping www.google.com 13 ip addr show 14 ping www.google.com 15 sudo raspi-config 16 sudo reboot 17 ls 18 sudo apt-get install python-smbus 19 sudo apt-get install i2c-tools 20 git clone https://github.com/geekworm-com/x728.git 21 sudo apt update 22 sudo apt install git 23 git clone https://github.com/geekworm-com/x728.git 24 cd x728/ 25 sudo bash x728.sh 26 printf "%s\n" "alias x728off='sudo x728softsd.sh'" >> ~/.bashrc 27 sudo reboot 28 date -r 29 date --help 30 date 31 sudo hwclock -w 32 sudo hwclock -r 33 sudo python x728bat_v1.2.py 34 sudo shutdown now 35 ls 36 sudo hwclock -r 37 x728off 38 sudo hwclock -r 39 sudo x728off 40 x728off 41 sudo reboot now 42 x728off 43 ls 44 x728off 45 ls 46 sudo shutdown now 47 x728off 48 ls 49 x728off 50 sudo reboot now 51 ls 52 x728off 53 ls 54 sudo raspi-config 55 x728off 56 cd x728/ 57 python3 /home/pi/x728bat_v1.3.py 58 python3 /home/pi/x728/x728bat_v1.3.py 59 cd .. 60 ls 61 python3 /home/x728bat_v1.2.py 62 python3 /home/pi/x728bat_v1.2.py 63 sudo python x728bat_v1.2.py 64 sudo python x728pld.py 65 date 66 sudo hwclock -r 67 @.:~ $ cd x728/ 68 @.:~/x728 $ python3 /home/pi/x728bat_v1.3.py 69 python3: can't open file '/home/pi/x728bat_v1.3.py': [Errno 2] No such file or directory 70 @.:~ $ python3 /home/pi/x728bat_v1.2.py 71 SyntaxError: Missing parentheses in call to 'print'. Did you mean print("")? 72 @.:~ $ sudo python x728bat_v1.2.py 73 ****************** 74 Voltage: 3.98V 75 Battery: 78% 76 ****************** 77 Voltage: 3.98V 78 Battery: 78% 79 ****************** 80 KeyboardInterrupt 81 @.:~ $ sudo python x728pld.py 82 1.Make sure your power adapter is connected 83 2.Disconnect and connect the power adapter to test 84 3.When power adapter disconnected, you will see: AC Power Loss or Power Adapter Failure 85 4.When power adapter disconnected, you will see: AC Power OK, Power Adapter OK 86 Testing Started---AC Power Loss OR Power Adapter Failure--- 87 ---AC Power OK,Power Adapter OK--- 88 ---AC Power Loss OR Power Adapter Failure--- 89 ---AC Power OK,Power Adapter OK--- 90 KeyboardInterrupt 91 @.:~ $ sudo python x728pld.py^C 92 @.:~ $ date 93 Wed 19 May 13:33:27 BST 2021 94 @.:~ $ sudo hwclock -r 95 2021-05-19 13:33:38.713451+01:00 96 @.***:~ $ 97 history > history.txt

Using username "pi". @.***'s password: Linux guides-pc 5.10.17-v7l+ #1403 SMP Mon Feb 22 11:33:35 GMT 2021 armv7l

The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed May 19 01:29:53 2021 from 10.0.1.72

SSH is enabled and the default password for the 'pi' user has not been changed. This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.

@.:~ $ x728off X728 Shutting down... @.:~ $ x728off /usr/local/bin/x728softsd.sh: line 5: echo: write error: Device or resource busy X728 Shutting down... @.:~ $ cd /usr/local/bin/ @.:/usr/local/bin $ sudo x728softsd.sh /usr/local/bin/x728softsd.sh: line 5: echo: write error: Device or resource busy X728 Shutting down... @.:/usr/local/bin $ cd ~ @.:~ $ ls AlignmentSystem img.jpg mongobinaries test.jpg Calib Imgs OAS webinterface comands.txt Medida_Desplazamiento PyMongo x728 @.:~ $ ls AlignmentSystem GPIO_13_Set.py Medida_Desplazamiento PyMongo x728 Calib img.jpg mongobinaries test.jpg comands.txt Imgs OAS webinterface @.:~ $ sudo python GPIO_13_Set.py GPIO_13_Set.py:5: RuntimeWarning: This channel is already in use, continuing any way. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(13, GPIO.OUT) @.:~ $ htop @.:~ $ sudo python GPIO_13_Set.py GPIO_13_Set.py:5: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings. GPIO.setup(13, GPIO.OUT) @.:~ $ sudo python GPIO_13_Set.py @.:~ $ sudo python GPIO_13_Set.py @.:~ $ sudo python GPIO_13_Set.py @.:~ $ ^C @.:~ $ sudo hwclock -r hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --verbose option to see the details of our search for an access method. @.:~ $ data -bash: data: command not found @.:~ $ date Wed 19 May 15:11:49 CEST 2021 @.:~ $ sudo hwclock -w hwclock: Cannot access the Hardware Clock via any known method. hwclock: Use the --verbose option to see the details of our search for an access method. @.:~ $ sudo pyton /home/pi/x728bat_v1.2.py sudo: pyton: command not found @.:~ $ ls AlignmentSystem Calib comands.txt GPIO_13_Set.py img.jpg Imgs Medida_Desplazamiento mongobinaries OAS PyMongo test.jpg webinterface x728 @.:~ $ cd x728/ @.:~/x728 $ ls README.md x728bat.py x728pld.py x728.sh @.:~/x728 $ sudo pyton x728bat.py sudo: pyton: command not found @.:~/x728 $ sudo python x728bat.py


Voltage: 3.99V Battery: 90%



Voltage: 3.99V Battery: 90%



Voltage: 3.98V Battery: 90%


^CTraceback (most recent call last): File "x728bat.py", line 44, in time.sleep(2) KeyboardInterrupt @.:~/x728 $ sudo python x728pld.py 1.Make sure your power adapter is connected 2.Disconnect and connect the power adapter to test 3.When power adapter disconnected, you will see: AC Power Loss or Power Adapter Failure 4.When power adapter disconnected, you will see: AC Power OK, Power Adapter OK Testing Started---AC Power OK,Power Adapter OK--- ---AC Power Loss OR Power Adapter Failure--- ---AC Power OK,Power Adapter OK--- ---AC Power Loss OR Power Adapter Failure--- ^CTraceback (most recent call last): File "x728pld.py", line 20, in raw_input("Testing Started") KeyboardInterrupt @.:~/x728 $ x728off /usr/local/bin/x728softsd.sh: line 5: echo: write error: Device or resource busy X728 Shutting down... @.***:~/x728 $

Belroguim avatar May 19 '21 13:05 Belroguim

Hello geekworm-com,

I have created a clean Raspberry PI installation for you on the faulty machine and exposed the SSH port. Most probably it won't work if you try to install everything and shut it down.

IP: 37.183.22.60 Port: 5555 Uname: pi Passwd: raspberry

Let me know.

Thanks, Dragos E.

Blackcode avatar May 20 '21 18:05 Blackcode

Hi,

I don't understand what you are proposing. But no worries, as I had said, after running my script it has worked and still does.

I will update my pots next week.

One this that it could help me a is knowing if is possible to disable restart function associated with a short push in the button. May be just removing some part on the RB scripts. Even more impresive could be made software shut down when user make two fast clicks on button. I don't know how feaseble, but sure it would help more people tunning board behaviour according theirs needs.

Thanks, Miguel

El jue., 20 may. 2021 14:04, Blackcode @.***> escribió:

Hello geekworm-com,

I have created a clean Raspberry PI installation for you on the faulty machine and exposed the SSH port. Most probably it won't work if you try to install everything and shut it down.

IP: 31.156.137.20 Port: 5555 Uname: pi Passwd: raspberry

Let me know.

Thanks, Dragos E.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/geekworm-com/x728/issues/1#issuecomment-845347381, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEUGZFBJ7O3UPOHSUKKLGBTTOVFKXANCNFSM44PDTDZQ .

Belroguim avatar May 24 '21 00:05 Belroguim