Hello,
I have an OpenMV Cam H7 Plus with a Wifi shield and need to send a picture to another device connected to the same LAN.
Is there any way to do it?
Regards
Yes, using sockets. You kinda have to write the protocol yourself.
Hello again,
How about writing directly a file with the picture on the other device via ftp?
The other device is a portable device (HMI display/PLC) running Windows Embedded 7.
If it is viable, do you have any code example?
Regards
You’d have to write it via sockets right now. We don’t have high level protocol stuff yet.
Hi again,
Some time ago I understood that you planned to write a ftp protocol in future.
Is it already available?
Nope! We did make a very nice RTSP video streamer.
Also, urequests works well. So, you can do rest API stuff.
Hi again,
What we really want is to analyze a product on a machine and send to the PLC some result data and the picture. We need to do that in about 600 ms max.
We manage to send the data via sockets and the pictures via streaming, but we don’t see how to do both at the same time.
Sending the picture via socket would do, but it is too slow.
We are now testing with the new RT cam.
Any idea?
Thanks
Sending the picture via socket would do, but it is too slow.
Uh, it shouldn’t be. Streaming is just sending via sockets. It’s the same. Here’s the RSTP code:
…
The easiest thing to do would just be to use the urequest library and just have your PLC be a server and send data to it via that.
…
Anyway, see the https://github.com/openmv/openmv/blob/master/scripts/libraries/rtsp.py#L296 send function for how to send data fast.
Note, for the urequest library you can do the multi-part file header to send the jpeg image: