photo-bro
Posts: 1
Joined: Fri Apr 10, 2015 6:00 pm
Contact: Website

Networking Two PIs without internet or wires

Fri Apr 10, 2015 6:07 pm

Hello!

I am a college student currently in a networking class. My goal right now is to be able to write a Python based chat client between two PIs that uses a networking method that isn't the internet or ethernet. Something along the lines of using a laserpointer and photodiode to shoot pulses of information across a room, or using a speaker to play a sine wave bursts that a microphone would pick up, etc.

I am not terribly familiar with PIs and what accessories are available. Are there any accessories, such as connecting a laser pointer and photodiode that are easy to order?

Thanks!

Jonn
Posts: 35
Joined: Wed Aug 01, 2012 12:15 pm

Re: Networking Two PIs without internet or wires

Sat Apr 11, 2015 6:36 am

That sounds interesting. A laser with a bit of fog to make the beam visible would give a showy demonstration. (Remember eye safety!)

The Gerboard helps demonstrate some capabilities of the GPIO pins. At timecode [4:00-4:10] of the video, Gert mentions transmission of character information, but I suppose it may be over a wire. https://www.raspberrypi.org/gertboard-rev2-video/
(and https://www.youtube.com/watch?t=139&v=Dp_PNI9Qo2k )

A couple videos are inspiring and make it look like a breadboard and a little electronics might do the job for the hardware. Since I am not skilled in electronics, I'd refer you to your school's department for advice--I certainly wouldn't want you to risk damaging your RaspberryPi.

How to make infrared sensor in few steps! https://www.youtube.com/watch?v=XsHnvvSzr1M
Homemade laser motion sensor https://www.youtube.com/watch?v=FA2aj33OwMo
(This beginner video was linked on the Gertboard video's Youtube page: https://www.youtube.com/watch?v=q_NvDTZIaS4 )

There is a bold font caution on the GPIO page: https://www.raspberrypi.org/documentati ... /README.md
It also links to http://elinux.org/RPi_Low-level_peripherals

Some of the places to look for things that work or are available are
http://elinux.org/RPi_VerifiedPeripherals (via http://elinux.org/RPi_Hub)
http://www.adafruit.com/products/1560 (specialized IR receiver and handheld remote)
http://www.element14.com/community/search.jspa?q=IR+LED

I have a toy that responds to sounds, Bleep, the Weebot (from several years ago), but the remote control makes sharp loud noises. That's probably for a good signal to noise ratio, but it isn't as human ear-friendly as Star Wars' R2D2. http://www.amazon.com/Sharper-Image-SI5 ... B000KB8IIK

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Networking Two PIs without internet or wires

Sat Apr 11, 2015 9:17 am

Ir remote control transmitter and receiver would work.

You could look at 433MHz radio nowire.

Old style analogue modem techniques should work for audio transmission.

A key thing for reliable communication is to modulate a carrier and file at the recurve to only respond to modulations of that carrier frequency.

Blue tooth serial modules can provide simple point to point links accessed as simple serial(tty) ports.

burricios
Posts: 19
Joined: Tue Mar 03, 2015 2:26 pm

Re: Networking Two PIs without internet or wires

Sat Apr 11, 2015 9:23 am

Hi,
If there is no problem of objects between both Pi's, you could just use an IR emitter/receiver pair in order to send messages to each other. It is very inexpensive and should be quite easy to do.

If you want them to be able to communicate even between different rooms, you could use some RF modules. The NRF24L01+ is a very inexpensive transceiver chip with nice capabilities, and I think there are some libraries for it out there.
You could also use bluetooth, buying a couple HC05 modules from DX or Aliexpress should be very cheap, and again there should be a lot of information for them.

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Networking Two PIs without internet or wires

Sun Apr 12, 2015 3:46 pm

using two ultrasonic distance sensors would be a novel way to do it - you've got a transmitter and detector in each...
http://www.dx.com/p/hc-sr04-ultrasonic- ... ule-133696

You could do it with webcams, servo motors, and flags. and do automated semaphore.

loudspeakers and mics.speech synthesis and recognition.have the two pis speak to each otherfor hours on end, saying nothing but 'one. one. zero. zero. one. one. one...'
note: I may or may not know what I'm talking about...

PiGraham
Posts: 3566
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Networking Two PIs without internet or wires

Sun Apr 12, 2015 7:34 pm

toxibunny wrote:You could do it with webcams, servo motors, and flags. and do automated semaphore.
:lol:
Excellent idea!
Here's the flag waving part...
http://www.doctormonk.com/2012/07/raspb ... art-2.html

hippy
Posts: 5568
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Networking Two PIs without internet or wires

Sun Apr 12, 2015 7:46 pm

Have a read-up of IrDA. That should be pretty easy to interface to a Pi's UART.

User avatar
joan
Posts: 14069
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Networking Two PIs without internet or wires

Sun Apr 12, 2015 9:36 pm

PiGraham wrote:
toxibunny wrote:You could do it with webcams, servo motors, and flags. and do automated semaphore.
:lol:
Excellent idea!
Here's the flag waving part...
http://www.doctormonk.com/2012/07/raspb ... art-2.html
This is flag waving. Skip the first minute. https://www.youtube.com/watch?v=HBFMTbcNLtg

mikerr
Posts: 2770
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: Networking Two PIs without internet or wires

Sun Apr 12, 2015 10:26 pm

Use slow morse code ... then us humans can "eavesdrop" :)
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
DougieLawson
Posts: 35519
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Networking Two PIs without internet or wires

Sun Apr 12, 2015 11:56 pm

The best wireless networking method is documented in RFC 1149 https://www.ietf.org/rfc/rfc1149.txt

The funniest part of that was the implementation of it by the Norwegians from the Bergen Linux User's Group.
http://news.bbc.co.uk/1/hi/sci/tech/1321176.stm
Note: Having anything remotely humorous in your signature is completely banned on this forum. Wear a tinfoil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 11993
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Networking Two PIs without internet or wires

Mon Apr 13, 2015 12:10 am

Ah, the old pigeon route isn't it? always good for a laugh, and explaining how TCP/IP works.

BMS Doug
Posts: 3824
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Networking Two PIs without internet or wires

Mon Apr 13, 2015 5:51 am

toxibunny wrote:using two ultrasonic distance sensors would be a novel way to do it - you've got a transmitter and detector in each...
http://www.dx.com/p/hc-sr04-ultrasonic- ... ule-133696
this would require some hardware hacking as the HC-SR04 sends a processed reply (time since transmit pin was pulsed) rather than a raw ultasonic signal received pulse.
Doug.
Building Management Systems Engineer.

TacticalNinja
Posts: 3
Joined: Wed Nov 05, 2014 9:23 am

Re: Networking Two PIs without internet or wires

Wed Apr 15, 2015 4:05 pm

I don't really get what you mean by "networking", but if you are only referring to being able to send any form of data, or message from one to another, then any of the above suggestions would suffice. All that's left is for you to decide how the message is encoded/modulated, and decoded/demodulated through what ever medium you used.

scotty101
Posts: 3648
Joined: Fri Jun 08, 2012 6:03 pm

Re: Networking Two PIs without internet or wires

Wed Apr 15, 2015 4:35 pm

Connect a laser pointer to a transistor and drive it on and off using the Raspberry Pi's UART Tx pin.

At the other end use a photodiode, an op amp and some other bits to connect this to the recieve pin of the UART.

If you use a slow enough baud rate (say 2400) I imagine that should work.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Return to “Beginners”