Can this lib be used to control an irDroid-Usb-Transmitter? #1084
-
im using an esp32-s3-otg-usb board with this device connected as a cdc -usb serial device connected to my boards usb-host type A connector. i can connect and open the ir device, but dont know how use it. so wondering can i somehow adapt your lib to control it? i'm trying to avoid rewriting Lirc code. from: https://irdroid.com/usb-infrared-transmitter/ The Irdroid USB Infrared transmitter provides infrared interface for your PC and your Android Device. It allows you to control and automate all your home infrared appliances via PC and Android. The USB Infrared transmitter is compatible with Linux, Windows and *Android. The unit features IR transmitter that emmits infrared signals with wavelenght of 940nm @38khz , which is the Standard IR frequency for most of the IR controlled home appliances on the market. The unit has 3 powerful infrared LEDS which triples the operating range and enlarges the IR LED viewing angle to about 180 degrees. The USB Infrared transmitter’s powerful infrared LEDs, provide a operating range of more than 10 meters line of sight, which makes it useful for automating large rooms , halls etc. The unit is open source and open hardware licensed under GNU GPL 2.0 and it comes with source code, schematics and production files. The USB Infrared transmitter is compatible with Winlirc , via the IRToy driver for WinLirc, and in Linux you can use it via the IRman LIRC driver. The unit is based on the PIC 18f2550 microcontroller, working at 20MHz. The Default IRman Driver for Lirc does not allow transmit by default, below is a modified downloadable version, which works with LIRC. If you use the USB Infrared Transmitter in Windows, then you need to download the .inf driver below . The Driver will allow you to use the USB Transmitter with WinLirc. Technical Specifications: Interface – USB (CDC ACM Device) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
What exactly do you need to control an irDroid-Usb-Transmitter??? USB protocol? USB driver? |
Beta Was this translation helpful? Give feedback.
-
Hi Armin,
I'm trying to take an esp32-s3-otg-usb board together with an irDroidIr
cdc/acm usb dongle to emulate an IR remote to control my home IR controlled
devices. I'm using the esp32-arduino library with the arduino IDE to
program the board.
https://espressif-docs.readthedocs-hosted.com/projects/espressif-esp-dev-kits/en/latest/esp32s3/esp32-s3-usb-otg/user_guide.html
ESP32-S3-USB-OTG is a development board that focuses on USB-OTG function
verification and application development. It is based on ESP32-S3 SoC,
supports Wi-Fi and BLE 5.0 wireless functions, and supports USB host and
USB device functions. It can be used to develop applications such as
wireless storage devices, Wi-Fi network cards, LTE MiFi, multimedia
devices, virtual keyboards and mice. The development board has the
following features:
Onboard ESP32-S3-MINI-1-N8 module, with built-in 8 MB flash
Onboard USB Type-A host and device interface, with built-in USB interface
switching circuit
Onboard USB to serial debugging chip (Micro USB interface)
Onboard 1.3-inch LCD color screen, supports GUI
Onboard SD card interface, compatible with SDIO and SPI interfaces
Onboard charging IC, can be connected to lithium battery
https://irdroid.com/usb-infrared-transmitter/
The Irdroid USB Infrared transmitter provides infrared interface for your
PC and your Android Device. It allows you to control and automate all
your home infrared appliances via PC and Android. The USB Infrared
transmitter is compatible with Linux, Windows and *Android. The unit
features IR transmitter that emmits infrared signals with wavelenght of
940nm @38khz , which is the Standard IR frequency for most of the IR
controlled home appliances on the market. The unit has 3 powerful infrared
LEDS which triples the operating range and enlarges the IR LED viewing
angle to about 180 degrees. The USB Infrared transmitter’s powerful
infrared LEDs, provide a operating range of more than 10 meters line of
sight, which makes it useful for automating large rooms , halls etc.
I'm pretty novice dealing with Ir, but i've made pretty good progress. I
got the dongle working on my Win10 laptop using WinLirc to turn my Vizio tv
on/off. I used an usb snooper/monitor to capture the raw codes sent from
Winlirc to the dongle:
Decimal uint8 array used to toggle tv power:
[1,164,0,206,0,26,0,23,0,26,0,23,0,26,0,74,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,74,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,74,0,26,7,102,1,165,0,102,0,26,17,122,1,165,0,102,0,26,17,122,1,165,0,102,0,26]
I was able to get the usb host type A interface on the esp32 board to
emulate a cdc/acm usb host using tinyUsb. It recognizes and communicates
with the ir dongle.
The tinyUsb code abstracts the complexity of the usb acm/cdc host down to a
read from dongle and write to dongle functions.
when i write the above decimal array to the dongle, it actually turns on
and off my Vizio TV! 😎
My knowledge of lirc comes only from reading its code and using it with
winlirc. This is only my best guess... but I think of lirc as a way to take
a lirc formatted remote config file and parse it into a raw array of pulse
codes used to control an ir device. i.e.
*Use this lirc config file:*
#
# this config file was automatically generated
# using lirc-0.8.5-CVS(default) on Thu Apr 9 18:12:26 2009
#
# contributed by
#
# brand: Vizio remote
# model no. of remote control: 0980-0305-3000
# devices being controlled by this remote:
#
begin remote
name Vizio
bits 16
flags SPACE_ENC
eps 30
aeps 100
header 8966 4400
one 567 1596
zero 567 494
ptrail 575
repeat 9000 2194
pre_data_bits 16
pre_data 0x20DF
gap 40403
repeat_gap 95450
toggle_bit_mask 0x0
begin codes
KEY_INFO 0x38C7 # Was: Guide
AV 0x8A75
COMP 0x5AA5
HDMI 0x639C
KEY_UP 0xA25D # Was: UP
KEY_TV 0x6B94 # Was: TV
KEY_LEFT 0xE21D # Was: LEFT
KEY_DOWN 0x629D # Was: DOWN
KEY_RIGHT 0x12ED # Was: RIGHT
KEY_MENU 0xC23D # Was: MENU
KEY_MUTE 0x906F # Was: MUTE
KEY_LAST 0x58A7 # Was: LAST
KEY_VOLUMEUP 0x40BF # Was: VOL_UP
VOL_DWN 0xC03F
KEY_CHANNELUP 0x00FF # Was: CH_UP
CH_DWN 0x807F
KEY_1 0x8877 # Was: ONE
KEY_2 0x48B7 # Was: TWO
KEY_3 0xC837 # Was: THREE
KEY_4 0x28D7 # Was: FOUR
KEY_5 0xA857 # Was: FIVE
KEY_6 0x6897 # Was: SIX
KEY_7 0xE817 # Was: SEVEN
KEY_8 0x18E7 # Was: EIGHT
KEY_9 0x9867 # Was: NINE
KEY_0 0x08F7 # Was: ZERO
INPUT 0xF40B
DASH 0xFF00
KEY_POWER 0x10EF # Was: POWER
end codes
end remote
*To produce raw pulse codes* (i.e. for the Key_Power key):
0,26,0,74,0,26,0,74,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,74,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,23,0,26,0,74,0,26,0,74,0,26,0,74,0,26,0,74,0,26,7,102,1,165,0,102,0,26,17,122,1,165,0,102,0,26,17,122,1,165,0,102,0,26]
From looking at your project it seems it does more or less the same. So I'm
hoping i can somehow adapt your code to create an arduino sketch that takes
as input remote device (i.e. Vizio) and device key (KEY_POWER) to produce
the raw pulse codes needed to control the ir device.
regards
-bob
…On Thu, Feb 9, 2023 at 2:35 PM Armin ***@***.***> wrote:
What exactly do you need to control an irDroid-Usb-Transmitter??? USB
protocol? USB driver?
—
Reply to this email directly, view it on GitHub
<#1084 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABYAGFUEZF6WD74UGEEJDULWWVWLVANCNFSM6AAAAAAUTLR2GI>
.
You are receiving this because you authored the thread.Message ID:
<Arduino-IRremote/Arduino-IRremote/repo-discussions/1084/comments/4925847@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
No, it cannot. This library (together with suitable hardware (IR LEDs, TSOP receiver)) does approximately the same as the IrDroid (which is a simplified version of the sold-out IrToy.) See that link for a serial API for the IrToy/IRDroid. How to use that thing is OT here. Best way to use Lirc file is to use IrScrutinizer to convert it to something your preferred IR library can use. (Presently, the IRRemote export has not been updated for geneating code for version 4 yet (bengtmartensson/IrScrutinizer#444), but I hope to do that next week.) |
Beta Was this translation helpful? Give feedback.
No, it cannot. This library (together with suitable hardware (IR LEDs, TSOP receiver)) does approximately the same as the IrDroid (which is a simplified version of the sold-out IrToy.) See that link for a serial API for the IrToy/IRDroid.
How to use that thing is OT here.
Best way to use Lirc file is to use IrScrutinizer to convert it to something your preferred IR library can use. (Presently, the IRRemote export has not been updated for geneating code for version 4 yet (bengtmartensson/IrScrutinizer#444), but I hope to do that next week.)