Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Communicate with TCP port

(0) ShareShare
ReportReport
Posted on by 652

Hi,

To read data from a weight bridge, I need to send / receive a text from NAV to an external IP addres + Port. 

In the past, you could use the Nav communication component, but I think it does no longer exist.

Any tips to do this easily in NAV 2016

Thanks,

Regards,

Steven

*This post is locked for comments

  • Community Member Profile Picture
    on at
    RE: Communicate with TCP port

    Hi Steven,

    Please share the .net assembly. It would inspire me to try something similar for NAV 18. Planning to Trigger Weigh Machine and get the response which will be stored in SO. Any advice?

  • stevdeb Profile Picture
    652 on at
    RE: Communicate with TCP port

    Thx for your replies.

    I created a .net assembly and it works.

    Regards,

    Steven

  • Verified answer
    keoma Profile Picture
    32,727 on at
    RE: Communicate with TCP port

    hi,

    in that case, as ahmed suggests, the only way is to use .net classes. you could try to develope a codeunit using according .net classes like TcpClient or develope a little .net assembly for that issue.

    helpful links:

    csharp.net-informations.com/.../csharp-socket-programming.htm

    msdn.microsoft.com/.../system.net.sockets.tcpclient(v=vs.110).aspx

  • Verified answer
    Rashed Profile Picture
    3,765 on at
    RE: Communicate with TCP port

    Hello Steven

    You need to create a .net assembly that will do the TCP/IP communication. 

    You could try and do it in NAV using socket dotnet datatype but they are event based and have to maintain connection etc.  As well as you have to handle the packets being received partially from the socket.

    I have had in past do a socket integration with credit card pin pad, and created a dotnet assembly in csharp was the easiest solution.

  • stevdeb Profile Picture
    652 on at
    RE: Communicate with TCP port

    Hi,

    Thanks already for the answers.

    The only way to read data from the weight bridge is by sending a text to a tcp port and then it sends the weight back.

    I do not really see how I can do that with web services?

    Could you be more specific please?

    Thanks,

    Regards,

    Steven

  • Suggested answer
    Alexander Ermakov Profile Picture
    28,094 on at
    RE: Communicate with TCP port

    I would recommend to use SOAP web service for that purpose. Check msdn.microsoft.com/.../dd355398(v=nav.90).aspx

  • keoma Profile Picture
    32,727 on at
    RE: Communicate with TCP port

    hi, standard method is using nav web services.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Kudos to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Microsoft Dynamics NAV (Archived)

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans