-
Notifications
You must be signed in to change notification settings - Fork 83
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
Android does not have udev; Do not link to udev on Android #210
Conversation
Android does not have udev, but cross-compiling for Android on a Linux host with udev results in a udev link
Hmm... Interesting. |
Sounds right... Definitely an esoteric bug |
I wonder how you made It seems like libusb's usage on Android is based on the file descriptor got from Android SDK Java API (NDK isn't a complete API of Android). https://github.com/libusb/libusb/blob/master/android/examples/unrooted_android.c Reference: the cross-platform Maybe a possible rust USB-CDC serial library for Android (which probably doesn't exist for now) will depend on this crate. |
@wuwbobo2021 Are you interested in building such a library with me? |
Probably yes, because sooner or later I’ll make use of such a library: a device of my own is an USB CDC implementation, and currently the host program doesn’t support Android phones. Will you publish the initial code in your repository? Or, should I write it from scratch? |
I had deleted the project since there was very little of value. Since I develop on MacOS, the method to detach the kernel driver didn't work out of the box. in order to test any implementation of userspace serial, we would have to detach the kernel driver. in any case, there is probably some command or MacOS-specific call to achieve this. I can create a repo and we can move discussion there (or I can email you) @a1ien are there any changes you would like to request for this PR? I don't want to clutter your repository with too many unmerged PRs; I won't be offended if you decide to close this if you believe it is an unnecessary change. |
To compare the maximum speed of the OS’s CDC COM driver with operating with Last year, I had written my first Android application in Java communicating with a Bluetooth SPP device (ESP32 Wifi module of an Philips air conditioner, which didn’t function originally because of some problems of the vendor’s Internet server). I did it based on some leaked source code and a few open-source project about Hisense. (I didn’t make it open-source, but haven’t made a cent from it up to now). I got a pair of |
Hi. Sorry for delay. PR itself looks good. Thank you. |
@dgramop If there weren't any progress (I think you are busy) in your Android USB CDC project, I should create a simple wrapper (probably unoptimized) for myself in the next month. |
Ok so the big problem here (and the final reason I didn't get far on the first cut) was because I haven't actually been able to run real world tests "easily". Ideally I'd unload my USB serial kernel driver on MacOS so I can iterate directly on my MacBook instead of having some huge pile of hardware to lug with me to every coffee shop. If I can't figure out a solution on my existing setup, I dig up an old laptop |
Android does not have udev; cross-compiling on a Linux host with udev results in a link to the same.
This patch refuses to enable udev if building for an android target.