This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

The problem of using ESP32 microcontroller to transmit data (probably due to programm
#1
I want to use ESP32 to create a micro voltmeter for BLE transmission. The program on ESP32 looks normal from the monitor and has generated a micro voltage signal. However, there is a problem during the process of using BLE to transmit to phyphox, which always displays the wrong uuid. I have tried multiple times but still cannot transmit data to my phone. Here is my phyphox program, could you please help me take a look.

<phyphox xmlns="https://phyphox.org/xml" version="1.18">
  <title>微电压实验</title>
  <category>No Category</category>
  <color>orange</color>
  <description>ads1115高精度测微电压</description>
  <data-containers>
    <container size="0">1</container>
    <container size="0">2</container>
    <container size="0">3</container>
  </data-containers>
  <input>
    <bluetooth uuid="cddf0002-30f7-4671-8b43-5e40ba53514a" autoConnect="true" mode="notification">
      <output char="cddf0002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian">1</output>
      <output char="cddf1002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian" offset="4">2</output>
      <output char="cddf1002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian" offset="8">3</output>
    </bluetooth>
  </input>
  <views>
    <view label="New View">
      <value label="New label">
        <input>1</input>
      </value>
      <value label="New label">
        <input>2</input>
      </value>
      <value label="New label">
        <input>3</input>
      </value>
    </view>
  </views>
</phyphox>
Reply
#2
Could you please share your microcontroller sketch, so that we can check what is sent?

Are you using phyphoxBLE? Then you could (rather) easily connect to your microcontroller by tapping “+” in the phyphox main menu, “Add experiment for Bluetooth device”, and then select your ESP32 device. Our library automatically generates the corresponding .phyphox file, provides it for download via BLE, and greatly facilitates the UUID handling.
Reply
#3
Looking at the code, I would suggest these changes:
Code:
<bluetooth mode="notification">
      <output char="cddf1002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian">1</output>
      <output char="cddf1002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian" offset="4">2</output>
      <output char="cddf1002-30f7-4671-8b43-5e40ba53514a" conversion="float32LittleEndian" offset="8">3</output>
    </bluetooth>
While “autoconnect” might be convenient at some point, for testing I would recommend manual coupling of the device so that you can be sure that the correct one is chosen. The “uuid” is not required here, AFAIK.

There has been (likely) a typo in the first “output” line, it must also be “cddf1002-…” like the subsequent lines.
Reply


Forum Jump: