Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #541195
| From | DecadentLinuxUserNumeroUno@decadence.org |
|---|---|
| Newsgroups | sci.electronics.design |
| Subject | Re: Video data compression for serial link |
| Date | 2019-04-30 00:59 +0000 |
| Organization | Aioe.org NNTP Server |
| Message-ID | <qa86mf$8df$1@gioia.aioe.org> (permalink) |
| References | <XVmxE.157951$bA.69332@fx26.iad> <B8GxE.398358$oy5.350898@fx06.iad> <jurjpf-fm5.ln1@coop.radagast.org> <qa7hca$1brk$1@gioia.aioe.org> <gk1kpf-pk6.ln1@coop.radagast.org> |
dplatt@coop.radagast.org (Dave Platt) wrote in
news:gk1kpf-pk6.ln1@coop.radagast.org:
> In article <qa7hca$1brk$1@gioia.aioe.org>,
> <DecadentLinuxUserNumeroUno@decadence.org> wrote:
>>dplatt@coop.radagast.org (Dave Platt) wrote in
>>news:jurjpf-fm5.ln1@coop.radagast.org:
>>
>>> In article <B8GxE.398358$oy5.350898@fx06.iad>,
>>> bitrex <user@example.net> wrote:
>>>
>>>>The KISS communication implementation works perfectly fine for a
>>>>while and then both the uP and PC app lock and it fails utterly.
>>>>transmission stops. annoying problem to diagnose. Logging the
>>>>data on the link doesn't show anything unusual just prior to it
>>>>happening.
>>>
>>> What USB-to-serial adapter/dongle are you using?
>>>
>>> I had somewhat-similar problems when trying to run a Bitscope
>>> from a PC... it would work for a while and then the
>>> communication would freeze up.
>>>
>>> The problem appeared to be the USB adapter I was using. It was
>>> one of the inexpensive "translucent blue" adapters, that claim
>>> to have a Prologix PL-2303 serial-to-USB bridge inside... but
>>> very probably had a clone/counterfeit chip instead. I've heard
>>> other reports of these counterfeit chips locking up under heavy
>>> load... timing or chip-firmware problem, I suspect.
>>>
>>> I swapped the adapter for a known-good FTDI serial adapter
>>> (Mouser and Digi-Key are both authorized FTDI distributors, so
>>> you can be pretty confident that they aren't selling
>>> counterfeits) and the problem went away.
>>>
>>> As to compression: A simple logarithmic-encoding scheme (akin
>>> to A-law or u-law), followed by a run-length-encoding, might do
>>> what you want, without introducing too many artifacts (although
>>> there will be some). Another approach would be a 16-to-8-bit
>>> quantization with Floyd-Steinberg error diffusion... this will
>>> give you a fixed 2:1 compression with (I think) fairly decent
>>> visual quality, and it would be quite fast to implement.
>>>
>>>
>>
>>USB is a serial interface. Doesn't putty interface directly to a
>>usb port without a serial adapter?
>
> No, in general it does not.
>
> USB is a serial bus. It's not either electrically- or
> protocol-compatible with a "serial port" in the sense that most
> people have used the term historically (an asynchonous serial
> port, using either RS-232 voltage levels or a TTL-voltage
> sort-of-approximation of same). Instead, a device plugged into a
> USB bus adopts a device address, and then presents the host with a
> flexible set of "USB endpoints" which can receive, and send,
> various sorts of packetized data.
>
> "putty" and similar terminal emulators assume the existence of a
> kernel device interface which "looks like" a PC serial port
> interface at the software level... that is, it supports
> arbitrary-length reads and writes, it has a concept of "baud
> rate", it implements (or pretends to implement) normal RS-232
> handshaking, and so forth. A "real" serial port will present such
> an interface as (e.g.) /dev/ttyS0. The Linux console emulates
> such a device as (e.g.) /dev/tty0, /dev/tty1, and so forth.
>
> If you try to tell putty to (e.g.) "open up and talk to whatever
> is plugged into USB port 2 on the front of my machine" it will
> have no idea what you're talking about. It can't talk to USB
> ports per se, nor to arbitrary USB devices. It can only talk to
> thinks that "look like" RS-232 serial ports at the programming
> level.
>
> USB serial adapters have one or more data endpoints, that can be
> recognized by their device drivers. The device driver then
> presents a programming interface such as (e.g.) /dev/ttyUSB0. The
> driver translates between the kernel's normal "serial port"
> programming API, and the necessary packet-oriented communication
> with the USB serial adapter (and this packetized communication is
> usually manufacturer- specific and often device-specific).
>
> These days, when you hook a PC to a microcontrollers via a
> "serial" connection, it's common to use such a USB serial adapter
> (and the necessary driver on the PC side). On the
> microcontrollers side, the communication is often "TTL serial",
> using TTL or CMOS voltage levels, and inverted in polarity from
> what RS-232 requires. Most microprocessors which have "serial
> port" pins, expect this sort of signaling. Some have the
> necessary USB-to-serial chip on the micro board (it's often called
> a "USB bridge" in this case), and these micros can be cabled
> directly to a USB port on a computer. The USB-to-serial adapter
> is still present (you just don't see it as a separate piece of
> hardware) and you still need a serial-port- emulation driver on
> the PC.
>
> There are a few microcontrollers which provide their own "native
> USB" communication interface and endpoint... usually using a newer
> standard called ACM ("asynchronous communication module" I
> believe... could be wrong). Linux will show these as (e.g.)
> /dev/ttyACM0, /dev/ttyACM1, and so forth. You can think of these
> as "built-in USB-to-serial-like protocol, which provides buffered
> bidirectional communication at USB speeds, doesn't have the
> concept of 'baud rate', and doesn't pretend to implement RS-232
> hardware handshaking or flow control pins." You still need a
> driver on the PC side for such devices, but Linux (for one)
> provides a standard driver which should work with any such device.
>
> putty and similar programs will work with ACMs just as they work
> with RS-232 serial ports, Linux consoles, and vendor-proprietary
> USB-to-serial adapters.
>
> There are also "USB gadgets", which is a whole different level of
> complexity. The BeagleBone Black board takes on the role of a
> network-interface-like gadget when you plug it into a PC - the
> kernel sees what appears to be an Ethernet-like interface and can
> run normal networking protocols over the cable.
>
Very nice and succinct. Thanks for that.
I have a small computer that has a USB tty interface for attaching
a keyboard to I think. So I think the USB spec has some kind of
proviso for adopting one of the ports in some sort of psuedo
addressable port. But I definitely do not know.
I think it is the same thing the USB to serial dongle guys use.
Back to sci.electronics.design | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Video data compression for serial link bitrex <user@example.net> - 2019-04-28 15:11 -0400
Re: Video data compression for serial link whit3rd <whit3rd@gmail.com> - 2019-04-28 13:12 -0700
Re: Video data compression for serial link Hul Tytus <ht@panix.com> - 2019-04-28 20:25 +0000
Re: Video data compression for serial link bitrex <user@example.net> - 2019-04-28 16:31 -0400
Re: Video data compression for serial link Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-04-29 14:16 +0300
Re: Video data compression for serial link gnuarm.deletethisbit@gmail.com - 2019-04-29 04:10 -0700
Re: Video data compression for serial link bitrex <user@example.net> - 2019-04-29 13:04 -0400
Re: Video data compression for serial link Joe Chisolm <jchisolm6@earthlink.net> - 2019-04-29 13:20 -0500
Re: Video data compression for serial link dplatt@coop.radagast.org (Dave Platt) - 2019-04-29 11:21 -0700
Re: Video data compression for serial link DecadentLinuxUserNumeroUno@decadence.org - 2019-04-29 18:56 +0000
Re: Video data compression for serial link DecadentLinuxUserNumeroUno@decadence.org - 2019-04-29 19:13 +0000
Re: Video data compression for serial link Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-04-29 22:41 +0300
Re: Video data compression for serial link DecadentLinuxUserNumeroUno@decadence.org - 2019-04-30 00:53 +0000
Re: Video data compression for serial link Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2019-04-30 10:24 +0300
Re: Video data compression for serial link DecadentLinuxUserNumeroUno@decadence.org - 2019-04-30 09:59 +0000
Re: Video data compression for serial link Rick C <gnuarm.deletethisbit@gmail.com> - 2019-05-08 17:59 -0700
Re: Video data compression for serial link dplatt@coop.radagast.org (Dave Platt) - 2019-05-09 10:42 -0700
Re: Video data compression for serial link upsidedown@downunder.com - 2019-05-09 06:56 +0300
Re: Video data compression for serial link dplatt@coop.radagast.org (Dave Platt) - 2019-04-29 12:58 -0700
Re: Video data compression for serial link bitrex <user@example.net> - 2019-04-29 16:33 -0400
Re: Video data compression for serial link dplatt@coop.radagast.org (Dave Platt) - 2019-04-30 18:02 -0700
Re: Video data compression for serial link bitrex <user@example.net> - 2019-04-30 21:13 -0400
Re: Video data compression for serial link Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-04-30 18:32 -0700
Re: Video data compression for serial link DecadentLinuxUserNumeroUno@decadence.org - 2019-04-30 00:59 +0000
Re: Video data compression for serial link Lasse Langwadt Christensen <langwadt@fonz.dk> - 2019-04-29 18:27 -0700
Re: Video data compression for serial link Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-04-30 10:22 +0100
Re: Video data compression for serial link bitrex <user@example.net> - 2019-04-30 12:20 -0400
Re: Video data compression for serial link upsidedown@downunder.com - 2019-04-30 20:19 +0300
Re: Video data compression for serial link DecadentLinuxUserNumeroUno@decadence.org - 2019-04-30 22:04 +0000
Re: Video data compression for serial link whit3rd <whit3rd@gmail.com> - 2019-04-30 16:30 -0700
Re: Video data compression for serial link Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-05-01 08:49 +0100
Re: Video data compression for serial link bitrex <user@example.net> - 2019-05-01 10:28 -0400
Re: Video data compression for serial link upsidedown@downunder.com - 2019-04-30 13:50 +0300
Re: Video data compression for serial link david eather <eatDELETEher@tpg.com.au> - 2019-05-01 13:45 +1000
Re: Video data compression for serial link bitrex <user@example.net> - 2019-05-08 16:57 -0400
Re: Video data compression for serial link Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-05-08 22:22 +0100
Re: Video data compression for serial link bitrex <user@example.net> - 2019-05-08 22:09 -0400
Re: Video data compression for serial link bitrex <user@example.net> - 2019-05-08 22:11 -0400
Re: Video data compression for serial link Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-05-09 08:44 +0100
Re: Video data compression for serial link bitrex <user@example.net> - 2019-05-09 10:41 -0400
Re: Video data compression for serial link bitrex <user@example.net> - 2019-05-09 10:52 -0400
Re: Video data compression for serial link david eather <eatDELETEher@tpg.com.au> - 2019-05-10 14:30 +1000
Re: Video data compression for serial link jrwalliker@gmail.com - 2019-05-10 04:30 -0700
Re: Video data compression for serial link Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-05-14 11:17 +0100
Re: Video data compression for serial link upsidedown@downunder.com - 2019-05-14 14:51 +0300
Re: Video data compression for serial link Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2019-05-14 13:45 +0100
csiph-web