Possibly damaged two Nano 33 BLE's trying to connect to app

I think the error here is in the UUIDs:

Sketch BLE_SERVICE = 0000ffa0-0000-1000-8000-00805f9b34fb
Error service uuid = 0000ffe0-0000-1000-8000-00805f9b34fb

Note that the last byte in the first chunk is a0 in the sketch but e0 in the error message. My guess is the wrong UUID is being used for the service which is why you're getting the error.

There could be a typo there, but that is the second set of UUIDs tried after the first set failed with the same error message. This set was used because it worked in a different Project (in fact they are in various examples on the net).

App and Sketch are the same..... ?

1 Like

Back from Florida

I tried the code above and got the same results. I'm a bit strapped for time right now as I am packing up for moving. Hope to get back to this soon.

1 Like

I was using Catia V5 when I was working. Now on Solidworks Student Version

1 Like

...you could take a look at ZW3D. More similar to Catia, integrated CAM should you need it.

If you post your App Inventor Project and the Arduino Sketch (rename extension from .ino to .txt) I can take a good look at it.

@ChrisWard

Sorry for the delay. Just got back from CT and closed on my house.

I appreciate your offer to take a look. See attached.

Fan_Control.aia (192.7 KB)

BLE_Temp_Measurement.ino.txt (6.1 KB)

Looks pretty good. I like the fact that I can read and edit both Catia and Solidworks files. Pricing seems to be on par with Solidworks.

Hi John

I attach App Inventor Project Fan_Control_2.aia and Arduino Sketch Fan_Control_2.txt They are matched together, you can't use one without the other.

Notes

  1. The Sketch compiles as-is, do not make any changes!

  2. It is using fake values for test purposes:
    RadLevel = 10
    CndLevel = 11
    AuxLevel = 12
    FanSpeed = 13

  3. When you compile the Sketch, ensure the target board is exactly the Nano 33 BLE


  4. The App Project is different to your original. There are corrections to the Blocks and I have removed the Table Component from the GUI because it is notoriously flaky. If errors occur, the App should report them - post the error messages here (Screenshots). The ListView is replaced by a ListPicker to save some space. Not all of the buttons are required but I have left them as-is. For the purposes of the Test, do not make any changes.

Fan_Control_2.aia (192.1 KB)

FanControl2.txt (5.6 KB)

Thanks for the help Chris. I downloaded both but unfortunately my wifi is down for the next several days so I cannot test. I tried the emulator, but that doesn't work either, The app doesn't show up at all, possibly the emulator needs wifi? I should have a new wifi modem by mid week.

Hi John

For Bluetooth, you can only test an APK on your phone (Android Device).

It should also be possible to test with the companion on a device. The problem here is more that the Android emulator doesn't provide direct access to the underlying hardware so it's not possible to use the Bluetooth-related hardware from inside the emulator.

With the companion device I get a message that says My device does not have Wifi. It offers me the chance to connect without Wifi and then the app shows up but cant connect. But I should have my new Wifi working tomorrow.

Thanks

Got my Wifi Router and its up and running. I tried the app, but when I press the scan button nothing comes up. It just scans forever?

Hi John

That's as an APK? Must be a bug in my code, I'll take a look tonight (UK time).

Edit: You did hit "Stop Scan"?

I assume APK means Android Device. Yes

I was able to connect with some of the previous versions of the code I was using.

...an APK is a compiled version of the App that you install on your Phone (Android Device). It's also possible to run Apps on your phone in the App Inventor Companion, but where Bluetooth is involved, a full install is best.

OK, I haven't figured out how to compile and install the app on my phone. So far I have just been using the emulator which seems to not work 50% of the time and the Companion which seems to work and I can see a list of BLE devices with my original code. I will take a look at compiling something.

Build APK