Go to advanced search

by hippy
Mon Oct 14, 2019 5:34 pm
Forum: General discussion
Topic: Current State of Raspberry Pi 4 Software and Hardware Support
Replies: 20
Views: 704

Re: Current State of Raspberry Pi 4 Software and Hardware Support

andrum99 wrote:
Mon Oct 14, 2019 5:19 pm
probably pre-DRM.
I keep seeing references to "DRM". It may be, but presume isn't, "Digital Rights Management". Would anyone care to clarify what it is / means ?

I've tried Google but got swamped by "Rights Management" results.
by hippy
Mon Oct 14, 2019 3:39 pm
Forum: Beginners
Topic: A relay turns a light on/off, how to detect a burnt light ? [solved]
Replies: 40
Views: 896

Re: A relay turns a light on/off, how to detect a burnt light ?

I appreciate the help but I consider this thread solved ... I think there might be an editing / misattribution error there. One thing I would add is that you might need a more secure lamppost than one with a simple inspection cover which allows access to the electronics. Otherwise, once people real...
by hippy
Mon Oct 14, 2019 12:21 pm
Forum: Troubleshooting
Topic: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file
Replies: 6
Views: 184

Re: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file

Or you can run the pyc through uncompyle6 and get the source back. Then it should run in any Python 3 inter Funnily enough I was just trying that myself. It is utterly pointless to try and hide pure Python source code by distributing a .pyc file when it can be so easily decompiled. cd ~ git clone h...
by hippy
Mon Oct 14, 2019 11:46 am
Forum: Troubleshooting
Topic: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file
Replies: 6
Views: 184

Re: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file

I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file You are probably using the "python" command rather than "python3" - http://www.ioslinks.com/mypi/help.html [email protected]:~/tmp $ wget www.ioslinks.com/mypi/server.zip ... snip ... [email protected]:~/tmp $ unzip server.zip Arc...
by hippy
Mon Oct 14, 2019 11:28 am
Forum: Troubleshooting
Topic: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file
Replies: 6
Views: 184

Re: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file

A pyc is a python class file and is created (automagically) when a module is imported. You can't run those things directly. Yes one can, providing the same Python version is used to run the .pyc as the Python version which created it ... [email protected]:~/tmp $ cat test.py import xyzzy [email protected]:~/tmp $ cat ...
by hippy
Mon Oct 14, 2019 11:18 am
Forum: Troubleshooting
Topic: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file
Replies: 6
Views: 184

Re: I try to run the mypi_server.pyc and get the RuntimeError: Bad magic number in .pyc file

I would expect the error indicates the Python version you are using to run the .pyc file is not the same as the version which created the .pyc file. This is why it's not recommended to distribute .pyc files as applications. Using the "file mypi_server.pyc" should hopefully indicate which version of ...
by hippy
Mon Oct 14, 2019 11:11 am
Forum: Other programming languages
Topic: programming with c#
Replies: 17
Views: 572

Re: programming with c#

so what is the beter idea, try to convert to c++ or devlop with mono? Given you are familiar with C# and mono is easy to install ( and presumably to remove ); I would suggest installing mono and seeing for yourself if it is suitable for your needs. If not then you can then consider how converting t...
by hippy
Sun Oct 13, 2019 5:44 pm
Forum: Advanced users
Topic: Bluetooth detection
Replies: 2
Views: 214

Re: Bluetooth detection

Dunno with a cursory inspection, but try printing 'x' out as well as 'score'. That may make it clearer what's going on.
by hippy
Sun Oct 13, 2019 1:53 pm
Forum: General discussion
Topic: piRoot: A way to run x86_64 Debian apps on Raspbian
Replies: 77
Views: 2792

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

... And what has either got to do with "piRoot: A way to run x86_64 Debian apps on Raspbian" - seeing as neither are "Debian" ? Because qemu can emulate them all, and this project is basically a script to setup & run qemu. It seems to have gone well beyond using qemu to becoming a means for running...
by hippy
Sat Oct 12, 2019 10:12 pm
Forum: General discussion
Topic: piRoot: A way to run x86_64 Debian apps on Raspbian
Replies: 77
Views: 2792

Re: piRoot: A way to run x86_64 Debian apps on Raspbian

Another day, another adventure. Uninstalled all the old stuff, checked /usr/piRoot had gone Downloaded and installed the new, first piroot1.deb, then piroot-xubuntu.deb Eventually, up pops the selector - 1) Xubuntu with ISO 2) Manjaro with ISO 3) ReactOS with ISO 4) Xubuntu Tried (1) and five minute...
by hippy
Sat Oct 12, 2019 9:26 pm
Forum: Raspbian
Topic: Buster bug report thread
Replies: 231
Views: 31024

Re: Buster bug report thread

Also, after an apt-get update/upgrade I then got the following from my background program - sudo modprobe -r g_mass_storage modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.66+/modules.dep.bin' Presumably because it hadn't yet rebooted, and...
by hippy
Sat Oct 12, 2019 6:34 pm
Forum: Raspbian
Topic: Buster bug report thread
Replies: 231
Views: 31024

Re: Buster bug report thread

ejolson wrote:
Sat Oct 12, 2019 4:16 pm
Is the oops immediately during boot?
No. It was while, or after, doing a 'cat /sys/devices/platform/soc/20980000.usb/gadget/lun0/file" while a background process was possibly modprobing, installing or removing, g_mass_storage.
by hippy
Sat Oct 12, 2019 12:58 pm
Forum: Troubleshooting
Topic: Followed this MagPi tutorial to make a smart flash drive: Having some trouble with mount/umount
Replies: 13
Views: 1064

