 |
|
 |
I like Termite's ability to handle non-standard baud rates, but wanted the ability to send a file. I like Termie's ability to send a file, but wished you had kept the non-standard baud rate functionality. I like the fact that both can be distributed as an exe/ini combination.
|
|
|
|
 |
|
 |
PS.... if there are road blocks you know of required to support non-standard baud rates, let me know! Termite does some weird things in terms of what 'non-standard' baud rates can be specified and how they are quantized. I suppose maybe it has something to do with what the hardware will support.
|
|
|
|
 |
|
 |
system.io.ports.serialport.baudrate can be set to anything from 0 to the max baud rate for the device.
You could easily modify the baud rate table in the code for Termie Int32[] baudRates = { 100,300,600,1200,2400,4800,9600,14400,15000,19200, 38400,56000,57600,115200,128000,256000,0 }; I added the non-standard baud rate 15000. Hope that helps.
|
|
|
|
 |
|
 |
Hi milkplus,
I have a couple of questions:
1. When sending data, I need to move the cursor about 10 positions to the right to delete previous characters before I enter new text. How could I do that? it appears that there is no ascii characters for the right or left arrows. Is there a way to overwrite current text?
2. What code changes do I have to make to emulate vt100?
3. In regard to sending hex code: Do I need to send ff at the end of the stream? i.e. \x01\x02\x5f\ff or \x01\x02\x5f is fine (without ff at the end).
Thanks for sharing such a great application!
xplorer2k
|
|
|
|
 |
|
 |
This source code is just cool! i've been looking for this kind of project since long ago, but after i opened the .zip code, wow! There's so many files.
i want to achieve: sending data from a PS3 controller (playing game in my PC with a PS3 controller) through RS-232 to a PIC 16f84 IC (8 channel servo controller).
Is it possible to include all the code into 1 file for easy reading?
Pls reply, i really curious & want to try the code out!
Thank you very much!!!!
modified on Saturday, September 12, 2009 10:54 AM
|
|
|
|
 |
|
 |
Thanks for your effort and sharing it with us. It is grate and gave me lot of help that I have been searching for a week. Thanks again and keep it up.
|
|
|
|
 |
|
 |
I'm pretty new to programming (anything) but...
I have this string:
BE EF 10 05 00 c6 ff 11 11 01 00 01 00
it's to turn on a video projector.
I cant seem to get it to work in hex mode... any ideas on a way to convert it?
|
|
|
|
 |
|
 |
some values of hex work but others send 3f. \x5a sends 3F instead.
I'm I doing something wrong?
Is there a way to insert ascii and hex value in the file and send them all?
Thanks
|
|
|
|
 |
|
 |
Work's great! Thanks for sharing Termie with us. It saved me a lot of time getting a serial port interface up and running in an application I am working on in C#. Thanks again 
|
|
|
|
 |
|
 |
is there possibility to enter some binary code that termie will send properly ?
|
|
|
|
 |
|
 |
You can send binary hex codes like this
\x01\x02\x5f\ff
|
|
|
|
 |
|
 |
hm so what am i doing wrong ?  cause i would like to send code: 11111111 00000011 10111011 10010100 dec it is: 255 3 187 148 and hex: ff 03 bb 94 -> so as You told me i have written \ff\03\bb\94 but withoud any effects :/ in general,i would like to sent commands to my robot (based on sk18) and it accepts frames like i have written above in binary (it works with dedicated soft) do You have any clues ? 
thanks in advance
|
|
|
|
 |
|
 |
I haven't tried it, but it looks like what you should be using is \xff\x03\xbb\x94 instead of \ff\03\bb\94.
|
|
|
|
 |
|
 |
