Delphi-PRAXiS
Seite 2 von 4     12 34      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Cross-Platform-Entwicklung (https://www.delphipraxis.net/91-cross-platform-entwicklung/)
-   -   Komponente Android Daten USB senden/empfangen (https://www.delphipraxis.net/187843-komponente-android-daten-usb-senden-empfangen.html)

wschrabi 21. Mär 2016 14:38

AW: Komponente Android Daten USB senden/empfangen
 
The problem was that I had the FIle in UTF8 format.
I had to convert it to ANSI then I could deploy it.
Thanks for your help
Walter

wschrabi 22. Mär 2016 08:24

AW: Komponente Android Daten USB senden/empfangen
 
HI
also ich hab die USb componenten von https://github.com/LongDirtyAnimAlf/...ndroid-USB-HID installiert. Klar kann man eine SERIAL vom HID USB Device auslesen, doch fehlt die GET_REPORT Methode. bei den JVCL Libraries https://github.com/project-jedi/jvclgibt es auch eine HIDCOntroller componete, aber hier gibt es die GetINputReport Methode.

ich hätte noch eine FRAGE:
Bieten Sie auch eine Delphi Componente die auf ANDROID API wi unter https://github.com/LongDirtyAnimAlf/...ndroid-USB-HID auf baut an?
Leider finde ich in dieser github lib nicht die Methode GetINputReport.
Die WIndows API Componente https://github.com/project-jedi/jvcl , die unter WIndows HID Devices zu steueren erlaubt, hat diese Methode GetINputReport drin.
Zwar hat Android API eine ReadWrite Methode, mit der man zb die Device Serial Number auslesen kann.
Meine Zweite Frage: Das Commando zum Auslesen der Serial ist lt. Program
> type
> TCommands = (
> CMD_get_serial=100,
> CMD_set_serial=101,
> );

wissen Sie vielleicht, ob Get_report auch so eine Bitfolge als Commando hat?
Vielleicht kann man einfach das Command anpassen und bekommt dann den Report?
Danke für Ihre INfo.

Kann wer helfen?
Danke

English:
In the USB componentes at https://github.com/LongDirtyAnimAlf/...ndroid-USB-HID there is the GET_REPORT Method missing. In the JVCL Library https://github.com/project-jedi/jvcl there is also a HIDController componente included. But there there is the GetINputReport Methode included. Can anyone here give my an advice?

DonAlfredo 22. Mär 2016 11:27

AW: Komponente Android Daten USB senden/empfangen
 
Nop !
No GET_REPORT.

I wrote this library to communicate with some Microchip USB mcu's.
HID interrupt only. No reports. Yet.

This:
TCommands = (
CMD_get_serial=100,
CMD_set_serial=101,
);
are just internal commands for my mcu's.
They slipped into the demo not seen by me.

At the moment I am very busy.
If time is available again, I will look into it.

But you could give it a try to do it yourself.
Because the basic code is just a copy of the original JVCL code.
So, perhaps, a copy of the original GET_REPORT code will also work in this library.

Later, I will look into it !.

wschrabi 22. Mär 2016 14:59

AW: Komponente Android Daten USB senden/empfangen
 
Zitat:

Zitat von DonAlfredo (Beitrag 1333423)
Here the author.
What Delphi version are you using ?
If I check with XE8 and XE10, all is ok !

Edit:

Sorry, I see: XE6.

Unfortunately, I do not have XE6.

But I will be interested to know what is needed to get things going under XE6 !

Dear Sir,
I just found the problem:
The token <%receivers%> will not work in XE6. WIll it work in X10 and what ´does it do? WIth out I can deplay, but I have problems with my HID USB Device.
I try to get the Vendor name from the descriptor. But alway a blank line. But I can get the PID and VID.
Can you help me please?
Thanks

DonAlfredo 22. Mär 2016 16:18

AW: Komponente Android Daten USB senden/empfangen
 
Just remove it .... its a placeholder for some standard receivers that are used by Delphi:
Code:
<receiver android:name="com.embarcadero.firemonkey.notifications.FMXNotificationAlarm" />
<receiver android:name="com.embarcadero.rtl.notifications.NotificationAlarm" />
I guess that these are of no importance for USB processing.

wschrabi 22. Mär 2016 17:09

AW: Komponente Android Daten USB senden/empfangen
 
Thanks a lot, for this great advice.
Best regards
Walter

wschrabi 22. Mär 2016 17:14

AW: Komponente Android Daten USB senden/empfangen
 
Dear Don,
thank you very very much that I could contact you.
I always get READ and Write Error with your tool.
My HID Device works like a mouse. It so no interrupt as mouse do make no interupt transfer.
You use READWRITE with your could. Can I use this also or is it bulk transfer.

I really need the GET REPORT. I also can not read the VENDOR / Product Name of the Device.
It works fine with the WIN JCVL LIbrary.

I would really be thankful if you could help me a little.
Thanks a lot!

Walter

wschrabi 22. Mär 2016 17:18

AW: Komponente Android Daten USB senden/empfangen
 
Zitat:

Zitat von DonAlfredo (Beitrag 1333526)
Nop !

Because the basic code is just a copy of the original JVCL code.
So, perhaps, a copy of the original GET_REPORT code will also work in this library.

Later, I will look into it !.

Don, I have analysed the WIN JVCL code and they use the Get_Report methode via the DLL from windwos.
you will find in HID.pas of the JVCL LIb:

Zitat:

{$IFDEF WINXP}

// (rom) new XP functions

function HidD_GetInputReport(HidDeviceObject: THandle;
Buffer: Pointer; BufferLength: ULONG): LongBool; stdcall;

function HidD_SetOutputReport(HidDeviceObject: THandle;
Buffer: Pointer; BufferLength: ULONG): LongBool; stdcall;

{$ENDIF WINXP}

function HidP_GetCaps(PreparsedData: PHIDPPreparsedData;
var Capabilities: THIDPCaps): NTSTATUS; stdcall;
So far as I can say, I am not sure if I can adapt the JVCL LIb with the ANDROID API as the ANDROID API have less commands.
Thanks a lot for your reply.

Walter

DonAlfredo 23. Mär 2016 06:22

AW: Komponente Android Daten USB senden/empfangen
 
Yep. It will need (a lot) more work to implement reports.
And if that is the case, you will have to have a little patience.
Sorry for that. I will report back.

DonAlfredo 23. Mär 2016 08:16

AW: Komponente Android Daten USB senden/empfangen
 
I just had a quick look on how to send/get a report.
You need to do a controltransfer.
I you look at: function TJvHidDevice.GetDeviceString(Idx: Byte): string;
You will find an example on how to do a controltransfer.
It could give you a start.


Alle Zeitangaben in WEZ +1. Es ist jetzt 17:57 Uhr.
Seite 2 von 4     12 34      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz