EmbeddedRelated.com
Forums

Do you still use "RS232" or something else?

Started by Oliver Betz January 14, 2011
Grant Edwards wrote:

[...]

>> Using a terminal program (e.g the one supplied with the PC operating >> system) is easy. > >The problem is that Windows doesn't supply a terminal program. All it >comes with is "Hyperterminal". While it has the word "terminal" in >it's name I don't think it qualifies as a terminal program. It's so >bad it barely qualifies as a program at all.
Ah, Hyperterminal bashing. I also did so years ago. But it's not justified. There is a flaw in newly created sessions, and there is an easy workaround (save .ht and re-open). Besides this, it is not so bad. Which terminal program do you suggest to be sent to customers? Any pealr I didn't list on http://wiki.oliverbetz.de/owiki.php/TerminalPrograms ? Oliver -- Oliver Betz, Muenchen (oliverbetz.de)
On 1/16/2011 11:33 AM, Oliver Betz wrote:
> D Yuniskis wrote: > > [...] > >>> "Free form" diagnosis means for example that the user can start some >>> self tests and gets results in human readable form. That's easy with a >>> terminal program. >>> >>> With CANopen or Profibus, I had to get access to this bus from the PC >>> and to supply host software to achive a similar result. That's >>> impossible in most cases. >>> >>> Therefore I need a simple "interactive" access to the device. >>> Currently EIA-232 if possible. Or UART data over 24V I/O with a >>> primitive (even passive) level converter for small sensors. We did >>> this long before IO-Link became popular. >> >> But you also need that to be some interface that the (typical) user >> will have ready access to. > > I don't know what you are speaking about. Physical interface: > Connector, level converter? Logical interface?
All of the above. I.e., I *assume* you don't want to have to sell him a "diagnostic tool/interface" but, rather, want him to be able to use "resources" that he already has and is already familiar with to interact with your device.
>> What distances are you concerned with? > > The user will walk to the device, not lay a 100m cable to it. IOW 4m > is long in this context. > > Really long cables will be the mentioned process data buses. > >> And, how "interactive" does it have to be? E.g., entering the >> current date is more interactive than *picking* the day-of-week. > > Using a terminal program, there is little difference.
Yes, my question is meant to see how much *less* than a terminal you can get away with. E.g., you can configure a thermostat with a few buttons (even a fancy "programmable thermostat" with multiple zones, programs, etc.)
>>>> OTOH, if your device is robust enough to be operational *including* >>>> the networking aspects, then you could still support "configuration >>>> and diagnosis" over the wire. >>> >>> If I had Ethernet anyway as Didi's spectrometer has, I would of course >>> offer configuration and diags there. >>> >>> But I'm afraid our users won't use plain/clean Ethernet but switch to >>> "Screwed-Up-Profibus" which I won't implement unless I'm forced to. >> >> If you can live with the (short) distance limitations of USB, what if >> you made your device look like a mass storage device. I.e., damn >> near every USB host out there will recognize a USB "disk drive". >> >> User can mount the drive (which is often automatic) and then access >> X:\index.html to interact with it. That *static* page (i.e., a "file" >> on your device) can have links to: X:\status.html, X:\log.html, >> X:\diagnostics.html, etc. You don't even need a "web server" in >> your device -- instead, you watch to see which "files" are accessed >> and in which order. > > The OS will assume exclusive access, therefore cache data. I think it > will be difficult to establish a dynamic data exchange.
This is not true. E.g., look at HP's (laughable) "Secure Web Console" which implements a "secure" terminal emulator to a serial port (from the network).
> And transferring arbitrary numbers from a web browser to a "mass > storage" device will be also somewhat weird.
It's just a "write" or, even a "GET". With the presentation capabilities of a browser, you can approach data entry differently. E.g., instead of typing in a date, the user can pick a month from a "year at a glance" calendar. That causes that month to be displayed (e.g., february.html) and he can now pick a *day*. All you have to do is watch to see which links get activated (which "files" get requested). Or, use a "slider" to set a numeric value instead of typing in a value. Or, a piece of Java that gets a value and does a *specific* "write" to the device (puts the value in a certain place in a certain form). The advantage of Java is that it lets you "effectively" install a driver *without* Administrator privilege (because that "driver" runs in Java's sandbox and doesn't tinker with the rest of the host like a "real" driver would) <shrug> Again, I can't *tell* you what you SHOULD do. Rather, just offer (perhaps) unconventional approaches that can be bastardized to fit your needs.
On 16.01.2011 20:16, John Devereux wrote:

