0

I am able to check com ports with my program written in c#. As you know when you make a connection between pc and Arduino it arranges specific COM port for it like: Arduino Uno(com6). But I would like to specify COM port for arduino to com5 automatically. It can be changed manually using this direction: My Computer -> Manage -> Device Manager -> Ports -> Communications Port -> Port Settings -> Advanced -> COM Port Number

I need to connect it via com5 in a shortway in any computer with my program.

How can I make it?

I already checked relevant subjects for solution.But They couldn't solve it too.

C# how to change a COM port to an specified one

https://www.codeproject.com/questions/451510/how-to-change-known-com-port-to-com-automatically

http://forums.codeguru.com/showthread.php?375882-How-to-change-COM-port-number

Is there anyway to make it work in C#?

Community
  • 1
  • 1
Xspacex
  • 1
  • 1
  • 10
  • as written in one of the linked articles, for your program to require a specific com portnumber is bad design. You should adapt to your nviroment, not change it as you like, because maybe com5 is currently in use and you break something if you forcibly change the portnumber. – Sebastian L Jan 09 '17 at 11:07
  • So, How to adapt my arduino to specifig port number automatically instead of changing port specification.Bu anyway, There wont be any specific usb connection to my computer.Therefore I would like to change it directly with called "bad design".I just want to change it, nothing more – Xspacex Jan 09 '17 at 11:11
  • http://stackoverflow.com/questions/3293889/how-to-auto-detect-arduino-com-port – Sebastian L Jan 09 '17 at 11:29
  • I already checked this subject , but unfortunately this is not what ı want.I need to change this com port , no need for arduino detection. – Xspacex Jan 09 '17 at 21:15

0 Answers0