Go to advanced search

by nsayer
Mon May 15, 2017 6:21 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Stupid question about SPI: multi-threaded access
Replies: 3
Views: 904

Re: Stupid question about SPI: multi-threaded access

Awesome. That's what I hoped. Thanks.
by nsayer
Fri May 12, 2017 3:16 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Stupid question about SPI: multi-threaded access
Replies: 3
Views: 904

Stupid question about SPI: multi-threaded access

I'd have to assume the answer is "yes," but is there anything in the SPI system that insures that simultaneous access to /dev/spidev0.0 and /dev/spidev0.1 wind up being properly interleaved rather than just step on each other? I have a potential use case where the two would be opened by separate pro...
by nsayer
Fri Apr 14, 2017 11:38 pm
Forum: Troubleshooting
Topic: Pi Zero gadget serial hangs on shutdown
Replies: 5
Views: 964

Re: Pi Zero gadget serial hangs on shutdown

It appears (not quite yet confirmed completely, however) that adding -w to the agetty command line solves this problem. To do this, you need to go to /lib/systemd/system and copy [email protected].service to [email protected].service and then modify it. In addition to adding -w to ExecStart, you sort of want to ma...
by nsayer
Wed Mar 29, 2017 7:17 pm
Forum: Troubleshooting
Topic: Pi Zero gadget serial hangs on shutdown
Replies: 5
Views: 964

Re: Pi Zero gadget serial hangs on shutdown

I've opened an issue.
by nsayer
Wed Mar 29, 2017 2:09 pm
Forum: Troubleshooting
Topic: Pi Zero gadget serial hangs on shutdown
Replies: 5
Views: 964

Re: Pi Zero gadget serial hangs on shutdown

I think you're confused. This is the gadget serial configuration. That is, tuning the Pi Zero into a USB *target*. That's why it's ttyGS0.

It's the dwc2 dtoverlay and module along with g_serial.
by nsayer
Tue Mar 28, 2017 6:39 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 115561

Re: Overlay to remap Pi 3 UART

After further research, it appears that

Code: Select all

enable_uart=1
is effective and sufficient.
by nsayer
Tue Mar 28, 2017 6:33 pm
Forum: Troubleshooting
Topic: Pi Zero gadget serial hangs on shutdown
Replies: 5
Views: 964

Pi Zero gadget serial hangs on shutdown

I've set up a getty on ttyGS0 in the usual manner (I'm running up-to-date Jessie). What I find is that if there is no host connected to the USB port that attempting to reboot or halt the pi hangs. I don't have a console connected, so I don't have a whole lot more info, but I suspect it has to do wit...
by nsayer
Sun Mar 05, 2017 9:12 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi Zero SPI fails without spi0-hw-cs
Replies: 1
Views: 681

Re: Pi Zero SPI fails without spi0-hw-cs

Huh.

On a whim today I removed that line from config.txt and rebooted... And it continues to function properly. Go figure.
by nsayer
Sat Mar 04, 2017 5:48 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Pi Zero SPI fails without spi0-hw-cs
Replies: 1
Views: 681

Pi Zero SPI fails without spi0-hw-cs

I'm using a MAX6951 to drive a clock display. The source code is here.

I've found that if I don't use the spi0-hw-cs overlay, the CS line doesn't work correctly, but with it, it works perfectly.

I'm using up-to-date Jessie on a Zero 1.3.

Anybody have any idea what's going on?
by nsayer
Wed Mar 01, 2017 4:30 pm
Forum: Device Tree
Topic: Overlay to remap Pi 3 UART
Replies: 126
Views: 115561

Re: Overlay to remap Pi 3 UART

I just got this working (I think) with up-to-date Jessie. I had bluetooth working and had decided to sacrifice the serial port. After my fiddling, I now have both bluetooth and a serial console. Yay! What I did was... Add "dtoverlay=pi3-miniuart-bt" and "force_turbo=1" to config.txt. Add "console=se...
by nsayer
Thu Jun 02, 2016 12:02 am
Forum: Troubleshooting
Topic: Raspberry Pi 3 Bluetooth Setup
Replies: 152
Views: 481541

Re: Raspberry Pi 3 Bluetooth Setup

Has anyone solved the "No default controller available" problem? At one point I had bluetooth working with an Apple keyboard on my Pi 3, but now I'm getting this. I have no idea what changed. I have no idea where to even look to see why the bluetooth controller seems to have disappeared. EDIT This p...
by nsayer
Sat Mar 12, 2016 7:58 am
Forum: Troubleshooting
Topic: Pi 3 - no wifi or bt ?
Replies: 7
Views: 2048

Re: Pi 3 - no wifi or bt ?

I figured out BT. I was unable to add pi-bluetooth, because wheezy doesn't have that package, but upgrading the whole system to jessie made it available. That pointed out that what was apparently missing was "bluez-firmware". Now hciconfig -a shows the local host adapter, and I can see some local BT...
by nsayer
Sat Mar 12, 2016 4:57 am
Forum: Troubleshooting
Topic: Pi 3 - no wifi or bt ?
Replies: 7
Views: 2048

Re: Pi 3 - no wifi or bt ?

This post: https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=138137 has the solution. Two files are missing from /lib/firmware/brcm. I was able to fill in the missing files from https://github.com/RPi-Distro/firmware-nonfree At least, that made wlan0 show up. hciconfig -a still shows nothing.
by nsayer
Sat Mar 12, 2016 4:30 am
Forum: Troubleshooting
Topic: Pi 3 - no wifi or bt ?
Replies: 7
Views: 2048

