Go to advanced search

by hazeii
Mon Apr 08, 2019 12:44 pm
Forum: Camera board
Topic: Official V4L2 driver
Replies: 557
Views: 466754

Re: Official V4L2 driver

We're actually using YUV420 (for our purposes we only need Y), YUYV just made the issue easier to reproduce. Having done a bit of poking about with 'vcdbg reloc' now, it looks like we were just making it with GPU_MEM=128 on the old version (we're using 3 capture buffers rather than the 4 in the samp...
by hazeii
Mon Apr 08, 2019 9:29 am
Forum: Camera board
Topic: Official V4L2 driver
Replies: 557
Views: 466754

Re: Official V4L2 driver

Following on from the above, we're having problems grabbing big frames (inc. kernel crashes) with the latest firmware unless we increase GPU memory. There are varying symptoms depending on video format and frame size but possibly all related to some underlying memory issue. Easiest way I've found to...
by hazeii
Fri Apr 05, 2019 4:12 pm
Forum: Camera board
Topic: Official V4L2 driver
Replies: 557
Views: 466754

Re: Official V4L2 driver

Many thanks for the speedy reply, that solved it!
by hazeii
Fri Apr 05, 2019 1:44 pm
Forum: Camera board
Topic: Official V4L2 driver
Replies: 557
Views: 466754

Re: Official V4L2 driver

Having recently switched to a new release of Raspbian, some custom software that reads stills from the camera via the V4L2 interface is going a lot slower. It appears to be because the camera is going into 'stills mode' at a lower resolution than before, despite the presence of 'max_video_height' an...
by hazeii
Wed Nov 02, 2016 11:16 am
Forum: Advanced users
Topic: External serial keyboard as input
Replies: 9
Views: 3617

Re: External serial keyboard as input

I haven't used inputattach but I expect it uses the input event subsystem to inject the keypress input. 'uinput' does the same thing, but leaves it up to the user to inject/capture the events; therefore to use a bit of code is needed to capture input from the serial keyboard and inject it (with any ...
by hazeii
Fri Oct 28, 2016 9:11 am
Forum: Advanced users
Topic: External serial keyboard as input
Replies: 9
Views: 3617

Re: External serial keyboard as input

Serial keyboards are (or used to be) common in Point-of-sale applications, so that may be the application. Fiddling with fd's might work, depending on the application - for the actual console, the most transparent approach is probably something like uinput (software) or a serial to HID converter (ha...
by hazeii
Fri Oct 28, 2016 7:34 am
Forum: Advanced users
Topic: External serial keyboard as input
Replies: 9
Views: 3617

Re: External serial keyboard as input

Depending on the programs in use, you may just be able to write to /proc/$PID/fd/0, e.g. try running 'cat' on one terminal, switch to another terminal and 'echo HELLO > /proc/$(pidof cat)/fd/0'. Or even more crudely, if you know which tty the target program is on, "echo HELLO > /dev/tty1'. If this w...
by hazeii
Fri Oct 28, 2016 7:13 am
Forum: Camera board
Topic: Syncing events to video frames
Replies: 2
Views: 770

Re: Syncing events to video frames

We've done this, albeit in C - basically record the time at the point where the camera returns a new frame and use that as a reference for everything else. The frame time actually jitters by a few millisec (Pi 3, Sony camera) but with a bit of smoothing it's possible to sync LED's driven by the GPIO...
by hazeii
Mon Sep 12, 2016 3:41 pm
Forum: Networking and servers
Topic: How to record all devices connected to Pi's VPN.
Replies: 1
Views: 556

Re: How to record all devices connected to Pi's VPN.

The ARP list is in '/proc/net/arp'. Note this is not definitively all devices connected to the network, as ARP times out if there is no communication for a while; there's more info in this thread.
by hazeii
Sat Sep 10, 2016 1:58 pm
Forum: Networking and servers
Topic: isc-dhcp-server not starting
Replies: 2
Views: 1019

Re: isc-dhcp-server not starting

Try 'dhcpd -t' to check your configuration file.
by hazeii
Fri Sep 09, 2016 6:03 pm
Forum: Networking and servers
Topic: Possibility to boot via PXE and load filesystem into ram?
Replies: 15
Views: 4191

Re: Possibility to boot via PXE and load filesystem into ram

