Shop OBEX P1 Docs P2 Docs Learn Events
PropViewer - Propeller Serial Terminal Version 2.2 — Parallax Forums

PropViewer - Propeller Serial Terminal Version 2.2

PraxisPraxis Posts: 333
edited 2008-09-22 15:39 in Propeller 1
PropViewer is Serial Terminal for the Propeller Chip with a state of the art GDI+ rendered GUI.

PropViewer has two modes of operation:

1. PST (Parallax Serial Terminal) Emulation i.e. whenever the terminal window loses focus
the serial port is disconnected to allow the propeller to be programmed.

2. Remote Control mode where the PropViewer is controlled by Proploader (V1.04 and above)
PropLoader commands the PropViewer program via a UDP connection

2. Normal Terminal mode where PropViewer is just any regular terminal.

[b]Version 2.2 Features[/b]

1.  Operating modes as described above.
2.  Propeller Loader, The RAM or EEPROM can be program within PropViewer.
3.  Propeller Reset button.
4.  Data display modes: Normal, Normal plus ASCII control chars and HEX.
5.  Local Echo button echos sent data to the main terminal screen formatted as per displays modes above.
6.  Clear Screen button. and ASCII "NULL" clear screen option.
7.  Function Buttons allows defining 12 buttons for preset data sending.
8.  Function buttons can be edited, saved, loaded and defined as a default set on program start.
9.  Function Button labels can be defined.
10. Function Buttons are on a collapsable panel to allow hiding resizing of the buttons.
11. Function Buttons are also mapped to keyboard function keys 1 to 12.
12. Mouse over a function button displays a "Tool Tip" with the button send data.
13. Clicking on a saved function button file will launch PropViewer with that button file.
14. Repeat data function, set by a time interval in the setup the last sent data can be repeatedly sent.
15. Data Logs can be generated for all data transactions each with date/time stamped file name.
16. Data Log files can be viewed on the main terminal window.
17. A Raw text file can be sent to the serial port with on screen report of file name and bytes sent.
18. Manual Text sending with either send with enter key or PST style operation.
18. Global CR and LF appending to all sent data strings.
20. Word wrapping for terminal screen.
21. Received, sent and status data is displayed in different color.
22. Control Key plus + or - changes the terminal screen font size.
23. All settings and options are save for use in later sessions.
24. Settings for serial communications parameters.
25. Windows installer.





PropLoader is a command line programmer for the Propeller Chip that can be used standalone
or in combination with PropViewer.


NOTES:
For Non Windows users a Binary of PropViewer is included as a separate zip file.

The Zip contains both programs. Both Programs require the DotNet Framework Version 2



www.praxis.com.my

Post Edited (Praxis) : 9/19/2008 7:26:28 PM GMT
«13

