Posts

SSH

Recently I was thinking of SSH support in my TCExecutor application. I've found some 3rd party libraries which support SSH.... but... I think I'll try to implement it on my own... Here are some specs: The Secure Shell (SSH) Protocol Assigned Numbers - RFC 4250 The Secure Shell (SSH) Protocol Architecture - RFC 4251 The Secure Shell (SSH) Authentication Protocol - RFC 4252 The Secure Shell (SSH) Transport Layer Protocol - RFC 4253 The Secure Shell (SSH) Connection Protocol - RFC 4254

TCExecutor v0.0.1 released

Image
TCExecutor - Telnet Command Executor C# open source project is released in version 0.0.1 Thanks to TCExecutor you can add communication/configuration layer to your application in just four steps: Create TCExecutor object Define commands Hook up your code to commands events (TCExecutor is multithread/multiconection application remeber that your code must be threadsafe) Start TCExecutor listener. Commands style: > command1  subcommand1 ... subcommandN param1=X1 ... paramN=XN  ARGV1...ARGVN Features: Adds network communication layer to your application Supports multiple connections. For each connection separate session is established. Commands can be defined at your application startup. Each command has separate event to which you can connect to. Each command has a short and long help string which helps end user to navigate through available options. Next releases features: Enable SSH connections to the TCExecutor. Add simple user autentication...

Nikon D40 Intervalometer

Image
Is it possible to create time lapse pictures with Nikon D40... yes... You can find results here: result1 result2 You are a software engineer... you can do anything... it is just a matter of time ;)

C# Custom Performance Counters - First Performance Counter

Image
Table of content: I. C# Custom Performance Counters - Introduction II. C# Custom Performance Counters - First Performance Counter 1. Creating a custom Performance Counters and Performance counters category. You can create your own Performance category and Performance counters. To achieve this goal you can use Visual Studio tools, or .NET System.Diagnostics objects. In this post I’ll describe counters and category creation in a code using using System.Diagnostics; First of all you need to make a counters collection: CounterCreationDataCollection collection = new CounterCreationDataCollection(); Then you need to create performance counter CounterCreationData counter = new CounterCreationData(); counter.CounterName = "CountsPerSecond"; counter.CounterHelp = "CountsPerSecond"; counter.CounterType = PerformanceCounterType.RateOfCountsPerSecond32); collection.Add(counter); And place it into the category. As the category type you can use SingleInstance and M...

C# Custom Performance Counters - Introduction

Image
Table of content: I. C# Custom Performance Counters - Introduction II. C# Custom Performance Counters - First Performance Counter 1. Introduction There is a moment in software engineer life when it is time to check application performance. At this certain point you will ask yourself “How can I do it?”. Answer is not simple because you can do it in a very different way. You can of course find any 3 rd party application which will measure some things for you. You can make some kind of log file and insert some performance data to it, or you can use .NET System.Diagnostics namespace. In this article I’ll focus on System.Diagnostics. I’m not saying it is the best approach, I’ll just describe some elements of it and you can decide if it suits your needs or not. 2. Where I can find Performance counters in Windows. In Windows you can find some predefined performance counters. Just open Control Panel -> Administrative Tools -> Performance There you can find some predefined count...

AVRStudio and Ubuntu [ENG]

Image
Hello there!!! Here you can find a simple tutorial which shows how to install AVRStudio 4.18 on Ubuntu 10.04 and use a ZL16PRG programmer to connect to a laboratory device. 1. We need to download AVRStudio from website http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 2. Let's install AVRStudio using Wine. 3. After connecting ZL16PRG to USB port we should be able to see it in a system. lsusb we should find our device Bus 003 Device 020: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC 4. Next step is to connect our USB device to Wine COM1 port. In my case I was able to find my USB device in: /dev/serial/by-id/usb-FTDI_USB__-__Serial-if00-port0 Now it's time to male a link between USB device and COM1 on Wine. ln -s /dev/serial/by-id/usb-FTDI_USB__-__Serial-if00-port0 ~/.wine/dosdevices/com1 5. Right now we can test if everything works fine: Have a nice programming :) Used links: https://help.ubuntu.com/c...

AVRStudio na Ubuntu [PL]

Image
Witam serdecznie. Oto prosty tutorial jak zainstalować AVRStudio 4.18 pod Ubuntu 10.04 i podłączyć układ za pomocą programatora ZL16PRG. 1. Ściągamy AVRStudio ze strony producenta: http://www.atmel.com/dyn/products/tools_card.asp?tool_id=2725 2. Instalujemy AVRStudio używając Wine (z moich doświadczeń wynika, że działa) 3. Po podpięciu Programatora ZL16PRG powinniśmy mieć nowe urządzenie USB. sprawdźmy: lsusb powinniśmy znaleźć takie urządzenie: Bus 003 Device 020: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC 4. Podepnijmy nasze urządzenie USB do COM1 na Wine. W moim przypadku urządzenie USB znajdowało się w: /dev/serial/by-id/usb-FTDI_USB__-__Serial-if00-port0 Podepnijmy więc USB pod COM1 w Wine tworząc link: ln -s /dev/serial/by-id/usb-FTDI_USB__-__Serial-if00-port0 ~/.wine/dosdevices/com1 5. Podłączmy się pod układ za pomocą programatora Wygląda na to, że wszystko gra. Miłego pisania aplikacji :) Linki zewnętrzne: h...