UDP-Datastream to localhost not working

Hello,
i am trying to setup a few raspberry shakes in remote locations without internet access.
The datastream is configured via the webinterface to goto the localhost adress 127.253.0.1:8888. In the logs I can see that the datastream is getting opened, but I dont receive data on the specified port.

The data is beeing processed via an python script that is running constantly in the background on the shake and sends the data out to an usb-to-serial-converter. I tried to assign a static IP to the pi, but that did not work either…

I executed the command hostname -I and there was an registered IP-Adress 172.17.0.2 for some reason that seemed static no matter what I did. When using this IP in the datacast my python script could receive the data with no problems.

Since I have to setup a few of the shakes I would like to use the loopback adress space since these adresses should always be available no matter what is connected to the ethernet port.

Is there a solution to this?

Thanks in advance:)

RSH.R09E0.2024-10-06T13_22_51.logs.tar (3.1 MB)

1 Like

Hello Roggiii, and welcome to the community!

Thank you for the Shake logs. An important thing that emerges from them is in these lines:

2024 280 13:22:51>>	‹QTDYàa ÁeÁEMIªW•VIð…ªÔU…تW˜$AaT‘E:TBgсEŒU'VIÐ…S QÇXªQ”DYàc Q˜
2024 280 13:22:51>>	–YTBW\IIàD¯ôÜOkˆM¨²•Q'VIx,AÐE
2024 280 13:22:51>>	No Data has been received from the MCU in 12 read attempts.It appears the MCU is not transmitting data.  This is a fatal condition and should be investigated if this condition persists!
2024 280 13:22:51>>	Data has been successfully received, fatal condition resolved.

As you can see, they contain some “gibberish” mixed with “no data received” errors.

My first thought would be to check and see if the current power supply you are using is continuing to deliver a stable voltage between 5.0 and 5.2V and a current of at least 2.5A at all times, as a decrease in power could lead to data services interruption. Also, if you have another Pi power supply you know is in working condition, please try to exchange the current one with that and see if the Shake now correctly works for extended periods.

A second check that you can do is to see if all the connections between the sensor, the blue Shake board, and the Pi board are still solid and free from dirt or any other element that could compromise transmission. As you have recently reassembled the instrument with a new Pi board, you should find this process quick and easy (but guidance is always available if required). And, as usual, if you decide to disassemble the Shake when doing this, please ensure you are using proper ESD (ElectroStatic Discharge) protection (such as gloves, etc.).

As a last resort, and if all these checks come out as positive, then I would recommend re-burning the microSD card again (or using a different microSD) after formatting and erasing all its data/partitions first (you can use DISKPART for this as it is very efficient), and see how the Shake behaves with the newly installed system, removing potential issues derived from corrupted files. I will leave the burning instructions link here for your convenience: microSD card topics

Now that this is out of the way, could I please ask you to expand a bit (a data flow diagram, even in text, would be great) on the objective you want to achieve with the datastream redirection you want to set up?

As the Shakes are not connected to the Internet, I assume your Python script elaborates on all the data locally and then saves it elsewhere. Is this correct (just to see if I have understood the situation)?

Thank you very much for any other details you can provide.

Thanks for your reply!

I am using the original Powersupply that came with the shake. I also tried another Raspberry supply to rule out any defects there. The shake is brand new and has never been outside so dirt and other elements should be no issue. The connections to the sensor board are also solid.

I also reburned the sd-card with diskpart but the log is still full of errors:

2024 293 06:55:08>>	Data has been successfully received, fatal condition resolved.
2024 293 06:55:08>>	No Data has been received from the MCU in 12 read attempts.It appears the MCU is not transmitting data.  This is a fatal condition and should be investigated if this condition persists!

Even despite these errors it is producing data, so there seems to be no fatal problem.

You understood my objective correctly, sorry for my bad explanation. The flowchart describes it best i think. I want to process the data locally on the shake and send it out to an serial port.

The problem i am having now is that with a localhost adress it is not receiving data, but with a normal IP-Adress it is working correctly. The shake will not be plugged in to a network during operation, thats the reason why i want a loop back adress.

If you want to reproduce this error you can use the example python code for a udp-connection:
https://manual.raspberryshake.org/udp.html
Run it locally on the shake and set the datacast to a localhost ip and it will receive no data on this port. The new logs are also attached.

RSH.R09E0.2024-10-19T06_56_04.logs.tar (1.4 MB)

Nobody got any ideas? :confused:

1 Like

Hello Roggiii,

First, thank you for the additional details and your patience. I passed everything to our software developer as he is the most qualified person to take a look at this.

Rest assured that we are looking into it, and we’ll get back to you as soon as possible.

1 Like