Is there an implementation specification for the Kermit file transfer protocol (serial)? - kermit

I need a serial protocol for an embedded system that has some quirks. Right now it does YModem, but there are hiccups, so I thought I would try Zmodem or Kermit. Zmodem has both code and a clear enough implementation spec.
I can find nothing from which I can implement the file transfer protocol of Kermit from "scratch" (nor usable code).
There's source that isn't well organized and includes full terminal emulators and TCP clients, with all kinds of sections and options for every computer including antiques. E.g. C-Kermit 9.0. I'd spend more time refactoring it to extract just what I need than implementing it outright.
There is an abstruse mathematical paper that I find confusing since it doesn't talk about bits and bytes only something between a formal proof and pseudocode. (Proof.pdf - and it has theorems, proofs, and lemmas!). It claims to be some kind of specification. Maybe buried in there somewhere, but the same problem, I'd have to spend a while extracting the actual coding information.
I need some of the advanced features (full sliding windows), but the Embedded Kermit says it doesn't have those (though has some partial bits or hooks) but does have some other stuff I neither want nor need.
I don't think I would have any trouble writing Kermit from a real specification targeted to programmers as to what goes over the wire (content and timing), or better yet, a clean but full implementation.
I can't find either. Does anyone here know of one?

The kermit protocol was documented in the book Kermit, a File Transfer Protocol by Frank Da Cruz (Digital Press, 1987). There's an online document called Kermit Protocol Manual (1986), which I assume is an earlier version of the book.
Some of the optional features in the manual have never been implemented, and there are also some optional features that have been implemented but never found their way into the manual. If you're interested in these exotic extensions, you will need to browse through this archive of Kermit protocol discussions.

Related

Easy way to find out whether a Posix API is implemented by an OS

While writing my code I thought of having a common implementation for all POSIX OSes as opposed to separate implementation for each OS. One of the POSIX API I use is posix_fallocate() and while testing I found it not being supported by MacOS.
Had I known this earlier I would have not used this API or have had separate implementations for each OS.
So my question is - what is an easy way to find support for a particular posix call in different OSes? Do people always have to search documentation for each target OS?
Thanks.
Looking at the documentation is a good start, but it often won't tell you when a particular function has been implemented, which is also important. For obscure platforms, it may be difficult to tell which older versions are still relevant, which makes it even harder to decide whether a dependency on a particular POSIX feature is acceptable.
The other question is whether a feature is implemented, but with substandard quality. posix_fallocate is an interesting corner case in this regard. The glibc implementation uses emulation if the file system lacks support for an actual low-level fallocate operation (such as NFS until recently):
https://www.gnu.org/software/libc/manual/html_node/Storage-Allocation.html
Depending on what your application does, this behavior might not be acceptable. Just checking header files and documentation might not reveal this (the Note part in the documentation above was added only recently, for example).
In the end, there isn't a good substitute for building and testing as early as possible on all relevant targets, but I understand that this is increasingly difficult for non-Linux targets.

Open source code exists for ONVIF video stream on camera side? (not client side)

I would like to send a video stream via an ONVIF protocol from an a H.264 stream or an IP camera (which has not a onvif protocol).
I have seen that a programmer's guide exists but does a open code exists in java, C, javasript,etc?
Such a code does not exist, because the specification is in WSDL form, so you can use that to autogenerate the code with an adequate tool such as gsoap.
A note for comments
I am part of the ONVIF group, I used to be part of PSIA and took part to ISO/IEC TC 79 WG 12 for 62676-2. I can say that, unlike PSIA, there is not official code for device or client. Further more, implementations made by companies selling SOCs exist, but they require NDAs and are not opensource.
Since implementation depends on the operating system of the camera as well as on the software used to implement it and on the hardware, they are too specific. The tool used by most manifacturers is GSOAP. So please:
Understand that the WSDL specifications together with the programming guide is sufficient to develop it
Stop adding meaningless comments and/or suggest edits just to get badges.

what library is better between libcurl and chilkat?

i'm newbie in FTP connection programming in Cocoa. I found 2 library that i can choose for make my app, but i dont know what's the best between these libraries. The libraries are libcurl and chilkat . The problem is what benefit of each library? Did somebody compare it? or maybe can anyone tell me about your experience? Thank you
I don't have any experience with chilkat, but I can tell yout that libcurl is used in a lot of programming languages and is available on a lot of systems. In for example PHP or on a Mac curl is a great tool to use.
So I would advice libcurl if it's available on your platform. You will probably find more information about curl and it has proven itself on many other platforms.
Also interesting if you want to go with curl is curlhandle. It's a cocoa wrapper around the curl library. Probably very handy in your case, but I've no experience with it.
I can tell you that the difference between libcurl and chilkat is like this: (though you probably know by now)
Chilkat is like the chess game you buy at the store and libcurl is like the plastic in liquid form you buy that you can make any chess piece with.
Libcurl is a slightly abstracted sockets-connector and Chilkat handles everything you'd do, up to a certain amount, with that connection. You're either staring at bits or something "made those bits into an email". I'm about to buy Chilkat for some of the libs, I like the features, but at the same time I wish I had time to read the RFC's and play with the other stuff using libcurl. Anywho, hope that answer is worth something to someone.
Because this question is still ranking high on google i give you my experience.
I bought chilkat in 2015 and moved to libcurl later and my own implementation much later. Both are far from perfect. libcurl just shows it's age and some weak designs.
libCurl is an library that tries to implement all URL able protocols even if they are designed as stream protocol like FTP. Do yourself a favour and only use it with HTTP/HTTPS. It just does the transfer part. Which is not enough for handling. You would love to see at least mime and charset routines to use the downloaded files.
Chilkat is a toplevel library that tries to give you as much highlevel access as possible. It uses background threads in script languages where it is not easy to use. The problem is that the API is terrible, very little documented and total failure when you want to write a quality program. For example it returns requests as a string. There is no way for stream processing. Now imagine you download a large GB iso file, you wont be happy. It can return as a file but then you have to specify this at the begin of a request when you don't knwo the download size.
Also the code quality until proven otherwise is bad. There are a few chilkat source code snippets in the wild which you can find via google and they are pure madness. Ok we don't know how this old code has been refactored now. But it leaves a bad taste, remember this is closed source and there is not a single mention about corner cases, which protocol is implemented, which feature of protocols are implemented and so on. You are using a total black box.
Also it does not allow high performance and high value code. I used it to write a web crawler and it was much much slower then libcurl.
I later used the HTTP and SSH compoenents to automate some server/client management scripts and there it shines. You know both sides and can just test if they work together and don't get any surprises. Then it is indeed easy and better then using the broken python or ruby SSH.
But if you ever contact with another unknown server, Chilkat is not your library.

How to encrypt or obfuscate objective c code? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
iPhone/iPad App Code Obfuscation - Is it Possible? Worth it?
I have spent a lot of time on this and I couldn't able to find a perfect answer. That's why I decided to put my question here. I have an iPhone application and want to encrypt the code to prevent from class-dump or otool utilities. (Tools used to dump out the headers from executable). I would like to know is there any way to encrypt the source code or obfuscate the source code?
It's a lot more complicated than it might seem initially. Any tool that mangles method names has the potential to fudge up:
KVC compliance
The use of dynamically generated selectors
Nib file compatibility
Protocol conformance
Method inheritance
Obfuscation is just another layer to deal with; often obfuscation is easily reversed. It is not really possible to “encrypt” your classes because the Objective-C runtime and Cocoa framework won't know how to decrypt it. Anyone determined enough will eventually figure out how your program works.
Actually you can provide some obfuscation and tamper protection with specialist 3rd party tools. There are 2 companies, I know of, that provide tools or services to do this : Arxan and irDato.
Neither are cheap or accessible to small developers but if you are developing for a large corporation then you should consider them.
Obfuscation is done by mangling code paths and adding redundant instructions so as to confuse anybody trying to reverse engineer the code. Tamper protection is done by adding checksums to the code and embedding checksum checks within functions. You can create a network of interdependent checksums that makes it extremely difficult to bypass them. There are a few other things that can be done but you really need to talk to specialists in this area.
Further to the earlier answer, Apple does not encrypt the binaries but just signs them. It is fairly easy to reverse engineer and modify app binaries on a jailbroken device.
Apparently, according to this answer Apple encrypts iPhone binaries as a matter of course for all iPhone apps.
I'd stop worrying about it.

Which environment, IDE or interpreter to put in practice Scheme?

I've been making my way through The Little Schemer and I was wondering what environment, IDE or interpreter would be best to use in order to test any of the Scheme code I jot down for myself.
Racket (formerly Dr Scheme) has a nice editor, several different Scheme dialects, an attempt at visual debugging, lots of libraries, and can run on most platforms. It even has some modes specifically geared around learning the language.
I would highly recommend both Chicken and Gauche for scheme.
PLT Scheme (DrScheme) is one of the best IDEs out there, especially for Scheme. The package you get when downloading it contains all you need for developing Scheme code - libraries, documentation, examples, and so on. Highly recommended.
If you just want to test your scheme code, I would recommend PLT Scheme. It offers a very complete environment, with debugger, help, etc., and works on most platforms.
But if you also want to get an idea of how the interpreter behind the scenes works, and have Visual Studio, I would recommend Tachy. It is a very lightweight scheme interpreter written in c#. It allows you to debug just your scheme code, or also step through the c# interpreter behind the scenes to see what is going on.
Just for the record I have to mention IronScheme.
IronScheme will aim to be a R6RS conforming Scheme implementation based on the Microsoft DLR.
Version 1.0 Beta 1 was just released. I think this should be good implementation for someone that is already using .NET framework.
EDIT
Current version is 1.0 RC 1 from Oct 23 2009
Google for the book's authors (Daniel Friedman and Matthias Felleisen). See whether either of them is involved with a popular, free, existing Scheme implementation.
It doesn't matter, as long as you subscribe to the mailing list(wiki/irc/online-community-site) for the associated community. It's probably worth taking a look at the list description and archives to be sure you are in the right one.
Most of these are friendly and welcoming to newcomers, so don't be afraid to ask.
It's also worth searching the archives of their mailing list(or FAQ or whatever they use) when you have a question - just in case it is a frequent question.
Good Luck!
Guile running under Geiser within Emacs provides a nice, lightweight implementation for doing the exercises. Racket will also run under Geiser and Emacs, though I personally prefer Guile and Chez Scheme a bit more.
Obviously installation of each will depend on your OS. I would recommend using Emacs version 24 and later since this allows you to use Melpa or Marmalade to install Geiser and other Emacs extensions.
The current version of Geiser also works quite nicely with Chicken Scheme, Chez Scheme, MIT Scheme and Chibi Scheme.
LispMe works on a Palm Pilot, take it anywhere, and scheme on the go. GREAT way to learn scheme.
I've used PLT as mentioned in some of the other posts and it works quite nicely. One that I have read about but have not used is Allegro Common LISP Express. I read a stellar review about their database app called Allegro Cache and found that they are heavy into LISP. Like I said, I don't know if it's any good, but it might be worth a try.
I am currently working through the Little Schemer as well and use Emacs as my environment, along Quack, which adds additional support and utilities for scheme-mode within Emacs.
If you are planning on experimenting with other Lisps (e.g. Common Lisp), Emacs has excellent support for those dialects as well (Emacs itself can be customized with its own dialect of Lisp, appropriately named Emacs Lisp).
As far as Scheme implementations go, I am currently using Petit Chez Scheme, which is an interpreted, freely distributable version of Chez Scheme (which uses a compiler and costs money to obtain a license).