Hot answers tagged

69

This answer is still correct, and explains in more detail the nature of the changes, but most users of current Raspbian should just run sudo raspi-config Select Interfacing Options / Serial then specify if you want a Serial console (probably no) then if you want the Serial Port hardware enabled (probably yes). Then use /dev/serial0 in any code which accesses ...


26

The steps below were found to provide a persistent WiFi setup using netplan with Ubuntu Server 18.04 ubuntu-18.04.2-preinstalled-server-arm64+raspi3.img.xz image on a Raspberry Pi 3 B+. Update system: sudo apt update sudo apt full-upgrade sudo reboot Determine interface names: ip link show # 1: lo: <LOOPBACK,UP,LOWER_UP> … # 2: eth0: <BROADCAST,...


23

I found wpa_supplicant to be super confusing to work with until I figured out how to see its debug messages by running it manually. sudo killall wpa_supplicant sudo wpa_supplicant -c/etc/wpa_supplicant/wpa_supplicant.conf -iwlan0 (Add a -d onto the end to make it verbose.) Until I figured this out, it was complete voodoo. Once you get the config file ...


21

finally this got work for my pi3 (os: debian jessie) please follow these 6 steps carefully. Step 1 - Install Raspbian Jessie onto a SD card and boot the Pi when connected to a network Login via terminal or desktop and shell Configure the system with: sudo raspi-config Expand filesystem and enable serial on advanced page, exit and reboot. Step 2 -this ...


16

I've made this answer to summarize the experience to this issue. We are talking about Raspberry Pi 3 Model B+, released on 2018-03-14. It has some new and updated features compared to Raspberry Pi 3 Model B. A 1.4GHz 64-bit quad-core ARM Cortex-A53 CPU Dual-band 802.11ac wireless LAN and Bluetooth 4.2 Faster Ethernet (Gigabit Ethernet over USB 2.0), maximum ...


14

