Go to advanced search

by altanhaligur
Tue Aug 27, 2019 2:24 pm
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

Re: MQTT without internet

mattmiller wrote:
Tue Aug 27, 2019 12:21 pm
MQTT is not a continuous protocol - it is for passing discrete messages
For example you can take GPS data continuously with MQTT, am i wrong?
by altanhaligur
Tue Aug 27, 2019 2:23 pm
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

Re: MQTT without internet

MQTT is not a continuous protocol - it is for passing discrete messages For continuous i mean; i want to send instant data, for example turn right, from one RPi to another RPi. But i want to do it continuously. For example with one RPi with joystick, i want to send this joystick values to the other...
by altanhaligur
Tue Aug 27, 2019 11:37 am
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

Re: MQTT without internet

Thanks, i set my Raspberry Pi as a broker and i made communication from localhost. Now i will try one RPi to another RPi. But when i searching on the internet, i cant see continous data transfer. Is there any example?
by altanhaligur
Tue Aug 27, 2019 7:02 am
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

Re: MQTT without internet

I think there is one missing point. I have two RPis, one on underwater, one on above water. I make communication with wire them with ethernet cable. I use pure tcp to connection, communication (socket module in python). But it is hard because i should make my program multithreaded, i should make str...
by altanhaligur
Fri Aug 23, 2019 11:43 am
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

Re: MQTT without internet

It only needs an IP network as it uses TCP/IP for comms between the subscriber or publisher and the broker. An IP network doesn't mean you need the public internet. Two devices and one ethernet cable makes a network. I'd give the RPi a fixed IP address (172.31.4.159) and run dnsmasq (with a DHCP po...
by altanhaligur
Fri Aug 23, 2019 11:41 am
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

Re: MQTT without internet

mattmiller wrote:
Thu Aug 22, 2019 1:29 pm
Yes - assuming your connecting the two using CAT ethernet cable, then you can just run a broker on one of them and use MQTT to pass data back and forth
Can broker behave like a publisher at the same time? I think 3 RPİ should be connected with 2 ethernet cable. Am i right?
by altanhaligur
Thu Aug 22, 2019 1:20 pm
Forum: Networking and servers
Topic: MQTT without internet
Replies: 19
Views: 3163

MQTT without internet

Hello guys, i want to make ROV with 2 raspberry pi, one on underwater one on above water, and communication between two RPİ based on TCP/IP. Can i use MQTT for this communication? I think i can add one more RPİ as a MQTT broker and i can use but cant decide. Can you guys help?
by altanhaligur
Mon Jul 29, 2019 10:52 am
Forum: General discussion
Topic: Update error
Replies: 2
Views: 227

Update error

Why im getting this error?
by altanhaligur
Fri Jul 26, 2019 11:55 am
Forum: General discussion
Topic: Update error
Replies: 2
Views: 254

Update error

Why im getting this error ?
by altanhaligur
Thu Jul 25, 2019 12:54 pm
Forum: General discussion
Topic: Running to function at the same time with sockets
Replies: 5
Views: 459

Running to function at the same time with sockets

Hello guys, i want to communicate two RPis. One is server and other is client. Server RPi includes BLDC and sensors, Client RPi includes joystick. I want to transfer joystick value from Client to the Server, and sensor values from Server to the Client. But i want to make this same time, real time 2-...
by altanhaligur
Thu Jul 25, 2019 8:52 am
Forum: Advanced users
Topic: Raspberry Pi communication problem
Replies: 0
Views: 208

Raspberry Pi communication problem

Hello guys, im trying to communicate two raspberry pi. I send joystick values to one Raspberry Pi over Arduino. I take the values from serial port. And my code transfer this to another Raspberry Pi. When code like this, everything is okay and delay is very low: Client import socket import serial fro...
by altanhaligur
Tue Jul 23, 2019 10:38 am
Forum: Advanced users
Topic: TPC communication between 2 RPis
Replies: 2
Views: 279

Re: TPC communication between 2 RPis

Here is the server code import socket HOST : '' PORT = 65432 a = 0 c = 0 def update(): global a global c while a < 100: a = a + 5 while c < 99: c = c + 3 def sendsensorvalues(): b = 'd1' + str(a) conn.send(b.encode('ascii')) d = 'd2' + str(c) conn.send(d.encode('ascii')) update() with socket.socket(...
by altanhaligur
Mon Jul 22, 2019 4:21 pm
Forum: Advanced users
Topic: TPC communication between 2 RPis
Replies: 2
Views: 279

TPC communication between 2 RPis

Hello guys, i want to communicate 2 RPi. When i put sleep(1) between send commands, everything is normal, i can get values from other RPi correctly. But when i remove sleep(1); datas being weird and i cant get correct values. Why?
by altanhaligur
Sat Jul 20, 2019 5:09 pm
Forum: Networking and servers
Topic: RPi to RPi connection
Replies: 1
Views: 208

RPi to RPi connection

Hello guys, when i connect two RPi's with ethernet cable, i get 2 ips. Is this static ip? Or what is this? And im trying to communicate two RPis, im using this ip for communication. For exampe: HOST = '169.254.78.190' PORT = 654333 (When i connect two Pis, i get this ip.) But people mostly use local...
by altanhaligur
Fri Jul 19, 2019 1:41 pm
Forum: Advanced users
Topic: MJPG-STREAMER make error
Replies: 1
Views: 210

MJPG-STREAMER make error

I follow this (https://docs.dataplicity.com/docs/strea ... om-your-pi).
But i get this error when trying to make file.
by altanhaligur
Fri Jul 19, 2019 11:54 am
Forum: Camera board
Topic: MJPG-STREAMER make error
Replies: 1
Views: 1034

MJPG-STREAMER make error

Hello;
I follow this (https://docs.dataplicity.com/docs/strea ... om-your-pi) process to install MJPG but when im trying to "make" file, i get this error. Any help?
by altanhaligur
Thu Jul 18, 2019 9:15 am
Forum: Advanced users
Topic: UART communication between Pis
Replies: 15
Views: 1238

Re: UART communication between Pis

I would start by checking: 1) Console is disabled using sudo raspi-config 2) UART is enabled using raps-config 3) Checking cabling - TX -> RX and RX -> TX 4) running Minicom on both machines and see if the basic serial link is working Only then look to the program aspect of the problem. Have you do...
by altanhaligur
Thu Jul 18, 2019 9:11 am
Forum: Troubleshooting
Topic: Raspberry Pi /etc/network/interfaces file
Replies: 6
Views: 619

Re: Raspberry Pi /etc/network/interfaces file

epoch1970 wrote:
Wed Jul 17, 2019 12:05 pm
Are you confusing that file with /etc/hosts?
Or do you mean the loopback interface "lo"? (type "ip link show" and you'll see it is there)
No i cant use local host when trying to do TCP connection between two Pi.
by altanhaligur
Wed Jul 17, 2019 11:54 am
Forum: Troubleshooting
Topic: Raspberry Pi /etc/network/interfaces file
Replies: 6
Views: 619

Re: Raspberry Pi /etc/network/interfaces file

Yeah i cant use localhost :/
by altanhaligur
Wed Jul 17, 2019 8:43 am
Forum: Troubleshooting
Topic: Raspberry Pi /etc/network/interfaces file
Replies: 6
Views: 619

Raspberry Pi /etc/network/interfaces file

At my /etc/network/interfaces file there is only:

Is this normal?
by altanhaligur
Tue Jul 16, 2019 7:04 pm
Forum: Advanced users
Topic: UART communication between Pis
Replies: 15
Views: 1238

Re: UART communication between Pis

When im using serial0, it gives me could not open serial0. What does "ls /dev/serial*" report ? If /dev/serial0 is not there then it won't be able to open it. Then i run this code with sudo, and again code doing nothing. Then i tried with ttyAMA0 and again does nothinh Does nothing or gives an erro...
by altanhaligur
Tue Jul 16, 2019 4:55 pm
Forum: Advanced users
Topic: UART communication between Pis
Replies: 15
Views: 1238

Re: UART communication between Pis

RaTTuS wrote:
Tue Jul 16, 2019 2:43 pm
not tested on Pi4
but this is what I used previously
https://www.raspberrypi.org/forums/view ... 25#p828064
it may or may not help but YMMV
Im not trying to do this, my goal is data transfer
by altanhaligur
Tue Jul 16, 2019 4:37 pm
Forum: Advanced users
Topic: UART communication between Pis
Replies: 15
Views: 1238

Re: UART communication between Pis

This codes doing nothing. Maybe try "/dev/serial0" as suggested, or tell us which Pi model you are using so what else it should be can be determined. I would also start with simpler code and slower baud rates, something like, untested .. import serial import time transmitter = serial.Serial("/dev/s...
by altanhaligur
Tue Jul 16, 2019 4:05 pm
Forum: Advanced users
Topic: Communication between Pis
Replies: 13
Views: 967

Re: Communication between Pis

rpiMike wrote:
Tue Jul 16, 2019 2:38 pm
I used websockets to continuously send joystick data from one client Pi to another server Pi on a tracked robot over wifi.

https://websockets.readthedocs.io/en/stable/
Can you mail me your code please? altanhaligur@gmail.com

Go to advanced search