Go Down

Topic: USB Host controller (Read 14874 times) previous topic - next topic

alexus

nice development here :)

i have 2 questions:

1. Bluetooth over HCI, what is hci? Serial interface? Also can i get values of a signal strength. So when i close enough to my device i can activate it.

2. for plain USB for, do you think i can use it to record webcam to SD card? No video output just record video some how :)

tnx!

felis

HCI is host controller interface, standard way to talk to the BT controller. The comm. over HCI is "proprietary", it is made for two Arduinos to talk over BT. This has been done to save memory. The standard RFCOMM interface is in the works.

You can get signal strength with HCI command.

Webcam interface depends on how much video you need and how often. Video USB spec defines many standards, if you don't need output, you can turn on some good compression and record decent quality video over narrow channel. Take a look at USB video spec at usb.org to get better idea.
/felis

alexus

tnx for quick reply!

ok so i guess for BT i cant pay aroubnd w. it yet as i wanna talk to my comp over BT :)

As to video, i just need regulat webcam saving video preferably in MJPEG fromat to SD car and adding text watermark with date on it.
usb.org sems to require pasword to vew their topics, and i'm not a member of concorceum :( So i dont even know where to start

felis

http://www.usb.org/developers/docs/
/felis

alexus

nothing in there about Video devices :(

felis

It's under "Device Class Specifications".
/felis

alexus

nice found vidoe device protocol there. thank you!
now i guess i will need to figure out how to do program to read webcam. And will need your USB Shild :)

Any recomndation on program?

Aslo, can 1 aurdrino chip handle 4 webcams saving to either 1 SD card or maybe 4 separate SD cards?


sign-advancetech

Who are some code CH376 usb host

thank.

PaulS

Quote
Aslo, can 1 aurdrino chip handle 4 webcams saving to either 1 SD card or maybe 4 separate SD cards?

One Arduino can not handle 1 web cam.

alexus

well i got PIC32 OTG demo bord, I hope that one can hande itm but now i need to figure out the way to save webcam images to USB drive :(

felis

Quote
One Arduino can not handle 1 web cam.


Define "handle". USB Video class supports variety of formats and frame sizes (and still pictures of these many sizes, too). It is possible, for example, to stream a video from a webcam to nokia 6610 display (or from 4 or 127 webcams, for this matter) - I've done it on old Atmega-168 based Arduino with not much difficulty; for any size data, you need 2 bytes of memory to pass a pointer to function which reads a byte from MAX3421E buffer.
/felis

alexus

felis, what if we are trying to save webcam images to memory? Is that still doable?

felis

If you have enough memory, why not? However, this is not the best way to "handle" big data on Arduino. Just so you know, a 8-bit color picture of 64x64 pixels is twice as big as whole Atmega 328 RAM. On the other hand, a PTP digital camera code, described here -> http://www.circuitsathome.com/mcu/arduino-based-controller-for-canon-eos-cameras , parses 64K packets of camera control data and prints it to the terminal in human-readable form on the fly with no visible delay, never storing more than several bytes in any given moment.
/felis

alexus

so i guess we can pass the bites in fifo through small ram, so the bigest problem would be actually read that data of the webcam :)

felis

You can even use USB host controller FIFO - no MCU RAM is necessary to store data. The USB transfer functions would have to be modified to include a callback to parser (since single USB transfer could span many packets); I'm incorporating this functionality into the next revision of USB Host library.
/felis

Go Up