AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Programmierung allgemein Cross-Platform-Entwicklung Komponente Android Daten USB senden/empfangen
Thema durchsuchen
Ansicht
Themen-Optionen

Komponente Android Daten USB senden/empfangen

Ein Thema von Bierwut-Tom · begonnen am 8. Jan 2016 · letzter Beitrag vom 24. Mär 2016
Antwort Antwort
Seite 2 von 4     12 34      
wschrabi

Registriert seit: 16. Jan 2005
437 Beiträge
 
#11

AW: Komponente Android Daten USB senden/empfangen

  Alt 21. Mär 2016, 14:38
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
  Mit Zitat antworten Zitat
wschrabi

Registriert seit: 16. Jan 2005
437 Beiträge
 
#12

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 08:24
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?

Geändert von wschrabi (22. Mär 2016 um 08:39 Uhr)
  Mit Zitat antworten Zitat
DonAlfredo

Registriert seit: 13. Mai 2010
19 Beiträge
 
#13

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 11:27
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 !.
Alfred
  Mit Zitat antworten Zitat
wschrabi

Registriert seit: 16. Jan 2005
437 Beiträge
 
#14

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 14:59
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
  Mit Zitat antworten Zitat
DonAlfredo

Registriert seit: 13. Mai 2010
19 Beiträge
 
#15

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 16:18
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.
Alfred
  Mit Zitat antworten Zitat
wschrabi

Registriert seit: 16. Jan 2005
437 Beiträge
 
#16

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 17:09
Thanks a lot, for this great advice.
Best regards
Walter
  Mit Zitat antworten Zitat
wschrabi

Registriert seit: 16. Jan 2005
437 Beiträge
 
#17

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 17:14
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
  Mit Zitat antworten Zitat
wschrabi

Registriert seit: 16. Jan 2005
437 Beiträge
 
#18

AW: Komponente Android Daten USB senden/empfangen

  Alt 22. Mär 2016, 17:18
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

Geändert von wschrabi (22. Mär 2016 um 21:02 Uhr)
  Mit Zitat antworten Zitat
DonAlfredo

Registriert seit: 13. Mai 2010
19 Beiträge
 
#19

AW: Komponente Android Daten USB senden/empfangen

  Alt 23. Mär 2016, 06:22
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.
Alfred
  Mit Zitat antworten Zitat
DonAlfredo

Registriert seit: 13. Mai 2010
19 Beiträge
 
#20

AW: Komponente Android Daten USB senden/empfangen

  Alt 23. Mär 2016, 08:16
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.
Alfred
  Mit Zitat antworten Zitat
Antwort Antwort
Seite 2 von 4     12 34      


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 23:23 Uhr.
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz