Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Struggling with Bluefruit on Itsy nrf52840 Express
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Struggling with Bluefruit on Itsy nrf52840 Express

by dougconran on Sat Aug 01, 2020 6:35 pm

I'm trying to create an OBD2 simulator using an ItsyBitsy nRF52840 Express. This needs to be able to advertise 1 Service that contains 2 Characteristics one of which offers NOTIFY and INDICATE and the other of which offers WRITE and WRITE NO RESPONSE.

I have tried 2 Example sketches, bleuart.ino and customhrm.ino. Both sketches compile and appear to run (ie there is plenty of feedback on the Monitor). Both appear on nRF Connect and a Bluetooth terminal I have on my Android phone but only bleuart.ino connects and allows a dialogue. nRF Connect lists customhrm.ino as offering a service with UUID 0x180D but no characteristics and the bluetooth terminal will not connect at all with error gatt status 133.

I can't use the uart connectivity and need to be able to offer the service and characteristics, what am I doing wrong (bearing in mind that neither example has been modified in any way) and how can I fix this?

One last thing that I should say is that I have a 1.44" TFT display connected to the Itsy and was trying (and failing) to get this to work using Circuitpython, which I've now removed.

Any help would be much appreciated.

dougconran
 
Posts: 24
Joined: Wed Nov 08, 2017 8:25 am

Re: Struggling with Bluefruit on Itsy nrf52840 Express

by dougconran on Sun Aug 02, 2020 5:41 am

On googling 'gatt status = 133' I've discovered that this is an Android BluetoothGatt error to do with connections not being closed down correctly. I suspect that this is being caused by something going wrong in customhrm.ino but can't work out what it might be. As far as I can tell the only fundamental difference between the two programs is that bleuart.ino has the Service UUID and Characteristic UUIDs pre-baked in as part of the BLEUart module whereas in customhrm.ino they are specifically created within the program. What is the difference?

dougconran
 
Posts: 24
Joined: Wed Nov 08, 2017 8:25 am

Re: Struggling with Bluefruit on Itsy nrf52840 Express

by dougconran on Sun Aug 02, 2020 3:17 pm

[SOLVED] - I'm not sure how to alter the title of this topic but I have solved the problem I was having. The root of the problem was the Android Bluetooth Terminal app that I was/am using in that it was expecting a Service with both READ and WRITE characteristics whereas customhrm.ino was only providing 2 READ/NOTIFY characteristics. Once it had detected both READ & WRITE it worked fine. I think, however, that there may have been another issue in that both the Service and Characteristic UUIDs that were used by customhrm.ino were the shortened 16 bit versions whereas those in bleuart.ino were the full 128 bit versions (possibly this was an issue because I'm using non-standard UUIDs).

dougconran
 
Posts: 24
Joined: Wed Nov 08, 2017 8:25 am

Please be positive and constructive with your questions and comments.