#avr Logs

May 31 2017

#avr Calendar

12:32 AM day___ is now known as daey
01:23 AM day__ is now known as daey
03:23 AM Jartza: hallo
03:45 AM skz81: moshi moshi
04:22 AM evil_dan2wik is now known as dan2wik
04:31 AM chutulu_ is now known as chutulu
06:40 AM Tachyon`` is now known as Tachyon`
07:53 AM day_ is now known as daey
08:33 AM cehteh_ is now known as cehteh
08:40 AM Emil: desu desu
11:38 AM maciejjo_ is now known as maciejjo
12:59 PM Chillum is now known as HighInBC
01:28 PM Tachyon` is now known as Tachaway
01:37 PM toblorone: is anyone familiar with USB Audio here? Is it possible for one device to have several isochronous audio endpoints?
01:38 PM bss36504: Not familiar with USB audio in particular, but my understanding of USB indicates that you should be able to have as many endpoints as you want of any kind (up to 128? 256? something like that)
01:40 PM toblorone: so in theory, it might work? My situation is that I need high speed, low latency, "real time" data transfer over usb and I'm trying to avoid writing my own driver on the host side. I was thinking I could use existing usb audio drivers, but I found that the sampling rate (~96khz) is too low
01:40 PM toblorone: thus, I thought maybe I could set up my device to act as several audio in devices
01:41 PM bss36504: Why not just the bulk transfer or whatever it is? a CDC device is not hard to implement
01:41 PM Casper: you may have to use a single controller if you need them to be in sync
01:41 PM JanC_ is now known as JanC
01:41 PM toblorone: well, my (limited) understanding of usb suggests that bulk and CDC doesn't give reliable latency guarantees
01:41 PM Casper: if you can tolerate a few ms offset then it shouln't be an issue
01:41 PM bss36504: Also, writing a CDC driver isnt really that hard. Like, if you're already cut out to do the embedded portion of it you should be able to make a driver
01:42 PM bss36504: How about one of the other Iso. classes like HID?
01:42 PM bss36504: I guess that's six of one half dozen of the other though
01:44 PM bss36504: What exactly are your latency requirements? And have you verified that the latency of a bulk mode like CDC is not going to work for you?
01:44 PM bss36504: Seems like the multiplexed audio thing you want to do is going to be endlessly complicated.
01:44 PM bss36504: you're basically going to have a bunch of usb devices enumerated by the host and you'll somehow need to make your PC software negotiate that and utilize "n" channels
01:46 PM toblorone: ok, i'll look at going the CDC route. the sdk I'm using provides a CDC serial emulator, but I couldn't get the speed I needed on the host... I might have to write some of my own stuff
01:46 PM bss36504: You can make the the virtual com port work at like 1.5Mb/s or more
01:47 PM toblorone: well in my case I'm connecting to an android device and the best I could get was ~250kbs
01:47 PM bss36504: at least from a PC side of things. I'm not even certain you're forced to use the "traditional" Serial baud rates when you enumerate as a virtual com device. But a CDC device is not necessarily a Virtual com device
01:47 PM bss36504: s/PC/host
01:48 PM bss36504: You might also be a little stuck with the android being the host. That is a rabbit hole I know nothing about.
01:48 PM toblorone: Ok, perhaps the answer then is in the userspace serial driver im using... There shouldn't be any reason on the device side for the transfer rate to be that slow, right?
01:49 PM bss36504: Hard to say, but probably not.
01:49 PM toblorone: ok, i'll poke around there then
01:49 PM bss36504: It's possible that there is a low bandwidth hub controlling both the external USB port as well as some internal stuff too and that's cutting into your bandwidth
01:50 PM toblorone: hmmm
01:50 PM bss36504: CDC is a Bulk mode, so it uses remaining bandwidth
01:50 PM bss36504: You could switch to an Interrupt type class like HID or roll your own full custom one and then you would at least have bounded latency
01:51 PM toblorone: that would require me to write my own host side driver though, correct? Seems like I'm going to have to at this point...
01:51 PM bss36504: Why do you need such low latency? Almost any practical real time system will have some latency
01:51 PM bss36504: For example, an oscilloscope samples at say 1Ghz, but it's not as if the data is rendered on the LCD that fast.
01:52 PM bss36504: So I'm just trying to understand a situation where you would actually hit the practical "speed limit" of USB and an android phone
01:52 PM bss36504: All this to say, perhaps you're overengineering something because the problem you see isn't really a real problem
01:52 PM toblorone: well I can tolerate few milliseconds, I'm new to USB and through my research it seemed like isochronous was the natural choice for my application
01:53 PM toblorone: i didn't realize it would be significantly harder to implement
01:53 PM bss36504: Everything about USB is hard
01:53 PM bss36504: Literally all. of. it lol
01:53 PM toblorone: ha, yeah, I'm discovering that
01:53 PM bss36504: The device spec alone is like 3000 pages long
01:53 PM bss36504: It's fucking dumb
01:54 PM bss36504: So if you can stay in a pre-defined lane, you will have a much better time
01:54 PM bss36504: But to bring it back to my original question, why do you need such low latency? Youre implying you need less latency than say a keyboard or mouse, which seems silly.
01:55 PM bss36504: A datalogging system should have buffering and utilize bulk transport for long term storage. A human interface could/would fit into existing HID drivers. General purpose communications should fit within CDC
01:55 PM toblorone: ok, so as a summary, you'd recommend going either CDC or HID which should be able achieve the desired speed? And in my application the communication is going to be two way. My understanding was that an isochronous endpoint will take priority over other traffic
01:56 PM toblorone: but like I said, I'm very new to usb : )
01:57 PM bss36504: Well I can't solidly recommend anything since you won't really explain in any concrete terms what you are trying to do. Which is fine. I get that maybe you're trying to keep it hush hush. All I can say is that if it were me, I would very carefully evaluate my needs and see if I can fit into an existing protocol, especially when we're talking about
01:57 PM bss36504: USB
01:58 PM bss36504: I'd also try to develop with a PC before trying to make it work on an android, since you'll probably have more tools available for driver development, should you choose that route
02:01 PM toblorone: Well to be a bit more concrete: i'm transferring ~6-10mbs and I can tolerate ~5ms latency. I'm also looking to communicate from the host to the device, with ~0.5kbs
02:02 PM toblorone: maybe even 10ms latency
02:02 PM bss36504: Here's a nice article I found: http://www.electronicdesign.com/boards/how-create-and-program-usb-devices
02:03 PM toblorone: ok, i'll check it out
07:30 PM evil_dan2wik is now known as dan2wik
07:33 PM day__ is now known as daey
07:39 PM day_ is now known as daey
08:25 PM anonnumberanon is now known as danonnumberanon
08:38 PM danonnumberanon is now known as anonnumberanon
08:53 PM enhering: Hi!
08:53 PM enhering: Good night!
08:53 PM enhering: If you have time: https://hackaday.io/project/11724-yauvc-yet-another-unmanned-vehicle-controller/log/60610-many-good-news
10:04 PM enhering: Anybody home?
10:05 PM enhering: It is so quiet here...
10:06 PM enhering: hello-o? llo-o... llo-o... l oo.ooo...
10:11 PM enhering: amazing...
10:11 PM Tom_L: silence isn't amazing... it's golden
10:11 PM enhering: agree
10:11 PM enhering: my neighbours don't
10:12 PM Tom_L: tall fences make good neighbors
10:12 PM enhering: heavy cannons too
10:13 PM enhering: lately I 've been thinking of 200W CO2 lasers.
10:13 PM Tom_L: better crawl before you try to run
10:13 PM enhering: or EMP devices.
11:36 PM polprog: i had a chance to get a gas laser (i think argon) for 50$
11:36 PM polprog: didn't buy it
11:37 PM polprog: shame, a yellowish-ornge (IIRC) would be nice
11:40 PM Casper: green. don't get a green!
11:40 PM Casper: and specially don't point it to the aircraft
11:47 PM polprog: amber would be nice
11:48 PM polprog: or green-cyan
11:48 PM polprog: one that has several beams
11:49 PM polprog: not some huge amount of power, im not gonna cut things with it