Re: Pi 3 - no wifi or bt ?

I had to install bluez and bluez-hcidump, but having done that, hciconf -a prints nothing.
by nsayer
Sat Mar 12, 2016 4:21 am
Forum: Troubleshooting
Topic: Pi 3 - no wifi or bt ?
Replies: 7
Views: 2048

Re: Pi 3 - no wifi or bt ?

My config.txt has no dt lines in it at all.

Code: Select all

# grep -v ^# config.txt
hdmi_force_hotplug=1

hdmi_group=1
hdmi_mode=4





gpu_mem=64

max_usb_current=1
by nsayer
Sat Mar 12, 2016 4:08 am
Forum: Troubleshooting
Topic: Pi 3 - no wifi or bt ?
Replies: 7
Views: 2048

Pi 3 - no wifi or bt ?

I had a Pi 2 and before moving the SD card to a new Pi 3, I did:

Code: Select all

apt-get update
apt-get dist-upgrade
rpi-update
reboot
So far as I can tell, everything on the 3 looks as it should, but I don't see any evidence of the BT or Wifi.

Is there another step required to get them to show up?
by nsayer
Wed Dec 30, 2015 2:02 am
Forum: Troubleshooting
Topic: Pi Zero w/ 4.1.13?
Replies: 2
Views: 646

Re: Pi Zero w/ 4.1.13?

Ok, I won't worry then, as long as the 4.1.x branch continues to work for at least the short term.
by nsayer
Wed Dec 30, 2015 12:35 am
Forum: Troubleshooting
Topic: Pi Zero w/ 4.1.13?
Replies: 2
Views: 646

Pi Zero w/ 4.1.13?

I was able to just simply move a µSD card from a Pi model B over to a Pi Zero. I had kept that card updated, and everything I've tried has just worked. The only worry I have is a line in dmesg: [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] In...
by nsayer
Fri Jun 05, 2015 5:21 pm
Forum: Troubleshooting
Topic: GPIO Permissions Denied
Replies: 7
Views: 6462

Re: GPIO Permissions Denied

Overnight I've gotten some replies elsewhere. It turns out this isn't a bug in sysfs, but it is a consequence of having udev set the file permissions. There's inevitably going to be a race between the creation of the node with the "wrong" permissions and the rectification of those permissions by ude...
by nsayer
Fri Jun 05, 2015 4:16 am
Forum: Troubleshooting
Topic: GPIO Permissions Denied
Replies: 7
Views: 6462

Re: GPIO Permissions Denied

According to this post on stackexchange, this appears to be some sort of race condition bug. Adding a strategic delay immediately after the export operation solves the problem.
by nsayer
Fri Jun 05, 2015 3:51 am
Forum: Troubleshooting
Topic: GPIO Permissions Denied
Replies: 7
Views: 6462

Re: GPIO Permissions Denied

Here's a proof of concept for the bug: #include <stdlib.h> #include <stdio.h> #include <sys/stat.h> #include <fcntl.h> int main(int argc, char** argv) { char buf[1024]; int fd = open("/sys/class/gpio/export", O_WRONLY); if (fd < 0) { perror("1"); exit(1); } write(fd, "8", 2); close(fd); fd = open("/...
by nsayer
Tue Jun 02, 2015 4:46 pm
Forum: Troubleshooting
Topic: GPIO Permissions Denied
Replies: 7
Views: 6462

Re: GPIO Permissions Denied

I tried

Code: Select all

chgrp gpio avrdude
chmod g+s avrdude
but that didn't help. Clearly there's some bug in the sysfs code that requires root despite the actual privileges expressed on the nodes.
by nsayer
Tue Jun 02, 2015 4:00 am
Forum: Troubleshooting
Topic: GPIO Permissions Denied
Replies: 7
Views: 6462

Re: GPIO Permissions Denied

I'm trying to get the linuxgpio support on avrdude working. I've added myself to the gpio group. I've looked at the linuxgpio code in the avrdude 6.1 distro and it looks correct to me. It performs the equivalent to 'echo x > /sys/class/gpio/export', then 'echo out > /sys/class/gpiox/direction', but ...
by nsayer
Mon Mar 30, 2015 3:22 am
Forum: Networking and servers
Topic: RTL8188CUS and AP/hotspot mode
Replies: 19
Views: 11955

Re: RTL8188CUS and AP/hotspot mode

None of that seems to work anymore. With any of the thousands of precompiled special Realtek hostapd binaries available for download, all I get is ioctl[SIOCSIWMODE]: Operation not permitted Could not set interface to mode(3)! Could not set interface to master mode! rtl871xdrv driver initialization ...
by nsayer
Mon Mar 30, 2015 3:19 am
Forum: General discussion
Topic: wireless AP with hostapd and realtek chipset (works)
Replies: 40
Views: 107587

Re: wireless AP with hostapd and realtek chipset (works)

Something about 3.18.7+ has broken hostapd with an RTL8188CUS. Any attempt - with any of the thousands of copies of the customized hostapd binary available for download - results in ioctl[SIOCSIWMODE]: Operation not permitted Could not set interface to mode(3)! Could not set interface to master mode...

Go to advanced search