Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: esp32 DevkitC v4 Looses Connection #32

Open
Nubi123bty opened this issue Nov 28, 2022 · 16 comments
Open

[Bug]: esp32 DevkitC v4 Looses Connection #32

Nubi123bty opened this issue Nov 28, 2022 · 16 comments
Labels
bug Something isn't working needs-repro

Comments

@Nubi123bty
Copy link

Nubi123bty commented Nov 28, 2022

For some reason, the Windows Client is unable to connect to the ESP, as soon as it is found and an attempt to connect is made it loses the connection to the board over BT.
this is the error created by the player:

2022-11-28 15:47:40,361 [1] ERROR BhapticsPlayer.Internal.BhapticsLiteDB: BhapticsDB DB created
2022-11-28 15:47:40,438 [1] ERROR BhapticsPlayer.Utils.Utilities: Util Get BhapticsSettingValue 1
2022-11-28 15:47:40,439 [1] ERROR BhapticsPlayer.Utils.Utilities: CurrentCulture: de-AT
2022-11-28 15:47:40,439 [1] ERROR BhapticsPlayer.Utils.Utilities: Properties.Settings.Default.language Before: en-US
2022-11-28 15:47:40,439 [1] ERROR BhapticsPlayer.Utils.Utilities: Properties.Settings.Default.language: en-US
2022-11-28 15:47:40,731 [1] WARN  BhapticsPlayer.Internal.SettingsStore: CheckDfuFailure
2022-11-28 15:47:40,840 [1] ERROR BhapticsPlayer.Utils.AudioToHapticConfig: Load default setting
2022-11-28 15:47:41,014 [1] ERROR BhapticsPlayer.Audio.Utils.AudioDeviceWatcher: AudioDeviceWatcher() default selected. Die Sequenz enthält kein übereinstimmendes Element.
2022-11-28 15:47:41,131 [1] ERROR BhapticsPlayer.WebSocket.StudioReceiver: Listening on port 15881, and providing WebSocket services:
2022-11-28 15:47:41,145 [1] ERROR BhapticsPlayer.WebSocket.StudioReceiver: Listening on port 15882, and providing WebSocket Secure services: True
2022-11-28 15:47:41,145 [1] WARN  BhapticsPlayer.Utils.Utilities: Release Id : 2009
2022-11-28 15:47:41,145 [1] WARN  BhapticsPlayer.Utils.Utilities: releaseNum : 2009
2022-11-28 15:47:41,655 [1] WARN  BhapticsPlayer.Internal.SettingsStore: CheckDfuFailure
2022-11-28 15:47:41,745 [5] ERROR BhapticsModLauncher.Config.BhapticsContentsRepository: HttpWebResponse status: OK
2022-11-28 15:47:42,448 [5] ERROR BhapticsModLauncher.Config.BhapticsContentsRepository: BhapticsContentsRepository Exists DB
2022-11-28 15:47:42,486 [5] ERROR BhapticsModLauncher.Config.BhapticsContentsRepository: BhapticsContentsRepository SaveGameContents()
2022-11-28 15:47:52,765 [6] WARN  BhapticsPlayer.Bluetooth.DeviceWatcherService: Remove Device TactosyDevice {Name=TactSuitX40, Id=70518412007866, Paired=False, Connected=Disconnected}
2022-11-28 15:48:00,282 [30] WARN  BhapticsPlayer.Bluetooth.DeviceWatcherService: Remove Device TactosyDevice {Name=TactSuitX40, Id=70518412007866, Paired=False, Connected=Disconnected}

Serial output does not produce anything bt this:

>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
@leon0399 leon0399 added bug Something isn't working needs-repro critical and removed critical labels Nov 28, 2022
@leon0399
Copy link
Member

leon0399 commented Nov 28, 2022

Thank you for submitting an issue! Please, help me investigate your issue. I'll need more detailed info, such as

  • which version/branch of firmware you are using
  • what device you are building
  • bHaptics Player version (Can be found in Settings menu)

Also, please, try switching to v0.1.2 version, which is confirmed to be working great with the following steps:
Code_RRV9HMU6qJ

@leon0399 leon0399 changed the title esp32 DevkitC v4 Looses Connection Bug: esp32 DevkitC v4 Looses Connection Nov 28, 2022
@Nubi123bty
Copy link
Author

Nubi123bty commented Nov 29, 2022

thank you for looking into it,
Building the tactx40, but having the same issue with any other Build on the devkitC V4, Tried 4 different Boards, I am using the 1.2 as recommended, the Player version is 1.8.2.2, had the same issue with the previous release,
the connection is breaking off several times until after 10 to 20 minutes there seems to be a connection.
this is the final serial output on the serial port when connected.
i also tried to downgrade ESP32 Library version to 2.0.0 while testing, with the same issue.
Reinstalled and reset the player, EEprom is erased every time before another Version is copied onto it.
clearly there must be a mistake on my side since no one seems to have encountered it, maybe my environment?

>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onDisconnect()
>>      onConnect()
>>      onConnect(*param)
>>      onRead (UUID: 6e400007-b5a3-f393-e0a9-e50e24dcca9e) 
        value: `␂␁`, len: 2
>>      onRead (UUID: 6e400008-b5a3-f393-e0a9-e50e24dcca9e) 
        value: `d`, len: 2
>>      onRead (UUID: 6e400003-b5a3-f393-e0a9-e50e24dcca9e) 
        value: `$��R=f)���`, len: 10
>>      onRead (UUID: 6e40000b-b5a3-f393-e0a9-e50e24dcca9e) 
        value: ``, len: 2

versions of VS:
Version: 1.73.1 (user setup)
Commit: 6261075646f055b99068d3688932416f2346dd3b
Datum: 2022-11-09T04:27:29.066Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
Betriebssystem: Windows_NT x64 10.0.19045
Sandkasten: No

@leon0399
Copy link
Member

Have you tried connecting to ESP from your phone? Or Meta Quest of you have one

I have an idea why it might happening, I'll lol into it tomorrow

DFU is responsible for firmware update, and presumably bhaptics player trying to update firmware (?). I'll try bumping version to latest one and see how it performs

@Nubi123bty
Copy link
Author

the mobile device paired right away.

leon0399 added a commit that referenced this issue Nov 30, 2022
@leon0399
Copy link
Member

I've bumped the firmware version to prevent it from trying to update, let's try a new version. Don't forget to checkout the latest master branch

@Nubi123bty
Copy link
Author

Nubi123bty commented Nov 30, 2022

no, still the same problem, only after many attempts is the connection established, I just recognized that the Second PWM on address 0x41 is not getting any signals, does it have to do something with this issue?

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:1044
load:0x40078000,len:8896
load:0x40080400,len:5828
entry 0x400806ac
>> OutputAutoComponent()

@leon0399

This comment was marked as resolved.

@Nubi123bty

This comment was marked as resolved.

@Nubi123bty

This comment was marked as resolved.

@Nubi123bty
Copy link
Author

ok one thing I was able to test the connection on Oculus Quest 2 (SW-Ver.: 415550688) Bhaptics Oculus Player Ver.: 0.7.14, Firmware on ESP Tact X40 V1.2.
I can't connect with the Tact X40, The Gloves I made on the ESP32 Devkitv1 Work fine. no error message is produced.

@leon0399
Copy link
Member

leon0399 commented Dec 1, 2022

The Gloves I made on the ESP32 Devkitv1 Work fine

By gloves, you mean "Tactosy for hands" compatible device?

leon0399 added a commit that referenced this issue Dec 1, 2022
@leon0399 leon0399 changed the title Bug: esp32 DevkitC v4 Looses Connection [Bug]: esp32 DevkitC v4 Looses Connection Dec 1, 2022
@leon0399
Copy link
Member

leon0399 commented Dec 2, 2022

I've just verified that it works correctly on the latest master branch, bHaptics Player 1.8.2.2
Consider joining our Discord, we've been discussing possible causes of this problem, one of them is the bad quality of either the Bluetooth adapter/dongle or the ESP chip itself and how to distinguish good quality ESPs from bad ones

image

@Nubi123bty
Copy link
Author

Thank you very much, for your time looking into it. I will try to get another, than from AZ-Delivery, to try it out.

@Nubi123bty
Copy link
Author

is there a possibility that the BT draws too much Power from the esp when connecting? what version of the ESP itself are you using or what brand is the Devkit?

@leon0399
Copy link
Member

leon0399 commented Jan 11, 2023

what version of the ESP itself are you using or what brand is the Devkit?

I'm using this ESP32 devkit board from AliExpress: https://aliexpress.ru/item/32864722159.html?sku_id=12000028745117645 (ESP32-D CH9102 variant)

I've also started collecting a list of trusted links on these two pages: https://openhaptics.github.io/docs/hardware/mcu and https://openhaptics.github.io/guides/face-interface/quest2-esp32-breadboard (don't mind guide itself, it's not complete)

@Akluma
Copy link

Akluma commented Feb 6, 2024

I have same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-repro
Projects
None yet
Development

No branches or pull requests

3 participants