Comments

  • jazzedjazzed Posts: 11,803
    edited 2008-09-12 15:22
    Hi David,

    Seems like if you just integrate the PropLoader function and Propellent access (to create a spin binary from a given source) into your PropTerminal, things can be greatly simplified without any security questions or special requirements. This way one can have a "solution" project that might also make a future spin debugger easier to add and control.

    The intent to allow PropLoader take temporary control of the serial-port is a good idea although it brings up some security concerns .... The windows firewall has some ability to isolate transactions to a subnet, but that is "complicated" I guess.

    I've gotten quite used to the idea of window.deactive events turning off the comm port ... having "remote program" control or an expanded IDE would of course be more convenient.

    I get the error in the box below ... I'm using Windows XP and Live OneCare if that means anything. When I first saw "remote control" I thought about the side thread discussion we had about remote machine client-server downloads ....

    C:\Documents and Settings\Steve\My Documents\_Propeller_\praxis>caspol -machine -addfulltrust PropTerminal.exe
    
    Microsoft (R) .NET Framework CasPol 1.1.4322.573
    Copyright (C) Microsoft Corporation 1998-2002. All rights reserved.
    ERROR: Unable to load assembly
    Usage: caspol <option> <args> ...
    caspol -af
    caspol -addfulltrust <assembly_name>
        Add full trust assembly to policy level
    

    Thanks for allowing PropLoader to use position independent file arguments. I first tried to download a file with the ".bin" extention, but that didn't work (file not found) so I changed the extention to ".binary" and that worked fine.

    BTW: Nice looking "skin" or window dressing on your application .... Are you using C# ? Can you provide a link or pointer that describes how to do that? Thanks.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Post Edited (jazzed) : 9/12/2008 3:27:18 PM GMT
  • PraxisPraxis Posts: 333
    edited 2008-09-12 15:45
    Hi Steve,

    Seems like if you just integrate the PropLoader function and Propellent access (to create a spin binary from
    a given source) into your PropTerminal, things can be greatly simplified without any security questions or special
    requirements. This way one can have a "solution" project that might also make a future spin debugger easier to add
    and control.
    

    I'm actually got an IDE as a work in progress that allows defining the external compiler/loader
    etc that also has the terminal built in finding the time to complete it is another matter

    The intent to allow PropLoader take temporary control of the serial-port is a good idea although it brings up
    some security concerns .... The windows firewall has some ability to isolate transactions to a subnet, but that is
    "complicated" I guess.
    

    Most firewalls (XP included) and virus programs that have worm protection allow
    exceptions for programs, so instead of unblocking the port just allow exceptions for PropTerminal & PropLoader.

    I've gotten quite used to the idea of window.deactive events turning off the comm port ... having "remote
    program" control or an expanded IDE would of course be more convenient.
    

    I actually found that quite annoying
    with PST so hence the motivation to write the PropTerminal.

    I get the error in the box below ... I'm using Windows XP and Live OneCare if that means anything. When I
    first saw "remote control" I thought about the side thread discussion we had about remote machine client-server
    downloads ....
    

    I suggested the CasPol.exe for those users who do not run XP or Vista as a possible fix for for the
    reported problems. The error message that you got is because the CasPol.exe you executed is for the Framework
    Version v1.1.4322 not version 2 (refer included picture).

    For the client/server downloads I am writing the programs at this time and will be able to post them later for you
    to have a play.

    Thanks for allowing PropLoader to use position independent file arguments.
    

    De Nada.

    BTW: Nice looking "skin" or window dressing on your application .... Are you using C# ? Can you provide a
    link or pointer that describes how to do that? Thanks.
    

    Yes I am using C# but the "skin" is actually from a
    set of custom controls that I wrote some time back.

    David

    Post Edited (Praxis) : 9/12/2008 3:55:44 PM GMT
    748 x 291 - 47K
  • jazzedjazzed Posts: 11,803
    edited 2008-09-12 16:24
    David,

    I've enabled port 8080 in my firewall for local network (tried both Windows Firewall and OneCare Firewall), but I get an exception running PropLoader with TERM=TRUE. I'm using the lasted .net that was installed with Visual Express 2008 applications.

    On the client/server application ... I'm no longer working in the situation I've previously described so my resources and requirements are not identical to that.

    That being said, I still have this need though since I have a messy/noisy machine in the garage that I would like attach to an old windows xp machine for this purpose. Having virtual comm-port(s) using your transport layer would be nice so I can run the control application from my office. Virtual comm-ports would allow me to have more than one machine running at a time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-12 16:42
    Hello David,

    my Kaspersky virusscanner says new Threat Type Win32

    found new Threat Type_Win32 (Modifikation) File: C:\....Propeller\PropLoaderTerminal_1.zip/PropLoader.exe//PE_Patch

    So what's wrong with your file ?
    Did somebody hide malicious code in your setupfile ?

    I will wait until Kaspersky sends me an answer

    best regards

    Stefan
  • PraxisPraxis Posts: 333
    edited 2008-09-12 16:50
    Hi Steve,

    I have uploaded a new proploader that has a debug dump, just add DEBUG=TRUE to the command line line and let me know the results.

    @StefanL38: I think you are getting a false positive but check with Kaspersky anyway.
    FYI I scaned the new zip I just posted with Norton Antivirus and the results are:


    Scan Stats:
      Scan Time: 4
      Scan Options: 
      Scan Targets: D:\Project\CUSTOMER\_Propeller\Binaries\PropLoaderTerminal_2.zip
      Counts:
       Total items scanned: 3
       - Files & Directories: 3
       - Registry Entries: 0
       - Processes & Start-up Items: 0
       - Network & Browser Items: 0
       - Other: 0
    
       Total security risks detected: 0
       Total items resolved: 0
       Total items that require attention: 0
    
    Resolved Threats:
    
    
    



    Cheers
  • jazzedjazzed Posts: 11,803
    edited 2008-09-12 17:02
    C:\Documents and Settings\Steve\My Documents\_Propeller_\praxis>PropLoader.exe commport=3 mode=ram term=true debug=true
    [url=http://www.binary/]www.binary[/url]
    Debug Dump:
    System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions
       at System.Net.Sockets.Socket.SendTo(Byte[noparse][[/noparse]] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remote
    EP)
       at System.Net.Sockets.Socket.SendTo(Byte[noparse][[/noparse]] buffer, Int32 size, SocketFlags socketFlags, EndPoint remoteEP)
       at PropLoad.a.a(String b, Boolean b)
    Programming..........
    Programming Error!
    
    Debug Dump:
    System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions
       at System.Net.Sockets.Socket.SendTo(Byte[noparse][[/noparse]] buffer, Int32 offset, Int32 size, SocketFlags socketFlags, EndPoint remote
    EP)
       at System.Net.Sockets.Socket.SendTo(Byte[noparse][[/noparse]] buffer, Int32 size, SocketFlags socketFlags, EndPoint remoteEP)
       at PropLoad.a.a(String b, Boolean b)
    Debug Dump:
    System.ApplicationException: Receiving Handshake Failed!
       at PropComms.b.a(String b, a b)
       at PropLoad.a.a(String[noparse][[/noparse]] b)
    
    

    Having trouble configuring firewall now. Time to reboot.



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • PraxisPraxis Posts: 333
    edited 2008-09-12 17:10
    Hi Steve,

    looks like something is blocking the port could be firewall etc.

    In the previous version I did not have an error trap for socket errors so it would crash the program, I added the error trap so the program won't crash.

    David
  • jazzedjazzed Posts: 11,803
    edited 2008-09-12 18:33
    Geez ... slap me. I had turned of the "ask about block or allow programs" in Live OnceCare a few days ago. Works like a charm now [noparse]:)[/noparse]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • PraxisPraxis Posts: 333
    edited 2008-09-12 18:40
    There comes a time in an engineers life when you look down and think "how the frack did that get there"[noparse]:)[/noparse]

    Glad to hear its working OK.

    Cheers

    David
  • jazzedjazzed Posts: 11,803
    edited 2008-09-12 19:29
    I think that every time I look down and can't see my feet [noparse]:)[/noparse]
    Wife says: "I put the plate in front of you, but I didn't force you to eat!"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • AribaAriba Posts: 2,690
    edited 2008-09-12 21:14
    Praxis

    If you name it PropTerminal this will produce a lot of misconceptions in future threads.
    "My" PropTerminal is used by many Propeller users, and intergrates also a Terminal and a Loader (together with many other functions).
    You can find it here:http://forums.parallax.com/showthread.php?p=649540
    or on my website: www.insonix.ch/propeller/prop_term.html

    But certainly I don't own the TradeMark for this name, so you can name it like you want smile.gif

    Andy
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-09-13 07:52
    @Praxis - I haven't tried your program yet, but this is good news.

    Seems like all the pieces are coming together, what with Compilers (spin, forth, c), PASM and Spin debuggers, Terminal Program and possibly an IDE the future looks very rosy indeed cool.gif

    FYI so you know what features I use:·I use PropTool and PST. I have no issues·with the mechanism PST uses to close the com port - in fact I like it·smile.gif· Actually, I would like PST to have an option to automatically open the com port when it gets the focus again. It woud be nice to be more like Hyperterminal which shows the keyboard input·characters in situ. The other feature I would like is a capture, so that debugging output can be captured. I copy the PST window and paste to notepad. However, PST gets corrupted after a number of characters (few k I think), so this does not work for large outputs. I use PropTool's editor - so if you use the PropLoader, what/how do you edit the source?

    It would be great to integrate the debugger. It·would be nice to read the source file (or list file generated by PropList or Homespun) to marry up the source to the debug output. I can provide much of this info if you like. I haven't decoded the bytecodes like I did with the PASM but have the info in a table which you could use bits from.

    I am now debugging my Interpreter and comparing outputs and timing. I can see where the timing is being spent and where to concentrate to speed up further. PM me if you would like an advanced copy of the working debugger with spin, including the new interpreter. (I will not be home till tomorrown night). See Spin Interpreter - Faster ?? for sample spin debug output.
  • StefanL38StefanL38 Posts: 2,292
    edited 2008-09-13 08:13
    hello Cluso,

    take a look at

    http://forums.parallax.com/showthread.php?p=629665

    this is full featured terminalsoftware with

    - auto connect/disconnect

    - script language for advanced debugging on serial data transmission issues

    - traffic graph

    - macros for sending predefined strings

    - log to file function

    best regards

    Stefan
  • PraxisPraxis Posts: 333
    edited 2008-09-13 09:49
    @Ariba: Hi Andy firstly let me say I did not realize you had a program with the same name and you are quite right about the possible confusion so with that in mind I have renamed it to PropViewer.

    @Cluso99: I have screen capture to clipboard but it is not fully debugged and will update the zip when it is.
    Yes tying input into the same window does have some merit, I will have a think about that.
    One Thing that is a work in progress is function keys that have predefined strings to send, this is something that the old terminal program from Win3.1 had and I used a lot.
    I use a third party IDE for code editing and PM me with the debugger details.


    Cheers
  • PraxisPraxis Posts: 333
    edited 2008-09-13 10:17
    PropViewer Version 1.2 uploaded.

    Right Click in the terminal window will capture the content to the ClipBoard.
  • jazzedjazzed Posts: 11,803
    edited 2008-09-13 15:10
    @Praxis:

    Here are some nice to have feature requests if you have any time to implement them:

    * I would be much more prone to use your solution if the propellent (or other compiler like ICC or otherwise) and loader were controlable via a "build" and "build -> load" mechanisim especially if it was tied to a tool-bar button and the tool path/executables were configurable in setup.

    * I too like the input/output in the same TextBox, but that is less important to me than having fully functional and convenient terminal features.

    * Copy/paste to and from host is very important. PST is a nice terminal emulation program, but it can't do copy/paste at all ... Jeff was having a bad day I guess [noparse]:)[/noparse] .... Hyperterm can do copy/paste, but you have to right click blah.

    * Being able to repeat a command from a ComboBox (given a separate input as you have) is nice but not necessary to me at least. I would appreciate a "repeat last command" button more than the ComboBox though.

    * Some kind of a scripting machine would be very useful ... essentially the scriptor would send commands one line at a time and expect a prompt after each command sent. It could have definition for the prompt to expect after a command is done. Being able to run all steps, reset, stop,·continue, and step·would all be useful in a scriptor. Some #include capacity would also be helpful.· This is all pretty easy to write for C# once all the menu commands and buttons are defined. I've done it before except for the #include ... snapshot of this is attached.

    * User macro definitions would be nice including the ability to assign "scriptlets" to buttons or function keys.

    * We've already discussed virtual com-ports [noparse]:)[/noparse]

    * Having your terminal reconnect "immediately" after download is very useful.

    Much of this would require a "solution manager" for loading, saving, etc... for different working environments.



    @Andy: I like your PropTerminal idea of mapping Keyboard/Mouse/TV/VGA input/output to a PC, but not being able to resize the screen is a BIG killer to me ... that's the main reason I don't use that product. I mostly enjoyed using your PASD debugger except for lack of buttons and the always on top windows. I think what should be taken from this little rant is that "user configurability is important" [noparse]:)[/noparse]



    @Stephan: Bray's terminal encapsulates some good ideas, but I find it too "visually complex" to use regularly. It like PropTerminal's little screen makes my eyes hurt. I don't use things that give me a headache. There are many more useful and user friendly alternatives.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
    585 x 543 - 42K
  • AribaAriba Posts: 2,690
    edited 2008-09-13 17:34
    @jazzed

    You can resize PropTerminal, but not with the GUI. Just write the Settings (produces 'PropTerminal.ini') and edit the Rows and Cols parameter to the value which you want. You can have many .INI files for different applications, and switch between theme with the 'Load Settings' Menu Item. So you can fast change the Window size, the COM port, the Terminal mode, the baudrate ....
    In the next version (0.5) you can also scale the Window by a factor,like 1.5, 2.0, 0.5 or whatever you want, to make the font bigger.
    The little Window of the default settings is choosen to be TV_Text compatibel (40 x 13 characters), because this was the main application of PropTerminal at the begin.

    @praxis

    Thank you for renaming your Propeller Terminal.
  • PraxisPraxis Posts: 333
    edited 2008-09-14 10:00
    Version 1.4 Uploaded, See Top for files and release notes:
  • SapiehaSapieha Posts: 2,964
    edited 2008-09-14 11:52
    Hi Praxis.

    My one proposo.
    In Butons setup maybe You have one more option to SET (F1-12) else any other KEY for rapid Commands.


    Ps. Maybe one more Meny command ( Call Loader ) to have all in one funktions.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stuipid question there is atleast one inteligent awnser
    If you dont ask you wont know

    Sapieha
  • DroneDrone Posts: 433
    edited 2008-09-14 12:27
    More .NET stuff - ugh.

    David
  • PraxisPraxis Posts: 333
    edited 2008-09-14 12:51
    Sapieha: It's on my to do list[noparse]:)[/noparse]

    Drone said...

    More .NET stuff - ugh.

    Memores Acti Prudentes Futuri

    Cheers
  • hippyhippy Posts: 1,981
    edited 2008-09-14 14:56
    Drone said...
    More .NET stuff - ugh.
    Maybe, but programmers code using languages they are familiar with using tools they have and
    know. As end-users we largely get what we pay for. If there's enough incentive I'm sure that
    most programmers would code in languages others prefer and write for operating systems and
    frameworks others may use. Without the incentives we're all stuck with whatever is generously
    given.

    There's nothing to stop anyone developing the same applications for other platforms and frame-
    works. At least .Net programs usually run on anything from Windows 95 through Vista so that's
    the largest market and audience catered for.
  • jazzedjazzed Posts: 11,803
    edited 2008-09-14 18:29
    @David:

    Nice buttons and definition dialog window ... being able to minimize the buttons helps get rid of window clutter. The Ok button is missing in dialog, but I can live with that. I'm quite annoyed that I can't resize your main application window, but I am otherwise happy with your familiar and intuitive user design. Having to read a friggin' novel or otherwise dig beyond the mainstream paradigm to make common things work is just sillly to me [noparse]:)[/noparse] BTW: I found in my on applications that being connected is not a requirement for toggling DTR to do reset.

    On .net .... Hippy is on target as usual. Also ....

    Response to my poll about using Java was not very encouraging besides the "gee you should ask the question I want to answer" factor [noparse]:)[/noparse] Thing is, the amount of effort required and "return on effort" has to be over a certain mark otherwise it's just silly to do. Most people can use C# and .net one way or another, and for those who can't or don't, C# is easily ported to Java if that is an important enough market to serve or as a checklist item.

    Addressing the biggest market first is important; however, with new markets, providing solutions in niche can build important loyalty with key advocates. Of course Mac OS has enough momentum these days to make that worth a another look but I really don't have time for that. If you want to run programs from some other linux development environment, then you probably have the skills to write that yourself anyway or build applications for others in that market.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve
  • jazzedjazzed Posts: 11,803
    edited 2008-09-14 19:14
    @David:

    Edit: Question about Deactivate removed ...

    Thanks for your efforts so far ... those buttons have me hooked ... wish there was more [noparse]:)[/noparse]·Could you add the button definition to its tool tip text? That would be very helpful.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    --Steve

    Post Edited (jazzed) : 9/14/2008 8:30:53 PM GMT
  • PraxisPraxis Posts: 333
    edited 2008-09-15 13:10
    @jazzed: Thanks for the feedback, I am finding this program quite useful as well, hence the original reason for writing it.
    I have added resizing to the main form, the custom control that provides the form visual appearance was not
    written to have resizing I have however hacked it, must clean it up when time allows.

    I have uploaded Version 1.5 with some features based upon your feedback.

    Cheers

    David
  • SapiehaSapieha Posts: 2,964
    edited 2008-09-15 13:19
    Hi Praxis.

    My question
    On sendings Butons. Is it posible tu have send whole File?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stuipid question there is atleast one inteligent answer
    If you dont ask you wont know

    Sapieha
  • PraxisPraxis Posts: 333
    edited 2008-09-15 13:22
    Hi Sapieha,

    Yes that is possible but we would have to agree on a transport protocol such as Xmodem or Zmodem etc.

    Regards

    David
  • SapiehaSapieha Posts: 2,964
    edited 2008-09-15 13:27
    Hi Praxis

    Not protocol.
    Only raw TXT file with ..

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Nothing is impossible, there are only different degrees of difficulty.
    For every stuipid question there is atleast one inteligent answer
    If you dont ask you wont know

    Sapieha
  • Cluso99Cluso99 Posts: 18,069
    edited 2008-09-15 15:38
    @Praxis: I have just had time to look at your Propviewer. It looks good. May I suggest the following improvements...

    1. The program needs to send each character as it is typed (as in PST and Hyperterminal).
    2. Probably the easiest way to display the characters typed on the screen is to provide an echo option. When a character is typed, it is sent out. If echo is on, it is also placed into the receive buffer and is therefor displayed in the screen as well.
    3. Need and option to set the clear screen character (PST uses $00 and I think $16).
    4. The character set needs to be monospaced.

    Good job.
  • simonlsimonl Posts: 866
    edited 2008-09-15 20:16
    Nice work David, this is really useful smile.gif

    One minor bug though: I can't re-size the window from the bottom-right corner, but I _can_ from the top-right corner! (I can live with that though!)

    Well done.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,
    Simon

    www.norfolkhelicopterclub.com

    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again wink.gif
    BTW: I type as I'm thinking, so please don't take any offence at my writing style smile.gif
Sign In or Register to comment.