Introduction:
I am working on a project in Ch. Pervaiz Elahi Institute of Cardiology at Wazirabad, Pakistan. In which, we are assigned the task to fetch patient’s vital signs from the Patient Monitoring Machines in CCUs (Critical Care Units), through their Ethernet ports, on our Raspberry Pi. And make that real-time patient data available for on-duty doctor’s smart phone via cloud. But, the problem is, we do not know what is the protocol in which the machine is sending its vital signs on its Ethernet interface, and what is the port on which it is sending the data to.
Devices Specifications:
- The hospital is using Heyer Vizor 12 Patient Monitoring Machines (a picture of which is attached below) in their CCUs (Critical Care Units).
[Image of Heyer Vizor Patient Monitoring Machine in Institute of Cardiology in Warizabad]https://i.sstatic.net/MbsAJcpB.jpg) - I am using Raspberry Pi 4 Model B, with headless Raspberry Pi OS running on it
- I have a Lenovo Ideapad laptop, with Ubuntu 22.04, and Windows 10 running on it
Furthermore:
The main problem here is that, we do not have any documentation available, or provided by the hospital, that can clearly guide us about how to fetch patient’s vital signs through it’s Ethernet port.
The methods I have tried so far:
- I connected the monitoring machine through an Ethernet cable with my laptop, and tried to analyze the traffic on Ethernet interface of the Monitoring Machine using Wireshark, here are some of the screenshots of the recorded data:
Wireshark recorded data – screenshot 1
Wireshark recorded data – screenshot 2
( It seems from this data, that the machine is not actively sending the data, it is just doing routine network management tasks. Correct me if I am wrong) - We also thought that we are not able to get the data perhaps because we do not know the actual port the machine is sending the data to, so I installed the following python script for ports scanning on Raspberry Pi, connected it with hospitals internet connection, and placed it in a safe place, so that it can scan over all the port (I know it is very time intensive, but we didn’t have any other option)
import socket
import time
import logging
timeout = 25
logging.basicConfig(
format="%(asctime)s - %(message)s",
filename='remoteTest_p3.log',
filemode='a',
encoding='utf-8',
level=logging.INFO
)
#fetch last port from file 'lastPort.txt'
file = open('startPort.txt','rt')
port = int(file.read())
file.close()
logging.info(f"Starting from port {port}")
print(f"Starting from port {port}")
while port<65536:
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.settimeout(timeout)
sock.bind(('0.0.0.0', port))
logging.debug(f"trying on port ----- {port}")
print(f"trying on port ----- {port}")
try:
data, addr = sock.recvfrom(1024)
logging.debug(f"Received data from ip {addr} : {data}")
print(f"Received data from ip {addr} : {data}")
continue
except socket.timeout:
logging.debug('timed out')
print('timed out')
except Exception as e:
logging.info(f"exception:{e}")
print(f"exception:{e}")
finally:
sock.close()
#increment the port to next
port = port + 1
#store the start port in a file
try:
file = open('startPort.txt','wt')
file.write(str(port))
file.close
except Exception as e:
logging.info(f"File exception: {e}")
print(f"File exception: {e}")
finally:
logging.info('start port saved')
print('start port saved')
(if we give Pi about 25 seconds to wait for data on every single port, it will consume 25 * 65536 / 60 / 60 / 24 = 18.96
days to complete over all the ports, at the time of posting this question, Raspberry Pi is still scanning over the ports)
We got some data on ports 67, and 137, but it was not the intended vital signs data. It was actually related to the same routine DHCP and NetBIOS tasks.
I also found that port 5353, and 5980 are giving the error: [Errno 98] Address already in use
Any help, suggestion, helping material regarding this problem is most welcomed.
AMMAR MUJTABA TARIQ is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.