You actually don't need the 'root=' argument if you're going to run everything from the (initial) ramdisk. Basically the kernel will pick up the initial ramdisk from the entry in config.txt , load that as the initial root filesystem and (by default) try to run /sbin/init (which can be a shell script...
by hazeii
Mon Sep 05, 2016 8:14 pm
Forum: General discussion
Topic: some sort of heartbeat function
Replies: 5
Views: 1033

Re: some sort of heartbeat function

'nagios' is a frequently-used monitoring and alerting system. It's quite easy to create custom monitoring scripts too.
by hazeii
Mon Sep 05, 2016 8:11 pm
Forum: General discussion
Topic: FFTW3 undefined reference
Replies: 2
Views: 1169

Re: FFTW3 undefined reference

It may be you need '-L' as well, to tell the linker where the fft3 libraries are installed (probably they have gone into /usr/local/lib).
by hazeii
Fri Sep 02, 2016 7:55 pm
Forum: Advanced users
Topic: Duplicating System.
Replies: 4
Views: 873

Re: Duplicating System.

Easy way: duplicate onto a 32Gb card (it'll still only use about 16GB). More complicated: plug original SD card into a USB adapter and use 'resize2fs' to shrink the partition (to say 15.5Gb); then delete and recreate the partion using *exactly* the same starting parameters (using e.g. fdisk). You'll...
by hazeii
Wed Aug 31, 2016 6:35 pm
Forum: Raspbian
Topic: systemd / nfs and rpcbind issue
Replies: 9
Views: 5273

Re: systemd / nfs and rpcbind issue

Crude fix: add 'sleep 10' to the start call in /etc/init.d/nfs-kernel-server (possibly more than 10 if you have a slow start-up; basically long enough for systemd to finish grinding).
by hazeii
Wed Aug 31, 2016 12:32 pm
Forum: C/C++
Topic: Run a custom program as early as possible
Replies: 8
Views: 1724

Re: Run a custom program as early as possible

A module will get loaded when needed, so you'd then have to arrange for it to be 'needed', or load it explicitly.

Perhaps the simplest approach is to use an initial ramdisk; you'll get control immediately then, and if you link your code statically you won't even need libc.
by hazeii
Tue Aug 30, 2016 6:01 pm
Forum: C/C++
Topic: Run a custom program as early as possible
Replies: 8
Views: 1724

Re: Run a custom program as early as possible

Bit hardcore, but you could put "init=/bin/$YOURPROG" on the kernel command line, then have it exec whatever init system you use; it'll be the first thing the kernel will run then. A bit later, wiith sysvinit you could call it from /etc/init.d/rcS (first thing invoked by init, via /etc/inittab). Not...
by hazeii
Tue Aug 30, 2016 10:38 am
Forum: Troubleshooting
Topic: Bluetooth Audio Breakup
Replies: 4
Views: 1029

Re: Bluetooth Audio Breakup

Is scan enabled? I've found that having that on during playback causes audio breakup (on Pi 3).
by hazeii
Tue Aug 30, 2016 10:34 am
Forum: Advanced users
Topic: Content of OTP memory
Replies: 3
Views: 1325

Re: Content of OTP memory

My understanding is that bits can be set, but not cleared (e.g. the one-time bit set required to enable network booting).

Presumably any bits not already defined are "reserved for future use" - it would be nice if some small area could be reserved for users though.
by hazeii
Mon Aug 29, 2016 8:02 pm
Forum: Networking and servers
Topic: Network Boot (Raspberry Pi 3)
Replies: 6
Views: 1617

Re: Network Boot (Raspberry Pi 3)

On github you need to select the 'next' branch (on the dropdown just under '<> code' to get the latest firmware (which is 50844 bytes). I believe that before long the 'next' version of 'bootcode.bin' will become the 'master'. But at the moment you must select the 'next' branch to get the expanded fi...
by hazeii
Mon Aug 29, 2016 2:07 pm
Forum: General discussion
Topic: Grab MAC Addressses quickly?
Replies: 29
Views: 4892

Re: Grab MAC Addressses quickly?

Well, it fails completely[*]because a broadcast ping won't elicit an ARP response (unlike a direct ping, which will trigger an ARP response even if pings are completely disabled (with 'echo 1 > icmp_echo_ignore_all'). 'nmap -sn' and 'arping' both do the same thing at the network level, so should bot...
by hazeii
Mon Aug 29, 2016 1:13 pm
Forum: General discussion
Topic: Grab MAC Addressses quickly?
Replies: 29
Views: 4892

Re: Grab MAC Addressses quickly?

The linux kernel has an option to ignore ping broadcasts, and it's turned off by default. cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts 1 ARP-based approaches (nmap -sn, arping) have the advantage they will always work (even in cases where direct ping's - as well as broadcast - to the client ar...
by hazeii
Mon Aug 29, 2016 10:27 am
Forum: General discussion
Topic: Grab MAC Addressses quickly?
Replies: 29
Views: 4892

Re: Grab MAC Addressses quickly?

Yeah, but it only needs to run once and is nice and lightweight . The reason it's slow is because non-existing addresses have to time-out, and the minimum is one second ('-w 1') - so for mostly empty networks, it's 1s per tested address. If nmap is available, 'nmap -sn 192.168.1.1/24 | grep MAC' wil...
by hazeii
Mon Aug 29, 2016 10:00 am
Forum: General discussion
Topic: Sound sensor for pi 3
Replies: 6
Views: 4046

Re: Sound sensor for pi 3

Use a USB or other recording devices and a microphone, and an FFT to detect the screams? Or for a more dedicated device use something like a dsPIC to do the signal acquisition and processing, and connect that to the Pi.
by hazeii
Mon Aug 29, 2016 9:52 am
Forum: General discussion
Topic: Grab MAC Addressses quickly?
Replies: 29
Views: 4892

Re: Grab MAC Addressses quickly?

This will both find and list all devices on the network (here using 192.168.1.1 through 192.168.1.254):- for i in $(seq 254); do arping -f -c 1 -w 1 -I eth0 192.168.1.$i | grep reply; done Typical output:- Unicast reply from 192.168.1.1 [90:2B:34:93:7B:C6] 0.796ms Unicast reply from 192.168.1.2 [00:...

Go to advanced search