New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make mmal_queue_timedwait import conditional #154

Closed
waveform80 opened this Issue Aug 21, 2014 · 13 comments

Comments

Projects
None yet
2 participants
@waveform80
Owner

waveform80 commented Aug 21, 2014

The mmal_queue_timedwait function is present in newer firmwares but not in older ones. As a translation for it was added in picamera 1.7, this prevents the library working with older firmwares (which typically ship with NOOBS). Patch the MMAL translation so it'll only load the function if it's present.

@waveform80 waveform80 added this to the 1.8 milestone Aug 21, 2014

@waveform80 waveform80 added the bug label Aug 21, 2014

@waveform80 waveform80 self-assigned this Aug 21, 2014

@snoygues

This comment has been minimized.

snoygues commented Aug 22, 2014

Hello,

It's seems I got this issue. "AttributeError : /opt/vc/lib/limmmal.so: undefined symbol: mmal_queue_timewait"
Is there a way to solve that ?

Regards,
Sébastien

@waveform80

This comment has been minimized.

Owner

waveform80 commented Aug 22, 2014

Sure - it means you're running a pretty old Pi firmware. Run the following to ensure you've got the latest firmware:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo rpi-update
$ sudo reboot

I'll get picamera updated in the next release to make it work with older firmwares, but generally you'll want later firmwares anyway as there's been many camera-specific enhancements this year.

@snoygues

This comment has been minimized.

snoygues commented Aug 22, 2014

Hi,

Thank you for response !
Unfortunately, I already did this firmwire update (when I do : "sudo rpi-update" feedback is "Your firmwire is already up to date"
I also already did "sudo apt-get update" & "sudo apt-get upgrade" and now if I retry, I get a "reading state information Failed" message.
I try to do it with "super user mode", but get same issue.

I really don't know what to do now. Maybe it's better to restart complet installation. What do you think about ?

Regards,
Sébastien

@waveform80

This comment has been minimized.

Owner

waveform80 commented Aug 25, 2014

I'm afraid that does sound like something's gone wrong with your installation (in particular the "reading state information failed"). I suspect you're right that it's simpler to start with a fresh Raspbian installation! Incidentally, running commands prefixed with sudo runs that command as root, so sudo apt-get update etc. will be running in "super user mode"

@snoygues

This comment has been minimized.

snoygues commented Aug 25, 2014

Some difficutlies to update Rpi to last firmwire, but now everything works well.
Tank you

@snoygues

This comment has been minimized.

snoygues commented Aug 25, 2014

Some Precisions. It seems everything is ok as long as I use my TV screen as console, but as soon as I use the PiTFT 2"8 touch screen, I got the error "AttributeError : /opt/vc/lib/limmmal.so: undefined symbol: mmal_queue_timewait".
Are you awere of this issue ? Do you know a wait to solve it ?

One thing very strange : before installing the screen, I did a firmware update (20 August version).
After screen installing, the firmware version is now : 3.15.3 from 3rd of july. Is it possible that screen installation downgrade Rpi Firmware?

@snoygues

This comment has been minimized.

@waveform80

This comment has been minimized.

Owner

waveform80 commented Aug 26, 2014

I'm afraid the PiTFT screens do indeed appear to downgrade your firmware. I do know from playing with something similar that those screens require a custom firmware. Unfortunately it appears that the firmware they use lags rather far behind the "official" firmware. That's the bad news; the good news is the fix is pretty simple and 1.8 should be out fairly soon (if you can't wait for it, I'll be pushing the patch to the repo shortly so you'll see the necessary changes in a commit below this message in a bit).

@snoygues

This comment has been minimized.

snoygues commented Aug 26, 2014

First of all, thank you for your support.

Of course, I can wait the 1.8 release. Actually, it depends if it’s in days, weeks or months … could you please precise a bit ?

Regards,

Sebastien

From: Dave Jones [mailto:notifications@github.com]
Sent: mardi 26 août 2014 12:47
To: waveform80/picamera
Cc: snoygues
Subject: Re: [picamera] Make mmal_queue_timedwait import conditional (#154)

I'm afraid the PiTFT screens do indeed appear to downgrade your firmware. I do know from playing with something similar that those screens require a custom firmware. Unfortunately it appears that the firmware they use lags rather far behind the "official" firmware. That's the bad news; the good news is the fix is pretty simple and 1.8 should be out fairly soon (if you can't wait for it, I'll be pushing the patch to the repo shortly so you'll see the necessary changes in a commit below this message in a bit).


Reply to this email directly or view it on GitHub #154 (comment) . https://github.com/notifications/beacon/8523224__eyJzY29wZSI6Ik5ld3NpZXM6QmVhY29uIiwiZXhwaXJlcyI6MTcyNDY2OTI0MiwiZGF0YSI6eyJpZCI6NDAyOTcxOTZ9fQ==--ea22de41037bfb57f441e006ec9a78ab0766e579.gif


Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com

@waveform80

This comment has been minimized.

Owner

waveform80 commented Aug 26, 2014

Sure - 1.8 should be out at the end of the week (Friday 29th) at the earliest, or the end of next week (Friday 5th September) at the latest (will depend on how much I can get done this week).

@snoygues

This comment has been minimized.

snoygues commented Aug 26, 2014

Hi,

I finally found a temporary solution : I used and installed the software installation package given by the touch screen manufacturer (http://adafruit-download.s3.amazonaws.com/2014-06-20-wheezy-raspbian-2014-07-25-fbtft-pitft.zip) and did no update at all after that.

It’s works at least for the basic sample provided in the “quick start” page of picamera.

So, maybe it’s no more urgent (for me) to have the new 1.8 version). Anyway, a week delay was ok !

But now, I have a (maybe stupid) question : by default the “preview” function is sent to the HDMI raspberry output.

Is there a way to get it on the PiTFT touch screen?

Regards,

Sébastien NOYGUES

From: Dave Jones [mailto:notifications@github.com]
Sent: mardi 26 août 2014 16:01
To: waveform80/picamera
Cc: snoygues
Subject: Re: [picamera] Make mmal_queue_timedwait import conditional (#154)

Sure - 1.8 should be out at the end of the week (Friday 29th) at the earliest, or the end of next week (Friday 5th September) at the latest (will depend on how much I can get done this week).


Reply to this email directly or view it on GitHub #154 (comment) .Image removed by sender.


Ce courrier électronique ne contient aucun virus ou logiciel malveillant parce que la protection avast! Antivirus est active.
http://www.avast.com

@waveform80

This comment has been minimized.

Owner

waveform80 commented Aug 26, 2014

Currently, to the best of my knowledge, there's no way to get the preview to display on PiTFT screens directly. As I understand it, the preview is an overlay directly on the GPU's output. I don't really understand the reasons why this doesn't work with PiTFT screens (you'd have to ask the firmware devs for a definitive answer), but I'd bet it has something to do with the custom firmware required by them. My assumption is that the preview system relies on something in the standard firmware's video output driver, which the PiTFT's firmware is incompatible with or simply doesn't implement.

In projects like Adafruit's touch camera (which last I checked used picamera), the preview is accomplished by rapidly capturing unencoded images from the video port and displaying them on the screen (i.e. it's not using the built-in preview system).

Still, as noted above I'm in no way an expert on firmware level stuff - if someone can come up with a way to get the built-in preview system to work on PiTFT screens, I'm more than happy to include it in picamera (assuming it requires alternations to the library).

waveform80 added a commit that referenced this issue Sep 3, 2014

Add note about firmware upgrading to install
After the cockup with old firmware compatibility in 1.7 (see #154), it's
worth making people aware of the method and reason for keeping firmwares
up to date
@snoygues

This comment has been minimized.

snoygues commented Sep 7, 2014

problem solved with the 1.8 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment