ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Raspiraw Usage and error when executing "camera_i2c"

Tue Feb 13, 2018 8:26 pm

I get the following error when attempting to configure Raspiraw and execute camera_i2c on my Raspberry Pi 3.
Not sure how to fix this.

buf: not found
Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

HermannSW
Posts: 612
Joined: Fri Jul 22, 2016 9:09 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Wed Feb 14, 2018 8:30 am

Seems you missed the steps under "Prepare" here, please try:
viewtopic.php?f=43&t=189661&p=1232058#p1218763
--> Raspberry camera / gstreamer / raspivid / raspiraw (bookmark list):
https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/raspiraw      https://github.com/Hermann-SW/userland      https://twitter.com/HermannSW

ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Wed Feb 14, 2018 7:50 pm

Shouldn't I be following 6by9's instructions listed below?

raspiraw usage
do once

You have to clone the repo. Then "cd raspiraw; ./buildme". Finally add this line to your ~/.bashrc.
$ tail -1 ~/.bashrc
PATH=~/raspiraw:~/raspiraw/tools:$PATH
$

do once after reboot or use of raspistill/raspivid

Execute camera_i2c to make raspiraw work.
$ camera_i2c
setting GPIO for board revsion: a01041
A+, B+, and B2 all revisions - I2C 0 on GPIOs 28 & 29. GPIOs 32 & 41 for LED and power
$

HermannSW
Posts: 612
Joined: Fri Jul 22, 2016 9:09 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Wed Feb 14, 2018 9:06 pm

He merged the README.md changes from my fork, those instructions are from me, see history:
https://github.com/6by9/raspiraw/commit ... /README.md

And those instructions miss that you need to get /dev/i2c-0 working.

Do you see /dev/i2c-0 on your Raspberry?
If not, please follow the "Prepare" steps I pointed to.
--> Raspberry camera / gstreamer / raspivid / raspiraw (bookmark list):
https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/raspiraw      https://github.com/Hermann-SW/userland      https://twitter.com/HermannSW

ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Wed Feb 14, 2018 9:39 pm

I followed your Prepare instructions and after running camera_i2c i get this response.

setting GPIO for board revsion: a22082
Raspberry Pi3
/home/pi/raspiraw/camera_i2c: 112: /home/pi/raspiraw/camera_i2c: ./rpi3-gpiovirt
buf: not found
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5074
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspiraw Usage and error when executing "camera_i2c"

Thu Feb 15, 2018 9:53 am

/home/pi/raspiraw/camera_i2c: 112: /home/pi/raspiraw/camera_i2c: ./rpi3-gpiovirt
buf: not found
So that's the error.
The file is in the raspiraw repo with the correct permissions, so something has gone wrong in transferring the files to your system.

And please note that the https://github.com/6by9/userland/tree/rawcam branch is deprecated in favour of the having raspiraw in a seperate repo at https://github.com/6by9/raspiraw/. The first post in viewtopic.php?f=43&t=109137 has been updated with the revised details.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

HermannSW
Posts: 612
Joined: Fri Jul 22, 2016 9:09 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Thu Feb 15, 2018 1:18 pm

@ajjsss has the correct version, see the text from README.md he cited.

I can recreate the problem he has, camera_i2c only works if executed from raspiraw directory.
Reason is the "./rpi3-gpiovirt" call:

Code: Select all

pi@raspberrypi2B:~ $ camera_i2c 
setting GPIO for board revsion: a02082
Raspberry Pi3
/home/pi/raspiraw/camera_i2c: 112: /home/pi/raspiraw/camera_i2c: ./rpi3-gpiovirtbuf: not found
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
pi@raspberrypi2B:~ $ 

And working:

Code: Select all

pi@raspberrypi2B:~ $ cd raspiraw
pi@raspberrypi2B:~/raspiraw $ camera_i2c 
setting GPIO for board revsion: a02082
Raspberry Pi3
Set state of 133 to 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: 10 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- 64 -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         
pi@raspberrypi2B:~/raspiraw $ 
--> Raspberry camera / gstreamer / raspivid / raspiraw (bookmark list):
https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/raspiraw      https://github.com/Hermann-SW/userland      https://twitter.com/HermannSW

ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Thu Feb 15, 2018 8:22 pm

That was the issue. Thanks you for the quick response.

HermannSW
Posts: 612
Joined: Fri Jul 22, 2016 9:09 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Thu Feb 15, 2018 8:37 pm

ajjsss wrote:
Thu Feb 15, 2018 8:22 pm
That was the issue. Thanks you for the quick response.

If you have a v1 camera as well, you might want to take 350fps or 665fps videos with raspiraw like in this thread:
viewtopic.php?f=43&t=201568


With v2 camera ...