> It doesn't even have Hyperterminal any more...
Golly, I hadn't even noticed. Well, good riddance, and halleluja, brother. The bloody thing still exists, though, but at least it's not occupying the space needed for an actual terminal program any more. People would now have to consciously go ahead and actually download the thing themselves before they get to "use" it.
On 16/01/11 20:28, Oliver Betz wrote:
> Grant Edwards wrote: > > [...] > >>> Using a terminal program (e.g the one supplied with the PC operating >>> system) is easy. >> >> The problem is that Windows doesn't supply a terminal program. All it >> comes with is "Hyperterminal". While it has the word "terminal" in >> it's name I don't think it qualifies as a terminal program. It's so >> bad it barely qualifies as a program at all. > > Ah, Hyperterminal bashing. I also did so years ago. But it's not > justified. There is a flaw in newly created sessions, and there is an > easy workaround (save .ht and re-open). Besides this, it is not so > bad. > > Which terminal program do you suggest to be sent to customers? > > Any pealr I didn't list on > http://wiki.oliverbetz.de/owiki.php/TerminalPrograms ? >
You already have my favourite, Tera Term Pro, on your list. But you might want to add a link to the current version at <http://ttssh2.sourceforge.jp/> . It has a large number of enhancements since the original 1999 version, including better ssh2 for those that want that (I prefer it to putty), more baud rates, automatic detection of valid comms ports (very handy for USB converters), improved macro language, etc.
Oliver Betz schrieb:

>>I'm not sure that the recurring cost of 232 is significantly lower >>than a small MCU implementing a USB stack. I have yet to add USB to a > > For the MCU side, USB can be cheaper then EIA-232.
It depends - when talking about larger controllers (like ARMs, for example), USB generally does not really add cost. But with a small MCS51 or AVR (cost 1 Euro), RS-232 is definitely cheaper, in any concern (money, board space, power consumption, memory requirements, processing power). Tilmann
On Jan 16, 2:34=A0pm, Tilmann Reh <usenet2007nos...@autometer.de> wrote:
> Oliver Betz schrieb: > > >>I'm not sure that the recurring cost of 232 is significantly lower > >>than a small MCU implementing a USB stack. =A0I have yet to add USB to =
a
> > > For the MCU side, USB can be cheaper then EIA-232. > > It depends - when talking about larger controllers (like ARMs, for > example), USB generally does not really add cost.
I beg to differ.
> But with a small MCS51 > or AVR (cost 1 Euro), RS-232 is definitely cheaper, in any concern > (money, board space, power consumption, memory requirements, processing > power).
The smallest USB AVR costs 1.5 Euro, 5mm x 5mm, 15mW (3V), 8K Flash, 8MIPs. It can implement USB CDC device, but not much else.
Tilmann Reh wrote:

