Starting problems with bluetooth and app

Hello,
I am now the owner of a Tympan Rev F and have already been able to try out a few examples.

Among other things, I tried Tympan_Test_BLE, Tympan_Test_BLE_nRF52 and BasicGain_wApp to connect to the app.
Each time I was able to connect the device to my cell phone (Samsung Galaxy S8) as a peripheral, but when I scanned it through the app it wasn’t recognized.

I read all the posts and followed the tips, like restarting the phone, but nothing helped.
But there were only older posts for Rev E found.

Did no one have similar difficulties with Rev F?
What is it failing?

Addendum:
When I have paired the Tympan with my cell phone, I only see one device at a time.
Not, as described in the Rev E topic (with ScreenShot), one device as a microphone and one device as a headset.
Could it be that the connection is already broken?

HI!

Welcome to the forum. Sorry that you’re having trouble.

Sadly, I don’t have a Rev F with me here. I will have access to one next week, though. Maybe @biomurph can help sooner?

When I get access to one, I’ll see how it shows up in the phone…as a single entry or as two (mic + headset).

When you’re connected to the phone, do the LEDs on the Tympan blink differently? Colors change or rate of blinking change?

Chip

Hi Chip,

I repeated it with the BasicGain_wApp example.
Reinstalled and paired with the cell phone as a peripheral.
There was no change in blinking the red, green or blue LED.
All the same rate as before pairing.

Hi again,

I got a Rev F and gave it a quick test. Here’s what a normal interaction looks like (in detail):

PROGRAM THE TYMPAN: In the Arduino program, I opened up the Tympan example “Tympan_Test_BLE”. Like all examples, they’re available via the Arduino “File” menu, choose “Examples->Tympan_Library”. In this case, keep drilling down through “02-Utility->Bluetooth->Tympan_Test_BLE”. I compiled it and uploaded it to the Tympan.

CHECK BLE FIRMWARE: Once the Tympan finished booting, I went under the Arduino’s “Tools” menu, clicked on “Port”, and chose the port associated with the Teensy/Tympan (in my case “COM3 Serial (Teensy 4.1)”. I then opened up the Arduino Serial Monitor and sent an ‘h’ to get the Tympan’s help menu. Once I saw the text of the menu, I sent a ‘v’ to get the version of the firmware that’s running on the Tympan’s bluetooth module. The Tympan reported that its module’s firmware is 0.4.0. Yours may be older, which is (hopefully) fine.

STARTUP STATUS: Upon startup, the Tympan’s bluetooth LED slowly pulses blue. In the Serial Monitor, I send a ‘t’ to ask its advertising status and it responds “1”, meaning it is advertising. I send a ‘g’ to ask its connected status and it responds “0”, meaning it is not connected. I send a ‘n’ to ask its bluetooth name it it responds “TympanF-EDAT”. So far, so good. (On your unit, the last four digits of the name will be different).

PHONE PREP: In my phone’s bluetooth settings, I went under “previously paired devices” and removed “TympanF-EDAT” from the list. I turned off the phone’s bluetooth, waited 30 seconds, and turned it back on. I also cycled the power on the Tympan and re-connected via the Arduino Serial Monitor.

BLUETOOTH CONNECTION: With the Tympan’s light slowly pulsing blue, I open the Tympan Remote app on my phone. I press the button for “Scan for Devices”. It lists “TympanF-EDAT”, as would be expected. I tap on its name to connect. After a moment, the app says “connected”.

CHECKING STATUS: In the Arduino Serial Monitor, I see that it has sent a bunch of JSON text, which is what tells the phone what kind of interface to draw. The Tympan’s light is now slowly pulsing green. In the Serial Monitor, asking its connected status, it now says “1”, meaning that it is connected.

INTERACTING: In the App, if I press the “up/down” icon on the bottom-right, it switches to displaying “Tympan BLE Testing”, which is the graphical interface commanded by the “Tympan_Test_BLE” code running on the Tympan itself. From this page, I can ask for the BLE Firmware version and I can change the digital gain. Everything seems to work fine.

DISCONNECTING: In the App, if I press the “gear” icon in the bottom-left, it switches back to the Settings page. If I tap on the Tympan’s name, it disconnects. Via the Serial Monitor, I ask its advertising and connected status. It (correctly) reports that it is not connected and that it is advertising. Looking at the Tympan itself, I see that its light is now slowly pulsing blue again.

RECONNECTING: In the App, I can tap on the Tympan’s name again, and it reconnects just fine. The Tympan’s light turns green, like before. I can connect/reconnect repeatedly. Blue is clearly disconnected+advertising and Green is clearly connected.

So, just for the record, that’s what normal looks like.

(My phone is a Moto G Power 2022, Android 12)

Having just gone through the process above, I now am going in to the phone’s bluetooth settings to see if it shows up as one bluetooth device or two…which is related to your questions above.

TYMPAN NOT CONNECTED: With the Tympan off and NOT connected to the phone, the Tympan does not show up in the phone’s bluetooth settings at all. It doesn’t even show up in the “previously connected devices” list, which surprises me, since it had been connected just a couple minutes ago.

TYMPAN CONNECTED: Repeating the process in the previous post above, I used the Tympan Remote app to connect to the Tympan. Once connected (the green LED is pulsing slowly), I had the phone swap back to the phone’s Bluetooth settings page. There is still no indication of any connection (current or previous) in this page. Switching back to the Tympan Remote app, the connection to the Tympan is working fine. So, clearly, there can be a successful BLE connection without the phone’s bluetooth settings reporting it.

TURN OFF PHONE’S BLUETOOTH: On my phone, if I turn off the bluetooth, the Tympan’s light switches from Green back to Blue. So, that’s good. That’s expected.

CONCLUSION: My conclusion is that the way that the RevF appears within Android is different than it was with RevD and RevE. Therefore, the screenshot in our docs “Getting Started with TympanRemote App” (is that an iPhone screenshot?) probably needs to be updated.

@Huutsch ,

Given my experience above, may I ask you a few questions:

  • You are having difficulty with your Samsung Galaxy S8. Do you know what version of Android it’s running?
  • Might you have tried another phone or tablet? Does the Tympan connect correctly using any of your other devices?

Then, may I ask you to try a couple actions:

  • Can you run the “Tympan_Test_BLE” example, like I used in the post above? If you send the same commands that I did (‘v’, ‘n’), what version of firmware and what name does it report?
  • Can you look in your phone’s list of “previously connected” or “previously paired” devices? If the Tympan appears, can you remove it?
  • Can you try connecting to the Tympan via only the Tympan Remote App? (not using any of the connection/pairing commands from the Android Bluetooth settings menu)
  • Finally, if all that still fails, may I ask you to reboot your phone (and the Tympan) and trying again?

I’m so sorry that it’s not working for you. It must be very frustrating.

Chip

Hi Chip,
Thank you very much for your detailed description.

Unfortunately I don’t get the expected answers in the serial monitor.

  • v
    BLE_nRF52: version: failed to get the BLE firmware version. Reply =
    serialManager: BLE: version returned err_code -1
  • t
    serialManager: BLE: Advertising = -1
  • g
    serialManager: BLE: Connected = 0
  • n
    BLE_nRF52: getBleName: failed to get the BLE name. Reply =
    serialManager: BLE: Name from module =
    serialManager: ble.getBleName returned error code -1

The blue LED pulses long/short approximately once a second
In my cell phone the tympan is displayed as “Tympan-ADF1”.

Because of the answer “BLE_nRF52” I also tried the example “Tympan_Test_BLE_nRF52”, but the answers are the same.

Maybe it’s because my Tympan is from the latest batch in August and the firmware is newer?

Hi Again. I’m sorry that it’s still not working. Very frustrating!

I’ve been thinking about your problem and I’m not sure what the problem is. Based on your last message, it’s not clear whether the Bluetooth module is responding at all to the Tympan. Very strange.

There are a couple paths that I can see for trying to get a response from the module. None are super easy, but maybe they’re not to bad, either. I suggest that we start with using a generic bluetooth-sniffing App on your phone…

Are you familiar with the electronics DIY store adafruit.com? They’re excellent. They offer all sorts of open-source designs and products. The bluetooth module that we included in the Tympan RevF is their based on their hardware and firmware design. I suggest that we start by using their Bluetooth-sniffing app to try to connect to the bluetooth module:

If you download this, start the app, and start the Tympan, does the Tympan show up in the App’s list of bluetooth devices?

If so, this is a great start. Press the “Connect” button. Does it connect? If so, presumably the light on the Tympan changes color?

Once connected, do you see a screen like the one below?

If you do see this screen, can you click on info at the top? The resulting page will probably have lots of stuff shown in a very cryptic manner. Might you be able to screenshot it and share it? It might scroll down across multiple pages.

Sorry this is a pain. We’ll make sure that you get working.

Chip

@Huutsch you can also find BLE firmware update instructions here in the Read Me.