... you can capture with normal raspivid 800x760 at 120fps!
viewtopic.php?t=201728#p1256653

... you can capture 640x480 at 240fps with raspiraw ("tools/640x480 2500 240"):
viewtopic.php?f=43&t=109137&start=375#p1263896

... you can capture 640x480 at 180fps with modified raspivid:
viewtopic.php?f=43&t=204775
--> Raspberry camera / gstreamer / raspivid / raspiraw (bookmark list):
https://stamm-wilbrandt.de/en/Raspberry_camera.html

https://github.com/Hermann-SW/raspiraw      https://github.com/Hermann-SW/userland      https://twitter.com/HermannSW

ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Fri Feb 16, 2018 1:51 pm

Can Raspiraw display video on the screen without storing the video like you can with Raspivid? If so, what is an example command line statement to do this?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5074
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspiraw Usage and error when executing "camera_i2c"

Fri Feb 16, 2018 1:59 pm

ajjsss wrote:
Fri Feb 16, 2018 1:51 pm
Can Raspiraw display video on the screen without storing the video like you can with Raspivid? If so, what is an example command line statement to do this?
Don't specifiy an output file (ie omit "-o <filename>") and it'll do a crude job at rendering the stream to the screen. You have no AE or AWB, so the pictures will be off.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Fri Feb 16, 2018 3:27 pm

Using Raspivid and this command line statement (raspivid -w 640 -h 480 -fps 90 -t 0000 -p 0,0,640,480) I can display a 640x480 image on my monitor and also control the size and position of the image on my monitor. What would a comparable Raspiraw command line statement look like?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5074
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspiraw Usage and error when executing "camera_i2c"

Fri Feb 16, 2018 4:08 pm

(a) You have no choice over scaling with raspiraw. It is designed to get the image data off the sensor for your own purposes, not as a general purpose camera stack. The only scaling that will get done is if the input image is too high a resolution for the display engine, in which case it divides the width & height by 2 in the hope that is reasonable (it probably ought to do that repeatedly)

(b) You currently can't specify a display window with raspiraw, mainly as it isn't intended for general viewing of the images. Feel free to pull the required code from RaspiVid and submit a PR for raspiraw (You want the CommandPreview handling from https://github.com/raspberrypi/userland ... iPreview.c, and then setting MMAL_DISPLAYREGION_T on the render component)
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ajjsss
Posts: 7
Joined: Thu Feb 08, 2018 9:35 pm

Re: Raspiraw Usage and error when executing "camera_i2c"

Fri Mar 02, 2018 2:22 pm

Where would I find a list of the command line options for both raspiraw and raspi_tc358743?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5074
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Raspiraw Usage and error when executing "camera_i2c"

Fri Mar 02, 2018 2:49 pm

ajjsss wrote:
Fri Mar 02, 2018 2:22 pm
Where would I find a list of the command line options for both raspiraw and raspi_tc358743?

Code: Select all

pi@raspberrypi:~/raspiraw $ ./raspiraw --help
-?, --help	: This help information
-md, --mode	: Set sensor mode <mode>
-hf, --hflip	: Set horizontal flip
-vf, --vflip	: Set vertical flip
-e, --ss	: Set the sensor exposure time (not calibrated units)
-g, --gain	: Set the sensor gain code (not calibrated units)
-o, --output	: Set the output filename
-hd, --header	: Write the BRCM header to the output file
-t, --timeout	: Time (in ms) before shutting down (if not specified, set to 5s)
-sr, --saverate	: Save every Nth frame
-b, --bitdepth	: Set output raw bit depth (8, 10, 12 or 16, if not specified, set to sensor native)
-c, --cameranum	: Set camera number to use (0=CAM0, 1=CAM1).
-eus, --expus	: Set the sensor exposure time in micro seconds.
-y, --i2c	: Set the I2C bus to use.
-awbg, --awbgains	: Set the AWB gains to use.
-r, --regs	: Change (current mode) regs
-hi, --hinc	: Set horizontal odd/even inc reg
-vi, --vinc	: Set vertical odd/even inc reg
-f, --fps	: Set framerate regs
-w, --width	: Set current mode width
-h, --height	: Set current mode height
-lt, --left	: Set current mode left
-tp, --top	: Set current mode top
-hd0, --header0	: Sets filename to write the BRCM header to
-hdg, --headerg	: Sets filename to write the .pgm header to
-ts, --tstamps	: Sets filename to write timestamps to
-emp, --empty	: Write empty output files
https://github.com/6by9/raspiraw/ gives extra descriptions of the options.

"raspi_tc358743 --help" should also apply, but I haven't run it for a while and don't have a convinient binary for it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”

Who is online

Users browsing this forum: No registered users and 11 guests