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

Cannot connect to camera ip on port 8081 #55

Closed
bhizzle opened this issue Jan 12, 2019 · 29 comments
Closed

Cannot connect to camera ip on port 8081 #55

bhizzle opened this issue Jan 12, 2019 · 29 comments

Comments

@bhizzle
Copy link

bhizzle commented Jan 12, 2019

Hello, I believe I have everything installed correctly after having issues with node. I load the camera driver per instructions and run rpos.js. I cannot connect to the interface using 127.0.01:8081 or 192.168.1.xx on a different computer on the network. I really can't confirm that the service is running, not sure how to. Is there a step i'm missing here?

@bhizzle
Copy link
Author

bhizzle commented Jan 12, 2019

So I ran a netstat -tunlp command. The only things I have running are avahi-deamon and dhcpcd. I don't see anything for rpos.

@bhizzle
Copy link
Author

bhizzle commented Jan 13, 2019

ok, so I decided to start back from scratch.

I'm thinking this is the problem.
Any advice would be great!!

20190112_194812

@RogerHardiman
Copy link
Collaborator

Try the latest version of npm.

I had some instructions for upgrading npm in the README but they may be wrong.
I have a feeling it may need to be

sudo npm install -g npm@latest

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

Hi Roger, thanks for the reply. I was able to run the install using that command and I nolonger received those warnings. However, I am back at where I started here. Everything installed, rpos not starting the service. Here is a picture of what happens when I run the rpos.js file. Ignore the random updates and installs I ran above... the result was the same before I started retracing steps in the readme and then searching the web for update commands. I wonder if this has to do with hardware differences? Im running this on a pi zero w. I didn't think that would matter, but maybe it does.

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

20190113_200627

@RogerHardiman
Copy link
Collaborator

RPOS is not finding the Raspberry Pi camera (the one on the ribbon cable)
What Pi cameras do you have?

Can you send the output of 'dmesg' (the end of your dmesg should have the results of the modprobe

@RogerHardiman
Copy link
Collaborator

You can also use this command
v4l2-ctl --list-devices

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

ok. I am using the 5mp OV5647 camera. The one that looks like Johnny 5 with the IR blasters on the side.

The output of dmesg is bcm2835_v4l2: module is from the staging directory, the quality is unknown, you have been warned.

using the last command you sent, I get Failed to open /dev/video0: No such file or directory

@RogerHardiman
Copy link
Collaborator

does the camera work fine with raspivid

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

I haven't tried using another application.

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

Though I'm skeptical about this ribbon cable. Going to swap it out

@RogerHardiman
Copy link
Collaborator

best place to start will be the standard Raspberry Pi tools for using cameras.
they are raspivid and raspistill and there are lots of resources online.

These apps talk direct to the hardware.

There is a wrapper that makes the hardware appear as a Video4Linux device and that is what the modprobe installed and what RPOS uses.

So using the raspivid and raspistill tools test at the most simple level

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

Perfect. That's basic principle right? Make sure the hardware is fully functioning haha. I appreciate your quick responses and hopefully this thread will help others with this. 1 suggestion... maybe adding a line saying camera not found would be a nice addition to the next iteration. I wouldn't have bugged you if I knew why the service wasn't starting. But I do greatly appreciate your prompt reply. I will update this as I get things working (or not) lol.

@RogerHardiman
Copy link
Collaborator

we could make some changes to RPOS to improve the error messages, would need to detect if bcm2835-v4l is installed and then if /dev/video0 is missing the error is the camera is not found

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

It's running now. It was the ribbon cable. So I can get to the configuration page and change settings through the IP address. It won't pull into Milestone yet, but that is probably me. I haven't verified an image yet, so once I do that I'll start down that rabbit hole.

@RogerHardiman
Copy link
Collaborator

great. if you want to submit a pull request for the source code to improve error messages that would be great
Quick test ffplay rtsp://yourip:8554/h264

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019

Ok thanks Roger. Last question of the night. Is it supposed to hang like this forever or am I supposed to get my prompt back at some point?

The rtsp stream does not connect. I had tried that already and just verified its still a no go.

20190113_210650

@RogerHardiman
Copy link
Collaborator

You don't get the prompt pack.
I spawn it with node rpos.js &

Have a look at the nohup command in linux too

@bhizzle
Copy link
Author

bhizzle commented Jan 14, 2019 via email

@bhizzle
Copy link
Author

bhizzle commented Jan 15, 2019

Worked on this a bit more tonight. I have this mostly working. The camera is now live streaming upon running the rpos.js and also through raspivid. I can access the camera settings page on port 8081 and using VLC I can watch the live stream from :8554/h264. However, I CANNOT get milestone to pull in the camera successfully. It detects it, finds the correct model info, but refuses to add the camera. Here are the screen pics. Have any idea where to start with this?

20190114_223636

20190114_223553
20190114_223610

@RogerHardiman
Copy link
Collaborator

RogerHardiman commented Jan 15, 2019

It did work with milestone once and someone did a bug fix recently for their milestone system.
But rpos does not implement all of the ONVIF spec so it could be an rpos bug.

What version of milestone are you on?

@RogerHardiman
Copy link
Collaborator

Actually can you open a new issue with a title of Milestone plus the milestone version . Then I can track the milestone problem. Thanks.

@ghost
Copy link

ghost commented Jan 16, 2019

I got the exact same problem before I made the fix ( that should be in the code now ) problem is that Milestone don't accept a NIC with localhost and no real mac-address.

@RogerHardiman
Copy link
Collaborator

Can you check if I implemented your fix properly. I may have made an error copying in the fix.
If you can do a Pull Request I can merge the fix properly.

Thanks

@RogerHardiman
Copy link
Collaborator

Hi.
I have a milestone bug fix that I did not implement properly. I'll try and fix it later today.

@RogerHardiman
Copy link
Collaborator

Commit has been made. Please get the latest source from GitHub, rebuild it and try it with Milestone.

@prometrix had sent in a fix to look for loopback network interfaces. I'd not realised the Pi uses 'lo' whereas the Mac uses 'lo0'.

@bhizzle
Copy link
Author

bhizzle commented Jan 16, 2019 via email

@bhizzle
Copy link
Author

bhizzle commented Jan 17, 2019

Works PERFECT! Thank you so much!

@bhizzle bhizzle closed this as completed Jan 17, 2019
@RogerHardiman
Copy link
Collaborator

Great

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