1

I have decided to use PuTTY instead of hyper terminal because it is open source, and where I could manipulate the code. http://www.putty.org/

What I am trying to achieve is the following: The following locks http://www.southco.com/en-ph/em-05/em-05-11-111

would be connected to a windows tablet using a usb adapter, and upon entering a pin the locks would unlock.

I know with hyper terminal you connect the usb from the adapter to the computer and then you can turn it on or off, but what I am trying to achieve is quite complicated, so let me just start with this first question:

If I want to change the ux/ui of putty which files in the source file should I touch. I am quite familiar with php/javascript/html/java and not so much with the c programming language. Do I need visual basic? Is there a visual editor? How then make it an executable after the change?

Any help would be greatly appreciated.

enter image description here

code_legend
  • 3,547
  • 15
  • 51
  • 95
  • 1
    This is confusing, you want to modify putty to enter a pin code on a remote machine to open a physical lock? My guess is that you are thinking about this incorrectly. You probably want to write a program on the remote machine and run it through putty. But I truly do not understand what you are trying to achieve. – Chris Desjardins May 22 '15 at 05:53
  • yes that's spefically what i am trying to do is write a program on the remote machine, and connect it to putty. in other words connecting the program to putty where when the program gives putty green light it opens it on. so i guess my question is how do i manipulate putty through a third party software. does the remote program have to be written in c as well? – code_legend May 22 '15 at 11:22
  • You are still confused, putty is not the user interface for your program, it is just the transport layer that allows you to access the user interface of your program. – Chris Desjardins May 23 '15 at 07:10
  • yeah your right i need a bit of clarity. i guess il get more spefic, i need to interact with the serial connection of my computer such that when a usb is plugged i can send it command so that the lock can open/close this is why i use putty or hyper terminal, so yes true i am not looking to use the interface of these program but rather the code that allows me to interact with the usb port, if i could write the progrram in php i would be thrilled but i guess that's a server side language, and i need to use java or c, any further clarity will help as yes i am still a bit confused – code_legend May 24 '15 at 16:37

1 Answers1

0

If I understand you correctly, you want a terminal emulator to connect to a remote device and start a program when it connects. For this task I recommend ComBomb, and a custom script that you write. (Full disclosure: I wrote ComBomb)

http://blog.chrisd.info/combomb/

Your script can be written in any language, I don't think I would recommend php for this task, as it will require a big of i/o from stdin/stdout maybe some string parsing. I usually go with python these days for this type of thing.

But the basic idea is that you use ComBomb to connect, and then your script just reads from stdin and searches the input for the command prompt. When the command prompt is found it writes the desired command to stdout which ComBomb will send to the remote end, and that will effectively cause your program to run on the remote end.

There is already an example python script (addons/safetofile.py) included with ComBomb and maybe you can use it as a starting point. If you decide to go this route and have specific ComBomb questions I recommend opening an issue on github:

https://github.com/cdesjardins/ComBomb

Chris Desjardins
  • 2,631
  • 1
  • 23
  • 25
  • Thanks for your response. I have knowledge of python so this should work. Yeah precisely, i want that a usb is connected to the computer it recognize it and able to send command to that serial connection, and hence unlocking the lock the same way hyper terminal or putty would do. Congradulation on comComb. one question, if i connect a usb hub, with lets say 14 different usb connected to that usb hub, would comcomb be able to tell identify all14 usb, and able to send command to each individually. – code_legend May 25 '15 at 13:21
  • hi chris the above question is quite vital to me, one another trouble i have (included a picture at the bottom of my initial post), is that I manage to open a new connection using serial lets say com3, but then I am unable to write anything in the terminal. the type of command i want to write are like open 1 or status 1 but i am unable to type anything in the terminal. thanks again – code_legend May 27 '15 at 19:11
  • What have you done to troubleshoot this problem? Is the baud rate correct? Does anything else have the port open? Is the device properly connected? Ect, ect... – Chris Desjardins May 28 '15 at 18:54
  • thanks il dig into to see where the problem derives. BTW is there any framework such as django https://www.djangoproject.com you would recommend to interact with the savetofile.py.. sorry I am still trying to wrap my head around this so combomb is running with all the ports connected, and then my application sends information to the saveonfile.py which then sends command to combomb right? – code_legend May 31 '15 at 22:17
  • 1
    It seems you are still well off the mark regarding how to resolve your issue. a) django is a web framework. This is not a web project, so I do not recommend it or anything like it. b) You are not interacting with savetofile.py, you are using it as a very basic starting point and modifying it. The first step would be to make a copy of savetofile.py and open the copy and change it to do what you want. I suspect when you are done your script should be well less than 100 lines of python code. c) I also recommend you spend ~40 hours just trying, don't give up after 10 minutes. – Chris Desjardins Jun 01 '15 at 06:43
  • thank you much for the clarification, one small thing it says # Use this script with ComBomb to pipe data from the terminal to a file. can you elaborate a bit on this does combomb software needs to be running simulatenesly – code_legend Jun 01 '15 at 12:17