Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About qdl_write #28

Open
stellalio opened this issue Jan 12, 2022 · 0 comments
Open

About qdl_write #28

stellalio opened this issue Jan 12, 2022 · 0 comments

Comments

@stellalio
Copy link

stellalio commented Jan 12, 2022

Hi,andersson

For 9655 device,after masking the fields that are not in the xml,it could download successfully for 9655 device.
However, for 9607 device,after masking the fields that are not in the xml,I try to download for 05c6:9008,and found that the process of prasing,reading and erasing is smoothly,but when to the process of write,it failed.The output log is as the attachment.

I tried to add follow part:
if(len == 0) {
bulk.ep = qdl->out_ep;
bulk.len = 0;
bulk.data = data;
bulk.timeout = 1000;

                    n = ioctl(qdl->fd, USBDEVFS_BULK, &bulk);
                    if(n != 0) {
                            fprintf(stderr,"ERROR: n = %d, errno = %d (%s)\n",
                                    n, errno, strerror(errno));
                            return -1;
                    }

                    return 0;
            }

And masking this part:

if (len_orig % qdl->out_maxpktsize == 0) {
bulk.ep = qdl->out_ep;
bulk.len = 0;
bulk.data = NULL;
bulk.timeout = 1000;

                    n = ioctl(qdl->fd, USBDEVFS_BULK, &bulk);
                    if (n < 0)
                            return n;
            }

After doing this ,it could download successfully for 9607 device.But it couldn't download for 9655 device,is there a way to handle these two changes so that it can be compatible with different Qualcomm devices?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant