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

The easiest thing to do is to install the Board again - if the latest version, 3.1.1 is already installed, the program will tell you.

The App will state 'Connected' if it has.

Do not press a button, just wait for the values to arrive. The time interval is 10 seconds. See how that goes.

Sounds like the data is hitting the App too fast. I have to think about that.

Edit: Need to send the values as an array.

Hi John

The next update - not sure if it is a step forward or back :roll_eyes: The App is expecting the values to arrive as a List (array), So I have modified the Sketch to write an array.

The first set of values should arrive in the App in 2 seconds, thereafter the interval is 10 seconds.

In the App I have added an App Exit button. To fit it in, all the buttons are changed to image buttons.
Fan_Control_6.aia (215.6 KB)
FanControl6.ino (6.0 KB)

OK at least with version 6 Radiator temp is reported as 10, which is correct but all other values are 0. It did take about 10 seconds for the initial value to show up. Also subsequent attempts to connect resulted in the AI Companion crashing and shutting itself off. I have seen that happen occasionally in the past but now I cant get it to connect at all.

Hi John

I did say to only use an APK for testing. You should only try to re-connect if the App reports that it is disconnected.

Hmm, that was not intended. It should only take 2 seconds for the initial values, then 10 seconds thereafter. My bug.

Interesting because the App will only report the values if there is a list of 4. So I think my (Sketch) characteristic.writeValue syntax for the array is wrong, even though it compiles.

FanControl7
Sketch: Taken out the initial time duration bug and also the values increase every subsequent check.
App: When the values arrive they are dumped as-is in the message Label - so we can confirm if the values simply arrive as [10,0,0,0] instead of [10,11,12,13] and so on.

Fan_Control_7.aia (215.7 KB)

FanControl7.ino (6.6 KB)

@Gerriko_io - could you take a look at the Sketch please? Line 161 TempCharacteristic.writeValue - trying to write an int array.

The app shuts down weather I use the APK or the AI2 companion. I get the same message with either method.No change in version 7, same as v6.

But version 6 , I was able to connect once and get the Rad Temp of 10. Since then not able to connect at all with either the APK or companion. Im wondering if my BLE is back to where it was when I started thei thread "dead".

Thanks V3.1.1 is confirmed as installed.

What do the values look like in the App's Status Label? Oh, hang on, you can't connect. There must be something that caused the boards to 'reset' last time, or maybe they are simply faulty.

One board is acting like the ones I had before where they wouldn't connect to anything. The other one connects to my Blue light software, but I cant get anything meaningful out of it. I think that board is good.

Possibly they are both good. The one that refuses to connect has connected before, so if there is no physical damage it should be OK. You don't by any chance have a desktop magnifier? There might be a hairline crack somewhere that can't be seen by the naked eye - that could explain why it works sometimes and not other times.

If the Sketch is installed, Blue light should "see" the UUIDs.

Blue light sees the UUID's for both boards but only connects to one. But none of the characteristics are reporting data.

Nevertheless, we need to know what the compiled App (APK) does or does not do - the Companion is an App itself, so while it is convenient when designing the GUI and testing code snippets, it's potentially an added complication for our tests.

Yes I tried both. The previous picture about 7 posts up is with the APK after the second attempt to connect.

To recap, does one of the boards still connect? If so, I have FanControl8 to test.

One board connects with Light Blue only. Send #8, I will give it a try.

Here we go - only the 8s work together.
Fan_Control_8.aia (215.8 KB)
FanControl8.ino (6.8 KB)

Avoid using the Companion - it may be part of the connect issue.

I got the following message with #8 but it didn't just turn off the app like it did the last time. But it did prompt me to exit the app.

Runtime Error

Service 0000ffe0-0000-1000-8000-00805f9b34fb, characteristic 0000ffe1-0000-1000-8000-00805f9b34fb are not published by the connected device.

That's interesting because it does connect with Light Blue but doesn't report any data.

... The UUIDs in the App and the Sketch are upper-case and the same as those used in the previous FanControl files that did not generate the same error message.

I spoke to soon. I ran the app again and it works. I got all 4 numbers 10, 11, 12, 13 but for some reason the 10 comes up as ["10 and 13 comes up as 13"]

The difference between when it didn't work and when it did was that the first time when it crashed I opened the app after down load when I was prompted to open it. The second time I opened it from the icon on the Android.