Hello everyone!
Sorry if the question is trivial, but I cannot figure out how and even if it is possible.
Problem is: I have a computer connected on a network with a fixed IP and I want to read a specific file on a specific folder on C: drive (like C:\test\file.txt). It is a plain text file, no special characters inside.
I should use an Ethernet adapter as the computer doesn't have Wi-Fi.
ESP32 must read it automatically and independently, no additional programs are allowed to run on this computer, so a webserver or similar is not an option.
I don't need to transfer or read all file content, just last 5 lines are important for the application. But I can transfer entire file and store if in SPIFFS and read it later if this is easier.
Today I have an RPi Zero doing this job, but the idea is to replace it by an ESP32.
Should I consider run it in MicroPtyhton?
Thank you in advance!
Luis
Is it possible to ESP32 read a file from a computer over the lan ?
-
- Posts: 9749
- Joined: Thu Nov 26, 2015 4:08 am
Re: Is it possible to ESP32 read a file from a computer over the lan ?
It gets a bit tricky if you can't run anything on the computer, as you need a way to access files over the network. You could use the built-in Windows filesharing and a Samba implementation that can run on the ESP32 (e.g. https://github.com/sahlberg/libsmb2 , but look at the license to see if it's usable for your purpose) to get the file, but that's about all your options.
Re: Is it possible to ESP32 read a file from a computer over the lan ?
If all else fails you could set up an FTP server on the computer and have the ESP32 access the file via FTP
Re: Is it possible to ESP32 read a file from a computer over the lan ?
How does the RPi Zero read the file ATM?Today I have an RPi Zero doing this job, but the idea is to replace it by an ESP32.
That would have been my first choice but you say that additional programs are not allowed.If all else fails you could set up an FTP server on the computer
Shame you cannot add a program to the PC. A few lines of Javascript & you could perdiodically multicast the last few lines...
& I also believe that IDF CAN should be fixed.
Re: Is it possible to ESP32 read a file from a computer over the lan ?
Thank you all for your replies.
The target computer is part of a MRI equipment, that's the reason I cannot run additional softwares, supplier doesn't allow.
That file has some information about HW and sensors that should be monitored. Initial idea was to capture ethernet communication between MRI and computer, but it is forbidden by supplier. And as it is a very sensible equipment this would not be a good idea to insert a possible interference in communication.
Any other valuable ideas?
Thank you !
Luis
The target computer is part of a MRI equipment, that's the reason I cannot run additional softwares, supplier doesn't allow.
That file has some information about HW and sensors that should be monitored. Initial idea was to capture ethernet communication between MRI and computer, but it is forbidden by supplier. And as it is a very sensible equipment this would not be a good idea to insert a possible interference in communication.
Actualy there is an equipment that do this job, but running a RPi, and I don't know how it is doing this job as I cannot login it.
I will check that Samba implementation, and also check if WinXP has a compatible file sharing with it.ESP_Sprite wrote: ↑Tue Oct 13, 2020 3:11 amIt gets a bit tricky if you can't run anything on the computer, as you need a way to access files over the network. You could use the built-in Windows filesharing and a Samba implementation that can run on the ESP32 (e.g. https://github.com/sahlberg/libsmb2 , but look at the license to see if it's usable for your purpose) to get the file, but that's about all your options.
Any other valuable ideas?
Thank you !
Luis
Re: Is it possible to ESP32 read a file from a computer over the lan ?
Hi,
PS a smart switch with a mirror port should keep you safe in court.
This does all seems part of your supplier 'smoke n mirrors' proposition. The supplier may very well carry some responsibility for the equipment however- if you reconfigure the equipment in any way you may invalidate that guarantee.
<rant>Don't get me wrong; most safety cultures I have worked in have been 'barking mad' but have the certificates & that keeps your insurance people happy. Certification is often more tick box than accomplished process or even rational.</rant>
It is an imperfect world but IMHO safety cultures often become enclosed cliques. Citations: (1) Had occasion to work in a team with 5 engineers who's full time job was to edit the same MS-Word test procedure. Was let go after suggesting splitting the document into file sections or god forbid a Wiki or automating testing. (2) On another occasion I was invited to save a project where the lead would enter the team's design into UML because 'the team did not understand UML' (guess there was a local procedure to use UML), (3) etc, etc. Oops, rant was supposed to be over
You might say that the very nature of the safety 'guarantee' is something that inhibits competition and ultimately safety. I would not dare!
But if you break rank you no one will tell you if you're insured so you have to suck it in & live in the 50's
PS The fact that you cannot even read some standards without $$ would seem to me to run counter to engineering/scientific method. Oops, still ranting.
Nurse!
I'd check that contract! Perhaps you would just like to monitor your network for viruses (etc) & post a Wireshark trace along with the IP of the target system so we can find any virus activity. I am sure that all reputable suppliers would wish that their client's were virus safeThat file has some information about HW and sensors that should be monitored. Initial idea was to capture ethernet communication between MRI and computer, but it is forbidden by supplier
Well this seems to be the same point as above; perhap commerical protection? You're supplier seems to be telling you that 'here be dragons'. Often this is just smoke & mirrors but there may be an effect. If you enable Window shares etc will that slow the computer, open the computer to virus etc?And as it is a very sensible equipment this would not be a good idea to insert a possible interference in communication.
PS a smart switch with a mirror port should keep you safe in court.
This does all seems part of your supplier 'smoke n mirrors' proposition. The supplier may very well carry some responsibility for the equipment however- if you reconfigure the equipment in any way you may invalidate that guarantee.
<rant>Don't get me wrong; most safety cultures I have worked in have been 'barking mad' but have the certificates & that keeps your insurance people happy. Certification is often more tick box than accomplished process or even rational.</rant>
It is an imperfect world but IMHO safety cultures often become enclosed cliques. Citations: (1) Had occasion to work in a team with 5 engineers who's full time job was to edit the same MS-Word test procedure. Was let go after suggesting splitting the document into file sections or god forbid a Wiki or automating testing. (2) On another occasion I was invited to save a project where the lead would enter the team's design into UML because 'the team did not understand UML' (guess there was a local procedure to use UML), (3) etc, etc. Oops, rant was supposed to be over
You might say that the very nature of the safety 'guarantee' is something that inhibits competition and ultimately safety. I would not dare!
But if you break rank you no one will tell you if you're insured so you have to suck it in & live in the 50's
PS The fact that you cannot even read some standards without $$ would seem to me to run counter to engineering/scientific method. Oops, still ranting.
Nurse!
& I also believe that IDF CAN should be fixed.
-
- Posts: 111
- Joined: Thu Oct 03, 2019 10:52 pm
- Contact:
Who is online
Users browsing this forum: aliarifat794, axellin, Bing [Bot] and 146 guests