Skip to content
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

Issues running purethermal1 on pi zero 2w #56

Open
techmaticsnz opened this issue Jan 25, 2023 · 4 comments
Open

Issues running purethermal1 on pi zero 2w #56

techmaticsnz opened this issue Jan 25, 2023 · 4 comments

Comments

@techmaticsnz
Copy link

Hello,

We've been using your thermal board for some time now so just wanted to thank you for the continued support that's been given over using this particular product in our line of robots.

I'm experiencing a stressful issue at the moment trying to stream the purethermal1 over wifi with flask. (flir lepton 3.5)

If I start up the program I get this error (over and over)
[ WARN:[email protected]] global /tmp/pip-wheel-nz49_ez6/opencv-python-headless_488dea44cb7d406baf80df0bfc388ff9/opencv/modules/videoio/src/cap_v4l.cpp (1013) tryIoctl VIDEOIO(V4L2:/dev/lepton_camera): select() timeout.

I may get a single frame to display every minute.

The board is just running one purethermal device.

We've tried using the product, same program, on a pi3b, also a pi zero, and a pi 4.

We only have access to one pi zero 2, so are looking for an alternative solution to determine how to fix than simply replacing pi zero 2 (as you are aware limited numbers world wide)

What should we be using and is there an alternative way to stream the device over wifi?

Regards

Nathan

@techmaticsnz
Copy link
Author

techmaticsnz commented Jan 27, 2023

I've done a little digging. Can I get some help with what could possibly be happening?

This is the dmesg log when running the opencv program.
https://pastebin.com/FeypS204

I've tried using libuvc version of getting frames and found out some more helpful information.
using this program:

https://pastebin.com/RUAkVxEJ

it appears that after 30 seconds it can't find any frames from the callback and closes.

Tried camera on a pi zero, Pi3b, and Pi4b. Tried the camera on the same program on Pi3b and Pi4b, works.
It appears to be something specific to the pi zero 2.
It appears to be an issue with the start_streaming function.

as logs of this show:

device opened!
Version gpp: 3.3.26 dsp: 3.3.26
FLIR part #: b'500-0771-01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
FLIR serial #: b'\xcdT7\x01\x00\x00\x00\x00'
format: b'UYVY'
  frame 160x120 @ 9fps
format: b'Y16 '
  frame 160x120 @ 9fps
  frame 160x122 @ 9fps
format: b'Y8  '
  frame 160x120 @ 9fps
format: b'RGBP'
  frame 160x120 @ 9fps
format: b'}\xeb6\xe4'
  frame 160x120 @ 9fps
Estimated / selected altsetting bandwith : 18 / 642. 
starting_streaming
getting frame

Should note that the opencv program DOES receive frames every once in a while. but it is largely the select timeout issue trying to read frames from the camera.

@techmaticsnz
Copy link
Author

techmaticsnz commented Jan 27, 2023

It doesn't appear to be related to hardware... We tried plugging in a keyboard to the USB port and it works fine.
Also if we run the camera through a USB hub it actually starts getting data, but quickly after starting the program it closes because it doesn't read any frames.

@EduardoRonchi
Copy link

Any updates on this issue? I am having the same problem with PT Mini + Lepton 3.5 and Raspberry Pi 4B. If I restart my raspberry solves the problem, but it comes back after some time.

@techmaticsnz
Copy link
Author

techmaticsnz commented May 25, 2023

Sorry for the late reply, but we've found the Purethermal Breakout board a good replacement for the Purethermal 2. It connects the thermal camera over I2C and SPI. Hope this still helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants