Receiving data through TCP-IP communication
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to get data from a engine dynamometer. The sensors are connected to a sensor box which translates the measurement to digital data. This data is send through an IP connection. I'm not sure how this data is ordered but it's possible to acces this data with software delivered by the manufacturer of the dynometer. This program uses a Netbeui protocol.
I want to read the data real time into matlab. So there's a IP connection using a Netbeui protocol. I tried to use the TCP/IP recieving block, but it didn't worked.
I found the remote address but i can't find the portnumber. Does anyone know were i can find this portnumber?
Does anyone have ideas to get real time data in simulink or the workspace in matlab through ip communication?
0 commentaires
Réponses (2)
Walter Roberson
le 12 Déc 2011
Nominally ports 137, 138, and 139 (some of those used as UDP, some as TCP), but in practice other ports get used as well as negotiated endpoints for services located through the service lookup.
If you are lucky then the system communicates using SMB -- lucky in the sense that SMB network software source is available for study (see http://www.samba.org/)
When I was a network security admin, I had awful struggles to find out which ports were really being used and for what purposes. By the time I stopped looking, I had found ports being used for 21 different purposes, only 5 of those acting in accordance to documentation.
If you are running MS Windows, you might find it easier to Mex up some NETBIOS calls than to try to communicate directly with the device, especially since you would need to be listening on ports that MS Windows already thinks it should be listening on itself.
0 commentaires
martijn
le 14 Déc 2011
1 commentaire
Walter Roberson
le 14 Déc 2011
You need to proceed as noted in the wikipedia article:
Sessions are established by exchanging packets. The computer establishing the session attempts to make a TCP connection to port 139 on the computer with which the session is to be established. If the connection is made, the computer establishing the session then sends over the connection a "Session Request" packet with the NetBIOS names of the application establishing the session and the NetBIOS name to which the session is to be established. The computer with which the session is to be established will respond with a "Positive Session Response" indicating that a session can be established or a "Negative Session Response" indicating that no session can be established (either because that computer isn't listening for sessions being established to that name or because no resources are available to establish a session to that name).
Data is transmitted during an established session by Session Message packets.
Voir également
Catégories
En savoir plus sur Development Computer Setup dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!