How can I use SIGRTMIN + X Signals in Andorid NDK for Usb ISOCHRONOUS Transfers

31 views
Skip to first unread message

sunder kandasamy

unread,
Nov 26, 2018, 10:39:41 AM11/26/18
to android-ndk

I am attempting to Submit ISOCHRONOUS URB in Android NDK in C.


usbdevfs_urb&   urbRequest      = *(usbdevfs_urb*)malloc( 384 );
urbRequest.type                 = USBDEVFS_URB_TYPE_ISO;
urbRequest.endpoint             = mpEndpoint->GetEndpointAddress();//mpEndpoint->GetEndpointIndex();
urbRequest.status               = 0;
urbRequest.flags                = USBDEVFS_URB_ISO_ASAP;
urbRequest.buffer               = pData;
urbRequest.buffer_length        = 0;
urbRequest.actual_length        = 0;
urbRequest.start_frame          = 0;
urbRequest.number_of_packets    = 1;
urbRequest.error_count          = 0;
urbRequest.signr                = SIGRTMIN;
urbRequest.usercontext          = pData;

usbdevfs_iso_packet_desc* pIsoPacketDesc    = &urbRequest.iso_frame_desc[0];
pIsoPacketDesc->length          = 384;
pIsoPacketDesc->actual_length   = 0;
pIsoPacketDesc->status          = 0;


ioctl( fd, USBDEVFS_SUBMITURB, &usbRequest);

In the above code, I want to set SIGRTMIN signal for urbRequest.signr. So that i can get the SIGRTMIN signal on URB completion and i can call REAP URB after


But in Android i am not getting the SIGRTMIN signal at all. Instead my app gets killed without any exception

is there any way i can use SIGRTMIN signal for submitting URB in Android?


Note: I tried using SIGUSR1 and SIGUSR2 signals but ART is catching those signals


is there anyway to do isochronous, interrupt, bulk transfer (using non blocking asynchronous IO) in Android?

Zuzia SIWA

unread,
Jun 1, 2020, 12:35:28 PM6/1/20
to android-ndk
Reply all
Reply to author
Forward
0 new messages