Since you don't have Internet NTP, the file timestamps are meaningless, being reset to the Pi's "/etc/fake-hwclock.data" time whenever the system is booted. If the daily data file(s) have a standard name ( e.g. /PATH/sensor1.data or common tag ( e.g. the ".data" ) you can use savelog ( or logrotate ) to save only the most recent ( e.g. &...


12

It is exactly determined what the Raspberry Pi 3B+ is able to do with its WiFi on-board device. With the command iw you can show what interface combinations are possible. Just execute $ sudo iw list | grep -A4 "valid interface combinations:" valid interface combinations: * #{ managed } <= 1, #{ P2P-device } <= 1, #{ P2P-...


11

Naseer's answer is correct but a bit elaborate if you just flashed the latest rasbian. All I needed to do, is just to add the following line to my config.txt (from e.g. windows where you plug in the SD card on the fat32 partition): dtoverlay=pi3-disable-bt Then plug it in, and the pi will directly print stuff on the console pins.


11

It's really advisable to upgrade to stretch, but if you want/need to stay with Jessie, follow these steps to get it working: You'll need to do this first step on a pi3 (not plus): Update the bootloader: sudo rpi-update ef7621d91cb58ccc856c3c17ddda28685edd23f3 After that the card will then boot on pi 3B+, but without WiFi Download and install the new ...


10

There are some benchmarks from Henner Zeller's repository on GitHub which claimed that directly outputting data to the GPIO could achieve up to 65.8 MHz on a Raspberry Pi 3 (not B+, mind, but I suspect the figures won't be that far off). The code used is available here in C and the author gives the following pseudocode equivalent: // Pseudocode for (;;) { ...


10

While the official Raspberry schematics don't tell a thing about these components we can learn from the picture of the PCB that they are connected to the paired pins 1 and 3, 4 and 6, 7 and 9, 10 and 12 - that's all the differential signal and clock lines. Since the devices have just four pads (not six) they are not dual-rail clamp ESD protectors, e.g. see ...


9

Quite simply, extra power. The lightning symbol means the pi isn't getting enough power so try another power source preferably one rated at least 2.5A. The model B+ has slightly more power requirements and it will be especially noticeable if you are also trying to power USB devices like an external HDD. Also make sure your firmware on the SD card is up to ...


9

Here is a solution with netbooting using sytemd-networkd. Network booting works only for the wired adapter. Booting over wireless LAN is not supported 1. It is also important that there is already a working DHCP server on the local network. We use RPi 3B+. It comes with "Improved PXE network and USB mass-storage booting" 2. So PXE booting will work out ...


9

Testing points on a Raspberry Pi 3B and 3B+: PP1 VCC +5V (from micro USB receptacle) PP2 VCC +5V (from micro USB receptacle) PP3 GND PP4 GND PP5 GND PP6 GND PP7 5V after polyfuse PP8 3V3 PP9 1V8 PP10 Power LED PP11 PP12 PP13 Status ACT LED PP20 H5V (5V at HDMI connector) PP21 RUN (reset signal) PP22 Ethernet Activity LED PP23 ...


9

In fact Raspbian does have daily upgrades enabled by default; to check: systemctl status apt-daily-upgrade.timer The bit to play attention to is in the second line of output. Between the two semi-colons it will say enabled: Loaded: loaded (/lib/systemd/system/apt-daily-upgrade.timer; disabled; vendor preset: enabled) ...


9

No one is mentioning that the Maximum total USB peripheral current draw on a rpi 3b+ is 1.2A (power requirements) Having said that your current psu is enough. If the cameras are indeed drawing more than 600mA each (which I really find it hard to believe, unless they are dodgy) you should start exploring the option of a powered usb hub.


9

The simplest way would be to use nano. It comes as standard on the majority of Linux distributions. To use it, simply type nano followed by the name/path to the file you want to edit. For example, to create and edit a new file called test, type nano test To edit an existing file, such as fstab, type nano /etc/fstab Or navigate into the etc directory (cd /...


8

Raspberry Pi4 UART The Pi4 has 4 additional UART (uart2-uart5) in addition to uart0/1 on the older Pi (only one of which can be used as they share GPIO). Functionally these are equivalent to the fully featured PL011 UART on uart0 and can optionally be configured with CTS/RTS. See UART configuration for Foundation documentation. These can be enabled (by ...


8

Building scipy from source takes about 1hr20. Pre-compiled wheels are available from piwheels.org, so you can install it from there without building yourself. Raspbian Stretch is pre-configured to use piwheels. Are you on an older Raspbian version or another distribution? See piwheels.org for info on how to configure your system to use it or try: sudo pip3 ...


8

I'm using Ubuntu Server 20.04 LTS. The dtparams setting does not work, instead you need a udev rule. The fan config is in /sys/class/thermal/cooling_device0/, if you cat /sys/class/thermal/cooling_device0/type, it should be "rpi-poe-fan". Once you've confirmed that, use this udev rule as an example: SUBSYSTEM=="thermal" KERNEL=="...


7

/etc/init.d was deprecated with Jessie. Everything is done with systemd now on Raspbian Stretch (and lots of other distros). There's six places where you can easily get things running at boot time. Add a line to /etc/rc.local with sudo nano /etc/rc.local. Add your program before the exit 0 line. Put an & on the end of the line if it starts a long ...


7

Access point and client mode are both running as services so we should use systemd-networkd to switch off one service and switch on the other. With its options we are able to do it without rebooting. For reference I use Raspbian Stretch Lite 2019-04-08 full upgraded with sudo apt update && sudo apt full-upgrade && sudo reboot done at 2019-04-...


7

I assume you are using Raspbian and you have setup the access point with hostapd. To switch the access point this commands should do: rpi ~$ sudo systemctl stop hostapd.service rpi ~$ sudo systemctl start hostapd.service It is difficult to say much more about start/stop hostapd because I don't know anything about your setup. Do you use a stand alone access ...


7

I did the exact same thing: Shortened the 5V and 3V3 rail by accident (with a probe). In my case it was sufficient to replace the Power-Management-Chip, which is indeed available. I used aliexpress to order it (MXL7704-R3). You will however need a hot air rework station. A cheap one as in my case will do, but a simple hot air blower from the hardware ...


7

On a system where the time resets on boot, you can't know what time it is when the system starts, and similarly can't know how long it was when the system was down. But you can count reboots, and you probably have a clock that works while the system is up. Have a global counter ("run id"), stored in a file or database, or whatever, that you ...


6

network-online.target is a static unit. You can check it with: rpi ~$ systemctl list-unit-files network-online.target UNIT FILE STATE network-online.target static 1 unit files listed. means it has no [Install] section and starts only if it is Wants or Requires by another unit. It cannot be started and stopped and does not run on bootup. But if ...


6

Update: I have found that it is better to use wlan0 as interface for the access point and wlan1 as client up-link. But this other way around does not answer the question. So I have made a new question Access point as WiFi repeater with additional WiFi-dongle. Look there for an up to date configuration. This answer here will not maintained anymore. The real ...


6

There is no way to control any of the voltage rail pins (the 3V3 pins, the 5V pins, and the ground pins). They are hard wired to the input power line. The schematics are available at raspberrypi.org.


6

Linear for the win! y = (slope * x) + intercept is the classic linear formula, in your case, x=sensor, y=bars, so the formula becomes bars = (slope * sensor) + intercept ... and you have two data points of this formula, sensor@750, and sensor@3750 equation 1: 0 = (slope * 750) + intercept equation 2: 250 = (slope * 3750) + intercept ... lets rearrange ...


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