2

My brother presented me with a challenge: he's building a mobile bar on a lrage truck for the crazy festival known as Burning Man. He'd like a retro-styled video intercom system. I have some experience with the Pi, but this is a big hurdle. Here are the project goals.

1. Get two Pi's to connect to one another using no switch, but rather a single Cat 5e cable

This is actually reasonably easy--from what I gather, I can hard-code each Pi's IP address, such that each knows which to connect to. Thoughts?

2. Using two 3.2" SainSmart TFT screens, each Pi shall display the output of the other's camera.

This, I thought, would be pretty easy. It's actually much harder than I thought. As a unit test, I thought I could display what the camera output was (using motion) as the output on the camera. This command is instead producing many errors.

sudo mplayer -demuxer lavf -vo fbdev2:/dev/fb1 -x 240 -y 320 -zoom rtmp://[IP address of motion webcam]:8081/stream.mjpg

3. Create an audio intercom system using a pushbutton-style communication.

My hope is that now this is easier. I'm using a Syba sound card and two gaming-style headsets (each having a separate mic input and speaker output). Not such how to handle this yet.

So, let's handle the first problem (#2)--is it possible to display the output from Motion to a TFT screen using mplayer? Has anyone tried this, and if so, can they provide the correct command?

I'm using the following parts: Allied Electronics Raspberry Pi 2 Model B Allied Electronics Raspberry Pi NOIR Camera Module SainSmart 3.2" TFT LCD Module 320x240 Touch Screen Display SKU:20-111-971 Inland Cat 5e Cable - Black 50 ft Syba Sound Card Microphone/Speaker 5V 2A Power Supply

4
  • On #2. Can you see the motion stream on a normal web browser (e.g. from your computer)? That would tell you if the issue was with the server or client machine. Tough to know based on the data you provided.
    – ifermon
    Jun 30, 2015 at 17:16
  • You could use a cross-over cable for #1, if that will make life easier (it probably will, since you could then set them up more or less identically -- otherwise one will have to play the role of router). I think it is not hard to turn a normal eth cable into a cross-over, ideally by cutting off and replacing one connector. Note that most of your more specific questions will be better off on our larger sibling site, Unix & Linux.
    – goldilocks
    Jul 1, 2015 at 14:13
  • To ifermon, yes, I can see the motion stream on a web browser--so that is ruled out.
    – sjfischr
    Jul 2, 2015 at 22:55
  • To goldilocks, great idea, but Raspberry Pi's can actually find one another when connected with a standard Cat 5e--thereby eliminating the need for a crossover. Great tip, though!
    – sjfischr
    Jul 2, 2015 at 23:01

2 Answers 2

2

Why not cross connect camera and screen? You would need not connect RPi's then. Just connect camera no.2 to PI no.1 and screen no.1 to PI no.1, screen no.2 to PI no.2 and camera no.1 to PI no.2 Connection between PI's now optional (depending what else functionality you need). Mics can be connected similarly.

Extremely professional schematics attached!

Extremely professional schematics

Perhaps investing in cables long enough to connect it like that would be costly. But first of all, could you try to view camera feed locally? Post some of the errors here as well, can't say what is wrong without those errors.

On #1 you can define structure for your dhcp manually, try to google that, I'm not so sure of my abilities in that area, but I did it once, and I am pretty sure it is possible.

On #2 If you are not very attached to those headsets, then you could disassemble jack, and cross connect it (join microphone from one headset with speakers from the other, then connect to PI). Then it should be easy to playback audio recorded with microphone on headphones. There should be an option in whatever mixer you are using to playback microphone.

5
  • I love this idea, but the concern is length. An article here link indicates that the max length is perhaps about 12'--I will need about 16'--not to mention that this could add over $200 USD to the cost for about 10m of ribbon cable! Re-addressing the big question--has anyone gotten a motion video to show up on a TFT screen? Think of a TFT screen as a preview on a camera. Thanks!
    – sjfischr
    Jul 4, 2015 at 16:06
  • Wow, I didn't expect it to be THAT long ;) @sjfischr could you still post some of the errors that you get? They are mostly helpful in solving a case. Jul 6, 2015 at 5:54
  • Hey @Piotr, I'm using the following command: pi@raspberrypi ~ $ sudo mplayer -demuxer lavf -vo fbdev2:/dev/fb1 -x 240 -y 320 -zoom rtmp://10.0.0.246:8081/stream.mjpg ...And this error follows MPlayer svn r34540 (Raspbian), built with gcc-4.6 (C) 2000-2012 MPlayer Team mplayer: could not connect to socket mplayer: No such file or directory Failed to open LIRC support. You will not be able to use your remote control. Playing rtmp://10.0.0.246:8081/stream.mjpg. libavformat version 53.21.1 (external) Mismatching header version 53.19.0
    – sjfischr
    Jul 7, 2015 at 1:47
  • <cont'd> Using network protocols without global network initialization. Please use avformat_network_init(), this will become mandatory later. HandShake: Type mismatch: client sent 3, server answered 72 HandShake: client signature does not match!
    – sjfischr
    Jul 7, 2015 at 1:50
  • Well I think it says to use avformat_network_init(), whatever it does :P Perhaps somebody will have more insight in this matter, I'm no expert in this area Jul 7, 2015 at 6:44
1

OK, all--thank you for your suggestions! @Piotr, you really helped me focus on simplicity and reliability--this is indeed essential as my brother will be using the system without a team of electronics or tech experts--it has to "just work".

Here's what I did to get it working:

1) Set the camera output to FB1--this is essential to allow the raspistill command to preview to the TFT. 2) Used a command to display the camera output indefinitely:

raspistill -fp -t 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.