There are multiple approaches to accomplish what you want. They way I am going to describe is probably going to have a learning curve though, because I used C. Most of the information I used came from this very helpful guide.
With this method, you are going to need a client and a server to communicate between the two Raspberry Pis. The exchange of ...
The short answer is - you cant. Or really, there is no point.
A connection between two computers using a cable is called a "direct cable connection". Or in your case "USB direct cable connection". The problem is that USB also supplies power, and you can't connect two USB hosts together. If you do that, you need some spacial cable which is in fact two USB ...
You could take a look at this cable from Adafruit:
It is a USB to TTL serial cable which allows you to connect serial communication to the Pi's GPIO pins. You would then need to find a way of communicating via serial from your C++ program . This is similar to the way in which an Arduino communicates to a laptop or PC so ...
Two common and fairly flexible methods would be:
Direct ethernet connection. This requires you have an ethernet jack on the PC that is not otherwise in use. You connect that to the Pi, and you can create a subnet with two nodes. Once upon a time this required an ethernet "cross-over" cable but generally contemporary jacks, including those on the pi, do ...
You can run this as a serial USB device (FTDI-based cable) to GPIO pins
or you can use the raspberry pi in OTG mode to run the PI as a USB peripheral. The raspberrypi zero fits this form factor very well and I think the design intent was to have folks using the zero as a USB peripheral.
I'd go for Ethernet, either point-to-point or through the router. Why?
It handles transmission errors, correction etc. "out of the box" - I guess it's important for medical purposes (your heart rate is now doubled because one bit changed - whoops)
It can be long (up to 100 m - and can be extended)
It's cheap and commonly available
You can get decent quality ...
It depends how 'old' you phone is. If it's touchtone, it's somewhat easier, if decadic dial a little more challenging. you should read up on phones before starting, and this is a good reference.
You can break the problem into parts:
Power the phone. This is normally a 48 VDC line with a 680 Ohm series resistor (called the subscriber ballast If I remember ...
You can simply use the iwconfig tools on the both your Pis to join to an ad-hoc network.
use the following:
sudo iwconfig wlan0 mode ad-hoc channel 01 essid my-net
You can use your Link-Local addresses to interact with the pis in general.
A smart way to know your local network Pis can be to use:
ping -I wlan0 18.104.22.168
It is a Multicast Address which ...
The simplicity of these is that its a transparent UART channel so you can add as many transceivers as you like and all the nodes will get the data. You need to create some kind of simple model based on JSON, where you embed an ID, the NODE you are interested in a multi tenant environment, and the command or data. JSON is easy to read, compressed well when ...
The Raspberry Pi and all microcontrollers used in the Arduinos natively support a number of standard protocols, e.g. RS-232 (often called "UART" on embedded platforms), SPI and I²C/TWI, for each of which you will find plenty of tutorials.
RS-232 is probably the most robust of them when it comes to long transmission distances, but at the 10 to 15 meters you'...
For the server, it makes sense to obtain the hostname via
host = socket.gethostname()
But how should the client know to whom to connect if you use the same command there?
In the client
host = socket.gethostname()
prints the name of the client, not the host, isn't it?
Here, you might want to give the hostname of the server explicitly.
If both Raspberry Pi and the PC are inside the same Network then you can send data to the PC using a web server,
Start by setting up a simple server based on web.py, which is installed via
sudo apt-get install python-webpy
Now create a directory to put the code in and create a simple test program
Now let's ...
I have a Certification Authority set up in a Raspberry Pi, with an Air Gap model, running xCA, which runs great on the Pi, by the way.
It can do even asymetric cryptography without problems, but I would say you have to measure the amount of cryptography and the response time you need, given that very large amounts of data can take a while to process. I don'...
Mid ocean video communication can't be done for the $50 price range.
The Rockblock is for "short messages" meaning text or data under 340 bytes.
Videos are more like 1,000,000,000 bytes.
and just to give you an idea of how small that is;
> echo "Hello, this message is exactly 340 bytes when gzipped. It's actually some text but it's no video. This is 469 ...
The easiest way to start of would be to use RasPBX
It is a Raspbian Jessie base OS with Asterisk and FreePBX installed and preconfiugred with all the goodies. (Trust me, the pre confiugraion of all these applciations takes allot of time)
Since it is Debian OS, you can install Python on it (probably is already installed) ...
If the content of the message comprises only characters 0-9 A-F then the message is in all likeliness encoded in hexadecimal.
If you copy and paste the message payload into a utility that translate hexadecimal to ASCII you might be pleasantly surprised with a message.
Yes the Raspberry Pi can scan and read the data from BLE Beacons.
There are lots of different beacon data formats, one of the more popular is the Eddystone format. https://github.com/google/eddystone
There are dedicated beacon manufacturers of beacons that will run on coin cells for a year+.
If you wanted to create something yourself, then boards like the ...
You can also use the UART on both units, just make sure you connect Tx on one with Rx on the other. Should get you at least 112000 kbps, and it is standard supported in both Raspbian (e.g. via the screen utility) as well as in programming languages. GPIO14 is Tx, GPIO15 is Rx.
125 Kilo Hertz - Close Proximity
This is a really great way but these only work up to 15 centimetres. That is only 1/4 of what you need.
This Olimex, produced in Europe emulates a keyboard input, which the Pi can do over USB. Its cheap at 5 GBP and works with tags on 125Khz
This site is another hackerspace shop that has some interesting custom solutions ...
This post contains some discussion on 'bit banging' (apparently the term for software-implemented UART) on a Raspberry Pi - it might have some information you could use ?
How to get more than one uart interface
And as far as simple encoding - the Manchester Encoding scheme looks quite straightforward to implement; but as you have two-way communication, it ...
I suggest using Bluetooth Low Energy (BLE). You can get a dongle (pay attention that it is a BLE and not regular Bluetooth dongle).
As name already says - it is low energy.
Then I would setup an ad hoc network over Bluetooth connection. I have written a blog post about that.
You can use ssh with IP address set up by DHCP.
As mentioned in the comments above, the use of this C library solves the problem.
However, as I don't want to switch to C I will not accept it as an answer for now.
EDIT: There is the solution:
pip uninstall pyserial
pip install "pyserial==2.5"
Thanks @MartinHjelmare on github
The most common wireless communications for arduino/Pi/sensors are:
RF (something like a 433Mhz Tx/Rx module)
Those are simply the communication channel and any/all will work - the differences between them are range, speed, power requirements and how you interface with them.
You will also need to decide upon a message transfer protocol ...
you will need to have another micro there - this the most reliable solution.
Or use long range I2C IC-s as described here
You can can actually archive 120k clock speed on 250m connection - but I am not a fan of such constructions. Personally I prefer micro in the middle and proper RS-4xxlink.
pigpio allows for the control of multiple Pi's GPIO from one or more Pis.
Your Python program must import pigpio and create one or more instances of the pigpio.pi class. This class gives access to a specified Pi's GPIO.
pi1 = pigpio.pi() # pi1 accesses the local Pi's GPIO
pi2 = pigpio.pi('tom') # pi2 accesses tom's GPIO
pi3 = pigpio.pi('...
Finally I was able to find a solution. I used the example 2 from this post posted in Arduino forum https://forum.arduino.cc/index.php?topic=396450.0. I have edited python code also.
// Example 2 - Receive with an end-marker
const byte numChars = 32;
char receivedChars[numChars]; // an array to store the received data
boolean newData = ...
Your host code is
host = `192.168.0.1`
while the client code is
host = '192.168.0.10'
As you say connecting with telnet works, the address of the host must be 192.168.0.1, so the client should connect to 192.168.0.1 and not to 192.168.0.10.