lz1asl / CaveSurvey

Cave surveying application for Android devices
MIT License
44 stars 11 forks source link

Use with the CEM ILDM-30? #163

Closed LavaTiger99 closed 3 years ago

LavaTiger99 commented 3 years ago

I have the CEM ILDM-30 bluetooth distance only laser meter. Any chance of being able to connect to that to use the length measurements?

It's also a good entry/budget device, so people can begin surveying with their phone's built in sensors plus a $32 USD distance meter.

lz1asl commented 3 years ago

The new unit looks good. Let's try using the same protocol (Their Android app is last updated 3 years ago ;) ) Let me know what is the Bluetooth name of the device ("iLDM-30"?) and I will send you test version. Related to #18

LavaTiger99 commented 3 years ago

Yes, "iLDM-30"

LavaTiger99 commented 3 years ago

I downloaded their android app to test the device, it was horrendous.

lz1asl commented 3 years ago

Ok, please try with the provided build. Follow the instructions at https://github.com/lz1asl/CaveSurvey/wiki/iLDM-150 and let me know of the result :) Note, that due #18 you might need to currently press twice the button to receive measurement. CaveSurvey-defaultFlavor-debug.zip

LavaTiger99 commented 3 years ago

Not sure how the pairing is supposed to work... When I use their app (ildm Meterbox), and refresh the bluetooth, it shows up, and starts reading measurements. The bluetooth device never pairs in the android bluetooth settings menu. When I open the CaveSurvey app and tap a measurement, and push measure button on device nothing happens. When I go to the bluetooth menu in CaveSurvey no device shows, so I tapped the "+" button, scanned for the device, saw it, it said connecting, then said "can't communicate with device" (see images 1, 2, 3 below)

Screenshot_20201015-185229 Screenshot_20201015-191336 Screenshot_20201015-191914

When trying to add the device directly through android's bluetooth menu, it asks for a passcode, which the manual for the iLDM-30 says is "0000" I enter that and it just goes back into search mode showing the iLDM as ready for pairing again, with no errors. It never directly pairs. (see image 4 below)

Screenshot_20201015-185306

Is this expected behaviour? Is it the same for the iLDM 150?

lz1asl commented 3 years ago

OK, I should try to rework the general usage description. For COMM based communication (older Bluetooth devices and the current iLDM implementation we have) you should first pair with Android (as you did with the 0000 pin). Then on the devices screen (your first screenshot) the combo box should be filled with a list of all paired and compatible ones. Once you select a device CaveSurvey tries to connect (the yellow notification on success) and use. Next step is to create a survey project with distance over Bluetooth (for iLDM inclination works as well but you need to switch the mode to measure inclination) and to select a distance aware cell. Measure with the device (in your case probably twice) the value should be populated in the cell. Can you try to go one more time to the devices screen and check if the combo is still empty after the pairing?

LavaTiger99 commented 3 years ago

So I can pair with android, putting in '0000', but it never really pairs or shows up in the list of known devices, it immediately shows back up in the list of devices ready to pair, and therefore never shows up in the "Devices" screen of CaveSurvey. I was wondering if that was normal behaviour. Of note, I can pair it w/ my Windows laptop, and it does seem to pair. The android app by the developer does show it in the list of devices, and I can get measurement readings through their app, but the device is still never really paired with the phone even when using their app (android bluetooth menu does not show it, and it is not available for pairing). Is that as expected?

lz1asl commented 3 years ago

I don't know why it is not pairing. To use this protocol with CaveSurvey the pairing should succeed. There is just one very generic line in the manual about the Bluetooth ... Let us try something else, can you try to use other Android phone or this app and see what will happen https://play.google.com/store/apps/details?id=de.dirkfarin.imagemeter&hl=en?

LavaTiger99 commented 3 years ago

Same thing on that other app, it needs it successfully paired first. Using a different (older) phone gave some insight, this time instead of failing silently, it said "Incorrect PIN or passkey" even though the manual clearly states '0000'. I tried 1234 as well. Strangely, when I pair it with my Windows laptop it pairs correctly with code '0000' and shows up as an active device. Strange...

lz1asl commented 3 years ago

It seems like it is either using LE protocol without pairing or there is some issue with the unit. In both cases I cannot help remotely. Where are you located, is there any chance to borrow your device?

LavaTiger99 commented 3 years ago

I'm guessing the way it acts is using BLE, because it just seems to be listening to that MAC address, not ever pairing. I live in the US, I'm guessing you're in Bulgaria? It would probably cost more to ship than the device is even worth. I'm thinking of just returning it in exchange for the iLDM 150 instead since we know that one would work.

lz1asl commented 3 years ago

OK, in this case I will postpone the support for this device. And you can pick also one of the other cheap devices that are more compact like yours. Good luck surveying!