RFC: Android Protocol Stack

I need protocol stacks for Android, including ADB, MSD, BEE, etc. Says Linux? It's too big and no native support for BEE (ZigBee). Says Atmel or Microchip? I've worked with both USB stacks. They are both very similar: inefficient and deficient. I wonder who copy whom.

I've been porting and rewriting the microchip USB host stack. I came to the conclusion that it doesn't work with composite host properly. The problem is that each host driver has it's own control block and there is no easy way to have more than one.

The problem is that with Android, the (deactivated) MSD driver still override the ADB driver. I can rewrite the parser from bottom up, instead of top down, but it still won't allow more than one driver loaded.

Anyway, the USB enumuation codes could be shared and the DCBs should be shared. I am going to move the DCBs to a new file and add functions to retrieve pointers to the DCBs. I also need to move the debug port to uart 4, and free up 1 to 3. It won't work with low end chips anyway. I need 256K flash. Also, I am going to remove all PIC18 codes.

I am going to post the mods. We might be able to get paid helps, if we can get enough supports. We need to work on FAT, ADB, BEE, etc.

-------------------------------------------------------

*.c: DCB *; // Device Control Block

adb[0].shit = other shit; // index is always 0

-------------------------------------------------------

dcb.c: DCB {union cdc, cdd, nsd, adb} dcb[6]; cdc.c: cdc = &dcb[0]; // CDC control cdd.c: cdd = &dcb[1]; // CDC data nul.c: nul = &dcb[2]; // Not used nul.c: nul = &dcb[3]; // Not used msd.c: msd = &dcb[4]; // Mass Storage adb.c: adb = &dcb[5]; // Android Debug Bridge

DCB *adb = dcb_init("ADB"); // return &adb[5]; void dcb_task("ADB"); // run ADB task

adb->shit = other shit;

Reply to
linnix
Loading thread data ...

Have you seen:

The "latest" USB library for AVR is LUFA - Lightweight USB Framework for AVRs

formatting link
formatting link

Free, reasonably mature, used in Arduino Uno

-

AVR-USB is a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers.

formatting link

-

LPC214x USB stack:

formatting link
Citat: "...This is a USB core stack for the built-in USB device of LPC214x microcontrollers. It handles the hardware interface and USB enumeration/configuration. Also included are examples like USB joystick HID, USB virtual COM port and USB mass storage on SD-card..."

This page is the homepage for an open-source USB stack for the built- in USB controller in LPC214x microcontrollers:

formatting link
Citat: "...LPC2148 microcontroller (I'm using an Embedded Artists LPC2148 quickstart board + prototype board) running on a 12 MHz crystal..."

formatting link

-

Does ARM provide drivers for the USB controller on my development board?

formatting link
Citat: "...Philips have now released their Linux drivers for ISP1761 under a GPL licence. These are available from...":
formatting link

-

Have you tried running the USBCV (compliance verifier) tool with your device? It's at:

formatting link
formatting link

Reply to
Glenn

m/LUFA.php

Yes, but it doesn't work with PIC and have the same problem with composite host.

x-de.html

Too slow, low speed only.

users/philips_usb/

Linux is too big. The RF chip MRF24 is PIC specific.

elopers/docs/

Will have to, alone with ZigBee alliance.

Reply to
linnix

Is there a USB Forth? Or a USB Fifth?

Reply to
linnix

Where there are four Forth developers, there's usually a fifth. ;) (*)

Cheers

Phil Hobbs

(*) For non-US readers: until geologically recent times, liquor was sold in 1/5-gallon bottles.

--
Dr Philip C D Hobbs
Principal
ElectroOptical Innovations
55 Orchard Rd
Briarcliff Manor NY 10510
845-480-2058

email: hobbs (atsign) electrooptical (period) net
http://electrooptical.net
Reply to
Phil Hobbs

But we need short programmers. My daughter said she will be taking "D".

Reply to
linnix

I still don't see a USB host stack for PIC24 in Forth.

Reply to
linnix

There is some USB host code in Forth, but I don't believe that it has been ported to PIC24. You do not say what devices you wish to support.

Stephen

--
Stephen Pelc, stephenXXX@mpeforth.com
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
web: http://www.mpeforth.com - free VFX Forth downloads
Reply to
Stephen Pelc

PIC24FJ256DA206 or GB206. I also need ADB (Android Debug Bridge), MSD (Mass Storage Device) and BEE (ZigBee).

Reply to
linnix

I'm not familiar with your platform but Linux can be made pretty small ... I've seen (extreme) kernels stripped down to around 80-90KB. A lot of it can go depending on what options you need.

George

Reply to
George Neuner

Although the pic24 compiler is gcc based, it has not migrated back to the main source base. Setting up gcc and Linux would be a great deal of work. We don't really need full multi-tasking, since we will just be dealing with USB most of the time. Most other features are in the Microchip and ZigBee libraries, we just need to merge them and fix-up the USB composite drivers.

Reply to
linnix

We got ADB running on the PIC, talking to the Droid. We need to implement file "push" and "pull" on the PIC, but can't find the spec. In the Android source tree ADB directory, the "protocol.txt" file mensions "sync.txt". But it's not there. Does anyone have a copy, or know where to get a copy of "sync.txt"? Thanks.

---------------------------------------------------------------------------=

-----------

PIC24FJ256 at 32MHz

6 Interfaces, Type 2, Max Power =3D 250mA #0(1) Communication Device Controller Command #1(2) Communication Device Controller Data #2(2) Class 255, SubClass 255 #3(3) Class 255, SubClass 255 #4(2) Transparent SCSI Mass Storage Device #5(2) Point multipleXer Point 43 4E 58 4E 00 00 00 01 00 10 00 00 09 00 00 00 E4 02 00 00 BC B1 A7 B1 64 65 76 69 63 65 3A 3A CONNECT(01000000, 00001000); (9) "device::" 4F 4B 41 59 28 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 B0 B4 BE A6 73 68 65 6C 6C 3A 6C 73 OKAY(00000028, 00000001); (0) ""

20110501113127.jpg

20110501113141.jpg 20110501113148.jpg 20110501113154.jpg 20110501113212.jpg
Reply to
linnix

Sigh ... in Canada we now have sanitized 750 ml bottles. I'd like to see the Fifth (abbreviated Ffth of course) appended to S.I.

-- Joe

Reply to
J.A. Legris

Silly rabbit. Tricks are for kids.

Reply to
UpYerNose

Now, they sell it in 750 mL bottles, for the price of a fifth. The liquor producers _LOVE_ the metric system - less product, same money!

I buy vodka at the grocery store for about ten bucks for 1.75L (_almost_ a half-gallon), which is almost _twice_ what people pay for water at the convenience store. ($1.25/pint) =:-O

Cheers! Rich

Reply to
Rich Grise

Google tells me that 1/5 gallon is 757ml ... doesn't seem worth getting excited over? About a 1% decrease?

Reply to
Joel Koltner

Hmm. I seem to stand corrected! =:-O

But at $6.75/750 ml vs $9.78/1.75L, I'll still take the almost half-gallon. Don't need to make as many trips that way, either. ;-D

Cheers! Rich

Reply to
Rich Grise

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.