I would like to send current location of a vehicle to a vehicle presence checking device. In normal case the systems send the location data over GSM Network, but I don't want this because I would like to create a cheap monitoring system. Then I cant use RF transmitter because it transmit data over a few meters. So how to transmit a location data from a gps device to a monitoring device over a 2km distance using wireless data transmission without using internet?
If it is just internet you don't want to use, u can use phone sms to send the co-ordinates in text form.
Otherwise, a point to point network using nano stations,is the only wireless communication that I know can work even to 5km.
Related
I have a raspberry pi 4(let's call it server) that's operating servos and motors on a boat. I've managed to control the boat using another raspberry pi 4( let's call it client) and connect via SSH. First remote control was via touchscreen and gui that ended up pretty useless. I wanna try control by joystick which I've placed on client side. My problem is how do I implement the signal from joystick that I get from script on client as input signal on server side? Is there a way to do that via SSH or something else? In longterm there will be a camera, radar and sensors placed on the boat. Is the websocket best solution for that type of remote control?
Personally, I think I'd set up MQTT for this which is ideal for transferring short messages and doesn't require absolute "lock-step" communication back and forth. That means you can start in any order and the second half doesn't need to necessarily be present.
I'd install mosquitto on either RasPi, and then:
let RasPi with devices attached subscribe to a "joystick" topic so it gets all joystick movements, and
let RasPi with joystick attached publish each movement on that topic.
Enter [mqtt] in the StackOverflow search box for examples.
Alternatively, you could use Redis "pub/sub" just the same.
Enter [redis] in the StackOverflow search box for examples.
I have a Solar iBoost controller which can be fitted with an wireless remote display unit (iBoost Buddy) and communicates over radio frequency.
What I want to do is connect to this device remotely if possible with a PC, and be able to activate it's boost function.
The manufacturers remote screen can display - energy readings, availability of spare energy and can provide a remote override function.
The base station can send and receive data but I don't know the protocol. Is it possible to communicate to this device and how?
I am looking at implementing USB communication on a MCU which has a USB engine built into it. Basically you have access to the pipes/endpoints.
I am a little bit confused on the USB stack now. It appears that drivers operate on another level above the pipe/endpoint setup, so the pipe/endpoint is like a middle level layer that drivers are built on. Is this correct?
Secondly, I am interested in simulating serial communication over USB. It appears windows has a premade driver so on the computer side I do not need to program the pipe level.
How do I find out what I need to implement on the MCU to make it behave correctly with the generic serial driver?
This is an answer to your second question regarding the serial communication.
The USB standard defines a communication device class (CDC) for serial communication. The required drivers on the host side are implemented by Windows, macOS, Linux and many more operation systems.
The relevant CDC subclass is PSTN. The relevant documents are found in Class definition for Communication Devices 1.2.
The device basically implements four endpoints:
Control endpoint for configuration requests (baud rate, DTR state etc.). Have a look at SetLineCodeing, GetLineCoding and SetControlLineState.
Bulk endpoint for USB to serial transmission
Bulk endpoint for serial to USB transmission
Interrupt endpoint for notifications (DCD state, errors). See SerialState.
And of course you need to get the device descriptor right.
On top of that, you need to implement all the standard USB requests.
Chances are high that this has already been written for your MCU, both the standard requests and the serial communication. So why not use the existing code?
Will USB communication in Windows 10 be done in Bulk mode?
I'm in the process of selecting a PC and would like to know how to transfer Windows 10 to other devices for USB communication.
There are four transfer methods for USB communication, Control, Interrupt, Bulk, and Isochronous, and which one is used depends on the host.
I'm hoping to use the Bulk method of communication because I don't want USB communication without retransmission.
Thank you!
and which one is used depends on the host
Yes and no. The host must use the method appropriate for a device, and the device has endpoint descriptors which define whether an endpoint is bulk,interrupt or isochronous.
Note that common devices have specific endpoint type requirements: Mass storage use bulk while HID devices (e.g. mice or keyboards) use interrupt ep.
In recent weeks, I'm learning to use EMANE to do the emulation about Ad hoc networks which uses the Predictive OLSR routing protocol.
The locations of the UAVs' location are taken into account to calculate the ETX metric in P-OLSR, which makes it different with ordinary OLSR. I get trouble in transferring the locations data of UAVs into the P-OLSR core. The patch file that I downloaded from the link mentioned above adds a gpsreceiver plugin to the protocol, which is used to receive location data from the out of P-OLSR then transfer it into P-OLSR. And in the olsrd.conf.example file, I'm supposed to set an interface, a multicast IP address and a port for the plugin, I don't know how to set these things when I use the EMANE emulation platform. I tried to set the multicast IP address and the port same as the value of eventservicegroup attribute. But the it cannot be right, because the data format is not consistent.
EMANE uses an application called eelgenerator which can generate location event to deliver the locations data of UAVs, but the data is in a eel log file format not in a NMEA format which is wanted by gpsreceiver. EMANE also has an application called gpsd location agent, and it can handle the location event, and transfer the locations data into NMEA format, but the output of gpsd location agent can only be connected to GPSd directly or to a pseudo terminal then connected by GPSd. GPSd can get the latitude, longitude and altitude information from the NMEA format location data, and serves the other applications via the port 2947 of localhost.
So, How can I transfer the locations data into P-OLSR core? If via the gpsreceiver, How should I set the olsrd.conf and do I need to write a program myself? If do not use the gpsreceiver plugin, can I make the P-OLSR core to get location data through GPSd? If can, how to realize that exactly?
PS:the version of my EMANE is emane-0.9.3. the version of my machine's kernel is 4.2.3-300.fc23.x86_64.
I solved the problem. I wrote a python script to read data from the pts and send it to the gpsreceiver. Here is the script:
import socket
fd = open("path of pts", "w+")
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.sendto(fd.readline(), (host, port))