Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs
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/...
Ingo's user avatar
  • 42.2k
5 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.
ben_nuttall's user avatar
  • 2,461
5 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 ...
Darth Vader's user avatar
  • 4,196
4 votes

Visualize execution of scripts

Redirect output and errors to a file: myscript.sh >> /home/pi/log.txt 2>&1 &
CoderMike's user avatar
  • 6,987
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 ...
cometfish's user avatar
  • 156
3 votes

Log output of background or boot script

One important aspect people tend to forget when running scripts as daemons is shell environment, and $PATH variable in particular. In your example, the second line relies on $PATH: the full name of ...
Dmitry Grigoryev's user avatar
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 ...
SteelToe's user avatar
  • 131
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....
fedeb's user avatar
  • 31
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 -...
user1202136's user avatar
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 ...
Dmitry Grigoryev's user avatar
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 ...
Seamus's user avatar
  • 22.2k
2 votes

What's causing these crashes after cross-compiling?

FWIW, this can be fixed by adding -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 -D__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 to the compiler flags. Why? In /usr/include/c++/4.{8,...
Jeremy Barnes's user avatar
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 ...
zipzit's user avatar
  • 253
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 ...
M61Vulcan's user avatar
  • 121
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 ...
BriceP's user avatar
  • 123
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://...
pddring's user avatar
  • 121
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 ...
Tom's user avatar
  • 39
2 votes

Unable to install npm onoff

You don't have node in your $PATH, only nodejs. That's a quirk of Debian-based systems due to a naming conflict. You need to install nodejs-legacy to fix. sudo apt-get install nodejs-legacy Or, if ...
kba's user avatar
  • 312
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 ...
goldilocks's user avatar
  • 59.1k
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 ...
Ingo's user avatar
  • 42.2k
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.
Hitechcomputergeek's user avatar
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 ...
Mariusz Zieliński's user avatar
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 ...
Dmitry Grigoryev's user avatar
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 - ...
Seamus's user avatar
  • 22.2k
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.
Dougie's user avatar
  • 5,321
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 ...
F1Linux's user avatar
  • 1,667
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(...
CoderMike's user avatar
  • 6,987
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.
Dani's user avatar
  • 21
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 ...
Ingo's user avatar
  • 42.2k
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 ...
joan's user avatar
  • 71.1k

Only top scored, non community-wiki answers of a minimum length are eligible