luigifab / python-radexreader

Reader for the RADEX RD1212 and the RADEX ONE Geiger counters.
GNU General Public License v2.0
11 stars 3 forks source link

[pydroid3] usb.core.NoBackendError: No backend available #6

Closed Tobbinloggin closed 1 year ago

Tobbinloggin commented 3 years ago

I'm attempting to run this code on Android to see if it's possible, I downloaded Pydroid3(it's an android app), and attempted to run the code, I got a no backend available error, I copied libusb-1.0.dll into the app's folder (which was one of the folders that appeared when I checked $PATH)

ls

It worked, but the no backend error still occurred.

nobackend

Do you have any idea how to implement this code on an Android phone?

Tobbinloggin commented 3 years ago

I tried disabling Libusb and using serial mode instead, that didn't work, serial isn't compatible with Android, the geiger counter didn't show up when I plugged it in.

Screenshot_20210411-204758_Pydroid 3

With USBSerial4a I can see the device, I don't know how to implement this Android compatible code though, not enough experience with Python.

https://github.com/jacklinquan/usbserial4a

Not that it stopped me from trying (and failing).

Pytool

luigifab commented 3 years ago

You can't copy libusb-1.0.dll into Android, you need libusb for Android, or anything else. For the Radex RD1212, the Silicon labs is an UART bridge, it provide a serial port.

If with USBSerial4a you can see the device, you must modify my python program to import USBSerial4a. See USBSerial4a examples (I tried to add some code).

Tobbinloggin commented 3 years ago

I still get the no backend error.

If you can get this to work on a phone I'd use it everyday, that's what I'm planning with this device, I want a personal dosimeter, I want to record daily logs and save them long term, that way I can notice high radiation areas(if there are any) and avoid those areas.

Tobbinloggin commented 3 years ago

You'll be my hero if you figure out a way to constantly log data onto my phone with the Radex One.

luigifab commented 3 years ago

You can retry the gist (I have enabled some code for android). But I don't know if it's a good start or not.

Tobbinloggin commented 3 years ago

No module named 'usb'

luigifab commented 3 years ago

Try to comment lines 24/25/26.