Page 1 of 1
					
				C# Freestyler Client
				Posted: 09 Feb 2023, 22:36
				by mastermattie
				Hi All,
Recently I needed to interact between my own software and Freestyler.
So I decided to dive into the TCP / ASCII protocol and wrote a C# client which can be used to control Freestyler.
It is a little bit quick and dirty but for what's worth, I've put the code on Github:
https://github.com/matthijsderidder/FreeStyler .
I've released it under the MIT license, so it means you can basically do anything with it you would like.
I provide it "as is" but feel free to extend.
Best Regards!
 
			
					
				Re: C# Freestyler Client
				Posted: 11 Feb 2023, 00:04
				by djSupport
				Cheers for sharing!
			 
			
					
				Re: C# Freestyler Client
				Posted: 30 Aug 2023, 18:30
				by mastermattie
				You're welcome!
 
Currently I'm updating / extending the Client.
I'm also working on a WinForms Test App and a WinForms Control Library with some default controls.
 
I was wondering how to deal with the responses from FreeStyler. After sending a command or request there is a continuously 0xFF byte, I assume this is something like a heartbeat which tells that FS is still "alive".
Even after disconnecting the client (right click at icon in FS and select "Disconnect All"), the TCP Connection remains open.
 
While sending a request command, I'm not sure how to recognize a response e.g. when requesting button captions and states sometimes It results in the buttons obtaining the state (0 or 1) as caption, I think because my parser misses the button captions and recognizes the button states as captions.
 
So, how is the send / receive process intended?
Only receive data after sending a request or use a continuous loop which runs as long as the connection is open, but if this is the case, how do I know what response I receive (is it a list of captions or a list of button states).
 
And last question: The button states, do I have to poll for the states, so if something in FS changes, I receive the change or is there a call / package from FS to my software which tells me that something has changed and needs to be updated?
Best Regards!
			 
			
					
				Re: C# Freestyler Client
				Posted: 30 Aug 2023, 20:59
				by djSupport
				The best person to answer this is the developer you may be best to pop it onto the bug tracker to get his attention
			 
			
					
				Re: C# Freestyler Client
				Posted: 02 Sep 2023, 16:45
				by mastermattie
				Thanks!
I assume that's @lj_raph right?
I'll post this question onto the bug tracker.
Best regards!