Bluetooth support and amazon fire stick #48
Replies: 5 comments 36 replies
-
Is there a typo in this? I see some m_bleGamepad and some without the "m_". |
Beta Was this translation helpful? Give feedback.
-
Have you had any issues with DRAM usage when using this library? When I try to compile the main project and adding this in I get a dram0 overflow problem. |
Beta Was this translation helpful? Give feedback.
-
At the beginning I tested with a samsung Bluetooth keyboard if it would work. I worked but some commands not. |
Beta Was this translation helpful? Give feedback.
-
Yes, this can happen. To solve this problem, you need to change
which would go into DRAM, to
which goes into the flash. But take care, you cannot use BLE and WiFi at the same time, at least not in a straightforward way. I'm still working on this. |
Beta Was this translation helpful? Give feedback.
-
BTW, @phant0mias did you get REWIND and FAST_FORWARD to work with https://github.com/lemmingDev/ESP32-BLE-Gamepad ? HOME, BACK, MENU do work? |
Beta Was this translation helpful? Give feedback.
-
Hi,
I managed to control a amazon fire stick with omote.
I opened the discussion to share it with more people. Some features I still cannot use with bluetooth:
These features work with IR but might be interesting if you have only bluetooth.
I needed some time to get it stable, I realized that it was working really good with libraries that use NIMBLE.
Now how it can be implemented.
Use the BLE Gamepad Library:
https://github.com/lemmingDev/ESP32-BLE-Gamepad
When using the library you should use the newest platformio.ini file to get more flash memory (#43)
A small problem is that the boot time is getting higher.
After connecting the device in the fire stick settings as gamecontroller you can send the remote commands. Automatic reconnect after power down the TV and remote is working too.
You have to experiment with it and check the examples of this class.
I had an effort with the followings commands:
#include <BleGamepad.h>
BleGamepad bleGamepad
void setup()
{
.....
BleGamepadConfiguration bleGamepadConfig;
bleGamepadConfig.setAutoReport(true);
bleGamepadConfig.setControllerType(CONTROLLER_TYPE_GAMEPAD);
bleGamepadConfig.setIncludeStart(true);
bleGamepadConfig.setIncludeSelect(true);
bleGamepadConfig.setIncludeMenu(true);
bleGamepadConfig.setIncludeHome(true);
bleGamepadConfig.setIncludeBack(true);
bleGamepad.begin(&bleGamepadConfig);
....
}
as commands you can send:
// Back
bleGamepad.press(BUTTON_2);
delay( 20 );
bleGamepad.release(BUTTON_2);
// Down
bleGamepad.setHat1(HAT_DOWN);
delay( 20 );
bleGamepad.setHat1(HAT_CENTERED);
// Home
bleGamepad.press(BUTTON_12);
delay( 20 );
bleGamepad.release(BUTTON_12);
// Left
bleGamepad.setHat1(HAT_LEFT);
delay( 20 );
bleGamepad.setHat1(HAT_CENTERED);
// Menu
bleGamepad.press(BUTTON_11);
delay( 20 );
bleGamepad.release(BUTTON_11);
// OK
bleGamepad.press(BUTTON_1);
delay( 20 );
bleGamepad.release(BUTTON_1);
// Right
bleGamepad.setHat1(HAT_RIGHT);
delay( 20 );
bleGamepad.setHat1(HAT_CENTERED);
// Up
bleGamepad.setHat1(HAT_UP);
delay( 20 );
bleGamepad.setHat1(HAT_CENTERED);
Beta Was this translation helpful? Give feedback.
All reactions