Thank you for sharing Termie. I tried to use Termie to send a file to a microprocessor. It's a ServoPod from Newmicros. I was not able to send the file. The file needs to be sent one line at a time with each line ending in a CR. The next line needs to wait for a CR-LF to be sent by the microprocessor (line pacing). Is it possible to setup Termie to send a single line from a text file then wait for a CR-LF before sending the next line? The microprocessor is compiling the text as it is sent and needs a little time to process each line of text. Also, if an error occurs (such as an unrecognized word) the microprocessor sends back a " ? " (that's a space, question mark, space). Is it possible to make Termie abort a file transfer if a certain character string is sent back? I also saw the word "Able" being sent by Termie. Is it possible to disable any extra text (other than the text from the file) from being sent? Even if none of the above is possible with Termie, I still appreciate you making your software available to the public. Thanks, Gary
|
|
|
|
 |
|
 |
The type of "send file" you describe is very specific to your needs and I wouldn't put that into this simple and general purpose app. Even adding a customizable protocol with acknowledge and error sequences is more than I want to implement. If you want to do it yourself, look for these lines in form1.cs
String text = System.IO.File.ReadAllText(dialog.FileName);
CommPort com = CommPort.Instance; com.Send(text);
This is where you'll want to add the logic you describe. You might even want to put it on a separate thread and add a progress bar since it will hang up the UI until you are done sending but that is more complicated.
hope that helps
|
|
|
|
 |
|
 |
More detail on how to use the source code would be nice - even 1 snippet.
|
|
|
|
 |
|
 |
I noticed that only ascii characters up to 127 decimal are supported by Termie.
If a byte is read whose value is greater than 127, it is converted to the ? character (3F) in hex.
The same thing applies to hex writes. Any hex value larger than 7F (127dec) is converted to a ? char and then sent over the COM port.
Would it be possible to modify Termie to support hex reads/writes up to FF?
Thanks!
|
|
|
|
 |
|
 |
I will investigate and fix if possible. Thanks for the feedback
|
|
|
|
 |
|
 |
Thanks for Termie.. Good little terminal progam and may use it from time to time. The question that I have is there a way to key in and send hex codes from the send "enter" line?
Respectfully dsherack
|
|
|
|
 |
|
 |
You can now send hex codes like this
\x01\x02\x5f\ff
|
|
|
|
 |
|
 |
Yep that’s it.. Excellent! Keep up the good work! Thanks Dan
|
|
|
|
 |
|
 |
Great, but... without a history it is useless for me (and I would guess many others). The reason I looked at this is that the history of Termite is bugging the h*** out of me... Parts of it is really neat, but other parts i really annoying.
Wishlist: In input window, hitting up-arrow would give you previously used commands in the order they were given (most recent first). This is how every shell (linux, ms-dos etc) works today.
If something is already written in input window, hitting up arrow would give you previously typed commands that start with the same (most recent first). This is how termite works, but it gives you the commands in jumbled order which can be terribly annoying.
Thanks for your great work!
|
|
|
|
 |
|
 |
By "input" window I'm guessing you mean the SEND textbox. I changed it to a combobox with history. Hope that helps
|
|
|
|
 |
|
 |
When I hit the close button from the main window, or the OK button from the settings window, termie hangs.
This only happens when I am connected to a serial port that is sending out a message every 12 milliseconds, which equals around 85 messages per second.
My serial port settings are 19,200 bps 8N1, no handshake.
I think I have traced the problem to the _readThread.Join(); //block until exits call in the StopReading() function.
The call executes, but never returns.
Again, this only happens when the read thread is processing lots of data.
Do you have any suggestions as to how I can fix this problem?
Thanks!
Great program by the way.
|
|
|
|
 |
|
 |
Thanks for the bug report.
The short answer (fix) is to make _keepReading in CommPort.cs a volatile like this:
volatile bool _keepReading;
The explanation is that Join() doesn't finish because two threads are accessing _keepReading and they don't know about each other. So the worker thread "caches" the _keepReading variable and doesn't realize that the main thread has requested it to stop.
I'll add this fix to my next version of Termie.
Best, David
|
|
|
|
 |