18
votes
Accepted
How to correctly restart wpa_supplicant debug with networkd-systemd?
First to shine a light on this mish/mash of different commands. On Raspbian there are three concurrent network environments installed: old style debian networking with ifupdown is configured in etc/...
6
votes
Testing Raspberry Pi scripts on a PC
GPIO Zero provides a mock pin interface, meaning you can run the same code on your PC and emulate the pins. See examples of how it's used in the test suite.
6
votes
Accepted
Have the GPIO pins changed between the Pi 2 and the Pi 3?
For reference here is a diagram of the GPIO for the Pi 2 and the Pi 3:
The GPIO layout is the same, differences between the Pi 2 and Pi 3 include:
The Pi 3 has on-board Wi-Fi and Bluetooth
The ...
4
votes
Visualize execution of scripts
Redirect output and errors to a file:
myscript.sh >> /home/pi/log.txt 2>&1 &
4
votes
Accepted
Clients cannot connect to pivpn server anymore
Well I found the solution for me - hopefully it helps you too!
Found that /var/log/openvpn.log on the RPi had the line "VERIFY ERROR: depth=0, error=CRL has expired"
Searching that gave several ...
3
votes
OS-less raspberry pi 2 debugging of Assembly language
I would recommend taking a look at this site http://www.makeuseof.com/tag/emulate-raspberry-pi-pc/ which describes how to emulate the original raspberry pi on a pc. You then should be able to debug ...
3
votes
What's causing these crashes after cross-compiling?
I was getting a pure virtual method called exception when cross-compiling. @JeremyBarnes's answer did not quite work for me. Instead I used:
-U__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -...
3
votes
What's causing these crashes after cross-compiling?
The easiest way to a binary compatible cross-compilation is to install the toolchain used by Raspbian developers. It can be found here. It's essential to use this toolchain if you want to build the ...
3
votes
Testing Raspberry Pi scripts on a PC
I made this little library, fedeb95/pin that proved useful for me. Lacks some features, but if it suits you... it worked for me.
Edit: pin is a RPi.GPIO wrapper. Instead of calling method x of RPi....
3
votes
Accepted
Why does dhcpcd flood my logs with with useless messages when I use the `inform` option?
You have found a bug. This bug has a history. I won't go into the details here; you can read the following posts if you're interested: Feb 18, 2020, Aug 16, 2021, Mar 30, 2022, April 4, 2022.
I gather ...
2
votes
Testing Raspberry Pi scripts on a PC
Being a newbie to Python and the Pi I didn't understand Joan's answer and needed a simple (bot not elegant!) way of testing my program on the PC without error messages caused by missing GPIO calls.
I ...
2
votes
Testing Raspberry Pi scripts on a PC
I suppose you could use mocking libraries like Mock.
They are mostly used for Unit Testing, but I'm pretty it would work very well in your case. And you would probably be better of trying it by ...
2
votes
Testing Raspberry Pi scripts on a PC
There's a library you can download here: https://roderickvella.wordpress.com/2016/06/28/raspberry-pi-gpio-emulator/
Or there's a simulator which lets you write and test the python code here:
http://...
2
votes
Why the Raspberry PI loses the ethernet connection?
I had this same problem with several Model B's running Wheezy. Its only responsibility was to run WeeWx weather station software, so it was not doing all that much. Experiencing the same failure on ...
2
votes
Remote debugging with Visual Studio 2015
No need to spend money on a solution.
Download and install the Visual C++ for Linux Development extension. This tool allows you to compile / build programs on your remote Linux device. You will be ...
2
votes
Accepted
Segmentation Fault on mplayer and mpv
the annoyingly undetailed Segmentation fault error message
If this is happening something is probably broken, and if you have really replaced the executable repeatedly, it is likely something it ...
2
votes
How to see debug logs from Raspberry Pi 3 during boot process?
The debug messages you are asking about are on a stage where only the boot loader is running but not even the kernel is loaded. So there is no chance to have logging to a file because there is nothing ...
2
votes
Accepted
Where to find debug output from SD driver?
The correct syntax to enable this is dtparam=sd_debug=on. After putting this in config.txt, debug information from the SD driver should show up in dmesg.
2
votes
Routing table gets reset with new ip address
You should allow interface associated with cellular connection to be configured completely via DHCP. Part of the process is also setting up default router. You should have only one default path in the ...
2
votes
Accessing Raspberry Pi JTAG randomly fail
The problem could be due to the missing termination / impedance matching on the JTAG signals. Here's the recommended setup:
TCK should be terminated with a 68 Ω resistor and a 100 pF capacitor in ...
2
votes
Accepted
debug dhcpcd using the lease file at /var/lib/dhcpcd/*.lease
Your only question was this: "My lease file has many special characters, is this normal?". The answer to that question is, "Yes - it's normal for dhcpcd". Other DHCP clients - ...
1
vote
Debugging potentially broken uart pins
Run my GPIO test. It needs the pigpio daemon to be running (sudo pigpiod).
See https://elinux.org/R-Pi_Troubleshooting#Testing
gpiotest
#!/bin/bash
skipped=""
tested=""
failed=&...
1
vote
How to get netboot debug info from start.elf
I don't know if this fits to your installation but on Raspbian you can patch the bootcode.bin file to get debug output on the serial console. First look if you can find the flag with:
rpi ~$ strings /...
1
vote
Accepted
How do I use the send_message method on a Raspberry Pi 3?
You need to run your program with python3 not python.
1
vote
Visualize execution of scripts
Redirect output of set -x to a log to capture any potential errors as script executed.
varFD is an arbitrary variable name (you could call it something else if you wish) and used here to assign the ...
1
vote
Accepted
Printing Python Variables for Debugging
How about logging to a file:
import datetime
def logPrint(s):
now = datetime.datetime.now()
filename='/home/pi/log'+now.strftime('%Y-%m-%d')+'.txt'
f=open(filename,'a')
f.write(...
1
vote
Eclipse PyDev remote debugger Raspberry Pi
After looking for an answer I came up with the solution of disabling the firewall and it worked. So i'ts a matter of the access that are permited in the firewall.
1
vote
Routing table gets reset with new ip address
The default route needs a Gateway where to send packages with a destination the kernel does not know. The Gateway must be a host (router) on the same network the RasPi is direct connected to with an ...
1
vote
Accepted
Direct connect router UART 3.3v to pi3B UART 3.3v and use debug console
Yes, that should work.
You could bit bang a serial link on other GPIO but as you say you would have to write your own drivers.
Another alternative is to use a USB serial dongle. You could plug the ...
1
vote
How to see debug logs from Raspberry Pi 3 during boot process?
on raspbian, you can access logs by typing dmesg, or dmesg>file to save the logs to a file, you can also look in /var/log, especially /var/log/syslog.
not sure if this will work on your os, ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
debug × 64pi-3 × 9
raspbian × 8
python × 5
bare-metal × 5
gpio × 4
networking × 4
boot × 4
kernel × 4
pi-2 × 3
hardware × 3
linux × 3
remote × 3
c++ × 3
pi-pico × 3
pi-3b+ × 2
ethernet × 2
connection × 2
uart × 2
windows-iot × 2
raspberry-pi-os × 2
windows × 2
bash × 2
script × 2
node.js × 2