Re: Followed this MagPi tutorial to make a smart flash drive: Having some trouble with mount/umount

Unfortunately, I'm still getting a "permission denied" after following those steps correctly. A bit late in the day, but if you mean these - sudo echo "" > /sys/devices/platform/soc/20980000.usb/gadget/lun0/file sudo echo "/piusb.bin" > /sys/devices/platform/soc/20980000.usb/gadget/lun0/file They n...
by hippy
Sat Oct 12, 2019 12:02 pm
Forum: Raspbian
Topic: Buster bug report thread
Replies: 231
Views: 31024

Re: Buster bug report thread

Oops: 5 [#1] ARM - Pi Zero W, Buster Linux Pi0W-DPF 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux Message from [email protected] at Oct 12 12:43:13 ... kernel:[ 1233.157249] Internal error: Oops: 5 [#1] ARM kernel:[ 1233.314921] Process modprobe (pid: 1944, stack limit = 0xd7455885) k...
by hippy
Thu Oct 10, 2019 5:26 pm
Forum: Beginners
Topic: Setting privileges for the script
Replies: 12
Views: 286

Re: Setting privileges for the script

Furthermore, it appears (but I have not tested) that iw does not need sudo to scan Seems to need sudo for me ... [email protected]:~/apps/wifiscan $ sudo iw wlan0 scan BSS e4:f4:c6:b1:3c:40(on wlan0) last seen: 608285.805s [boottime] TSF: 0 usec (0d, 00:00:00) ... snip ... [email protected]:~/apps/wifiscan $ iw wlan0 ...
by hippy
Thu Oct 10, 2019 5:15 pm
Forum: Troubleshooting
Topic: How can I revive my RPI3?
Replies: 6
Views: 281

Re: How can I revive my RPI3?

rotation wrote:
Thu Oct 10, 2019 4:18 pm
Does that mean, the SD went dead?
Sounds like it. If your 3B boots from a new SD Card that would seem to prove it was the problem.
by hippy
Thu Oct 10, 2019 5:00 pm
Forum: Python
Topic: Writing the result to the list and to a text file.
Replies: 5
Views: 291

Re: Writing the result to the list and to a text file.

A more Pythonic way to do it which allows processing of the lines as they are output -

Code: Select all

import os
lines = os.popen('sudo iwlist wlan0 scan | grep "ESSID"').read().strip().split("\n")
with open("/home/pi/Desktop/pi_cam/networks.txt", "w") as f:
  for line in lines:
    f.write(line.strip()+"\n")
by hippy
Thu Oct 10, 2019 4:32 pm
Forum: Troubleshooting
Topic: Running .py file from boot using rc.local
Replies: 19
Views: 356

Re: Running .py file from boot using rc.local

There is still no startup of the program upon boot When I first started with trying to get something to run at start-up I started simple - /home/pi/magic.py with open("/home/pi/magic.txt", "w") as f: f.write("Yippee! It works!\n") /etc/rc.local addition /usr/bin/python2 /home/pi/magic.py & Reboot a...
by hippy
Thu Oct 10, 2019 3:05 pm
Forum: Beginners
Topic: Setting privileges for the script
Replies: 12
Views: 286

Re: Setting privileges for the script

Your Python program worked for me on a pi 3B using buster without a 'sudo'. But then didn't, and then appeared to work with sudo, but also afterwards without ... [email protected]:~/tmp $ iwlist wlan0 scan | grep "SSID" [email protected]:~/tmp $ iwlist wlan0 scan | grep "SSID" [email protected]:~/tmp $ iwlist wlan0 scan | grep ...
by hippy
Thu Oct 10, 2019 1:11 pm
Forum: Raspbian
Topic: Security: The boot process
Replies: 16
Views: 647

Re: Security: The boot process

It seems to me that so long as someone can get a program onto a targeted Pi 4B and have it executed, with root access or not, that can erase, corrupt or reprogram the Boot Eeprom if not physically write-protected. The programming process requires root privileges. I will agree; it requires root priv...
by hippy
Thu Oct 10, 2019 12:40 pm
Forum: Raspbian
Topic: Security: The boot process
Replies: 16
Views: 647

Re: Security: The boot process

Is there a way for the OS to check if the EEPROM is write-protected? Not sure about the OS but it appears to be possible to access the Boot Eeprom from userland, query the write-protect pin status, which is what I presume is used to write-protect the chip even though it's not shown on the published...
by hippy
Thu Oct 10, 2019 12:21 pm
Forum: Raspbian
Topic: Security: The boot process
Replies: 16
Views: 647

Re: Security: The boot process

There is a configuration block inside the bootcode which sets various options like power off on halt so you need to take that into account for your verification hash. Take a look at '/usr/bin/rpi-eeprom-config' which is a Python program which shows how to read the Boot Eeprom .bin files and separat...
by hippy
Thu Oct 10, 2019 12:01 pm
Forum: Beginners
Topic: Setting privileges for the script
Replies: 12
Views: 286

Re: Setting privileges for the script

Your Python program worked for me on a pi 3B using buster without a 'sudo'. But, if you do need to execute something which needs to be 'sudo' you can do that by adding the 'sudo' within the Python code - import os myCmd = 'mkdir /magic' os.system(myCmd) [email protected]:~/tmp $ python2 mk.py mkdir: cannot cr...

Go to advanced search