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

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

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

sunder kandasamy

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?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/5bf68cbd-d0c0-4697-92b2-7253773b85b6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

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

Zuzia SIWA


W dniu poniedziałek, 26 listopada 2018 16:39:41 UTC+1 użytkownik sunder kandasamy napisał:

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?

--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/7db0c40c-368e-4971-8343-b19cae50cc6d%40googlegroups.com.