> It depends - when talking about larger controllers (like ARMs, for > example), USB generally does not really add cost. But with a small MCS51 > or AVR (cost 1 Euro), RS-232 is definitely cheaper, in any concern > (money, board space, power consumption, memory requirements, processing > power).
What about the MC9S08JS16? http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=S08JS It costs 1 Euro for the 16 k flash version and can work up to 48 MHz clock. USB doesn't add to memory requirements, because it has extra RAM for the USB module. And you can implement e.g. a HID device in less than 8 k flash, which means you still have another 8 k for your application. It doesn't need much processing power, because the time consuming parts of USB are implemented in hardware. Power consumtion is no problem, because you can add some diodes, e.g. powered from battery, if not connected to USB, and powered from USB port, if connected to an USB port. I don't know, if you need it, because USB enable current is 1.5 mA, but can be higher when transmitting data. Board space is lower compared to standard RS232, because a standard RS232 connector is much bigger than a mini-USB connector, and you'll need additional voltage translators like MAX232, which costs nearly as much as the whole USB solution. -- Frank Buss, http://www.frank-buss.de piano and more: http://www.youtube.com/user/frankbuss
On Jan 16, 1:40=A0pm, Grant Edwards <inva...@invalid.invalid> wrote:
> On 2011-01-15, Oliver Betz <OB...@despammed.com> wrote: > > > rickman wrote: > > > [...] > > >>But I'm looking forward to the day when 232 is replaced by USB, not > >>because laptop makers refuse to have them in the machine, but because > >>USB is so easy to add there is no reason to use 232. > > > Maybe I have a different understanding of "easy". > > > Using a terminal program (e.g the one supplied with the PC operating > > system) is easy. > > The problem is that Windows doesn't supply a terminal program. =A0All it > comes with is "Hyperterminal". =A0While it has the word "terminal" in > it's name I don't think it qualifies as a terminal program. =A0It's so > bad it barely qualifies as a program at all. =A0
Yeah, I agree that it is not much of a terminal emulator. There used to be a commercial program with a similar name that was actually pretty good, but I think that was back in the days of Windows 3.1. Still, there are any number of free or nearly free term emulators that are not just good, but very good. I have used several of them. Rick
D Yuniskis <not.going.to.be@seen.com> wrote:

>E.g., instead of typing in a date, the user can pick a month from >a "year at a glance" calendar. That causes that month to be displayed >(e.g., february.html) and he can now pick a *day*. All you have to do >is watch to see which links get activated (which "files" get requested).
USB storage is a block device so you don't see file requests you would have to do reverse directory searching to find the file owning a block, and you would have take measures to stop the browser caching, and the OS will cache the files anyway (can't think of a way to stop that), and the OS cache may well read ahead into other files, and anti-virus scanners will probably read everything in a directory as soon as you touch it.
>Or, a piece of Java that gets a value and does a *specific* >"write" to the device (puts the value in a certain place in >a certain form).
>The advantage of Java is that it lets you "effectively" >install a driver *without* Administrator privilege (because >that "driver" runs in Java's sandbox and doesn't tinker >with the rest of the host like a "real" driver would)
Being in a sandbox it won't have permission (without administrator privileges to give it) to write to any storage device.
D Yuniskis wrote:

[...]

>>> If you can live with the (short) distance limitations of USB, what if >>> you made your device look like a mass storage device. I.e., damn >>> near every USB host out there will recognize a USB "disk drive". >>> >>> User can mount the drive (which is often automatic) and then access >>> X:\index.html to interact with it. That *static* page (i.e., a "file" >>> on your device) can have links to: X:\status.html, X:\log.html, >>> X:\diagnostics.html, etc. You don't even need a "web server" in >>> your device -- instead, you watch to see which "files" are accessed >>> and in which order. >> >> The OS will assume exclusive access, therefore cache data. I think it >> will be difficult to establish a dynamic data exchange. > >This is not true. E.g., look at HP's (laughable) "Secure Web Console" >which implements a "secure" terminal emulator to a serial port (from >the network).
I don't know this product, but I know that data from a USB mass storage device _gets_ cached. I'm afraid that your approach doesn't work. And if it worked, it would be _very_ complicated on the microcontroller side.
>> And transferring arbitrary numbers from a web browser to a "mass >> storage" device will be also somewhat weird. > >It's just a "write" or, even a "GET".
Maybe with JavaScript (which could be blocked because the USB storage is considered unsafe), not with plain HTML.
>With the presentation capabilities of a browser, you can approach >data entry differently. > >E.g., instead of typing in a date, the user can pick a month from >a "year at a glance" calendar. That causes that month to be displayed >(e.g., february.html) and he can now pick a *day*. All you have to do >is watch to see which links get activated (which "files" get requested). > >Or, use a "slider" to set a numeric value instead of typing in >a value.
Harder for arbitrary numbers > 8 bit or strings.
>Or, a piece of Java that gets a value and does a *specific* >"write" to the device (puts the value in a certain place in >a certain form).
Do you remember when Microsoft considered chm files from network shares harmful? I don't expect Java or JavaScript being available. Oliver -- Oliver Betz, Munich despammed.com is broken, use Reply-To: