Hi. I'm working with LPC 2368 controller and need to write USB HID application. I'm using Keil's example as base and I need to change it to send more bytes from device to PC at once. I've changed the example next way:
usbdesc.c
HID_UsagePage(HID_USAGE_PAGE_DEV_CONTROLS), HID_UsageMin(0), HID_UsageMax(255), HID_Usage(0), HID_LogicalMin(0), HID_LogicalMax(255), HID_ReportCount(USB_SIZE), HID_ReportSize(8), HID_Input(HID_Data | HID_Variable | HID_Absolute),
usbuser.c
BYTE InReport[USB_SIZE]; void USB_EndPoint1 (DWORD event) { switch (event) { case USB_EVT_IN: GetInReport(InReport3) USB_WriteEP(0x81, InReport3, USB_SIZE); break; } }
So the USB_SIZE is showing amout of bytes send to PC at once. And here is my problem: when USB_SIZE<=4 all works fine. When USB_SIZE>4 - PC receives nothing. Am I doing something wrong? Or somebody know how to do it correctly? P.S. USB_MAX_PACKET0 is 64
In my case, the trouble was caused by the SPAM filter of this forum engine.
I usually write posts in a text editor for spell check, because English is not my native language and I'm not so good at English. When I pasted my whole post to the "Message" box and pushed "Preview" button, I saw neither of my message nor "Post" button on the preview page. I've experienced this kind of SPAM filter troubles on other fora. Then, I started to track down the "SPAM word" using this "Preview" test with binary search - split the post into half, and test on each half.
As you see on my above post, the first half passed the preview test. Then I posted it. When I split the latter half again, neither of them didn't pass the preview test. The forum engine picked up multiple "SPAM words" in my post. I was going on the binary search, and lastly found one of the "SPAM word". When I delete just the word from my post, the forum engine accepted my post and showed the preview. I can't write the word here, because the forum engine rejects this post too. See this post on SiLabs Forum. "Comment to "USB HID Report size" on KEIL forum" www.cygnal.org/.../001445.html
If it were a word in plain text, I would replace it with a synonym. In this way, I've made my posts pass SPAM filter of other fora. Unfortunately, it was a type name on the code, which is defined in MS HID header file. Then, I made struggle to rewrite the word so that the forum engine passes it, and easily recognized it was replaced. In this struggle, I made 30-40 times of preview test. And finally the forum engine rejected all of my posts, regardless of the contents of the post. My original account was banned by the forum engine.
I know the SPAM filter is a required function to maintain fora. However, the SPAM filter of this forum is too strict unreasonably. I cannot predict which word is the SPAM word. As I'm not good at English, it takes fair time to make up a post. The rejection of the forum engine of my elaborated post disappoint me so much. Then, I'll never write to this forum any more.
Anyway, why my account is banned as a spammer? Why me, instead of Andy? (just joke).
Tsuneo