irplus-remote / irplus-codes.github.io

Code updates for irplus
75 stars 47 forks source link

USB TYPE C BLASTER #635

Open itstermoh opened 1 year ago

itstermoh commented 1 year ago

I just installed the beta version for usb type c support by it still doesn't work. I bought one ir from here: https://it.aliexpress.com/item/1005005825447410.html?src=google&src=google&albch=shopping&acnt=494-037-6276&slnk=&plac=&mtctp=&albbt=Google_7_shopping&albagn=888888&isSmbAutoCall=false&needSmbHouyi=false&albcp=19215243512&albag=&trgt=&crea=it1005005825447410&netw=x&device=m&albpg=&albpd=it1005005825447410&gad=1&gclid=CjwKCAjwyNSoBhA9EiwA5aYlb69OfTS2jv7sVzDy8nVjYlmwIAD2kRTH9QjhsXRfZGTqF0RLB7HmvRoCQ8sQAvD_BwE&gclsrc=aw.ds&aff_fcid=a8daa11e2f454edcb664703e035dff94-1695902584518-04086-UneMJZVf&aff_fsk=UneMJZVf&aff_platform=aaf&sk=UneMJZVf&aff_trace_key=a8daa11e2f454edcb664703e035dff94-1695902584518-04086-UneMJZVf&terminal_id=b58f4e138c8143daa97f4c1c131e5754&afSmartRedirect=y

there is an app called Ocrustar for these type of blasters and works. the ir uses the otg function

flameshikari commented 12 months ago

Same to me. Bought a similar one, and it works only with Ocrustar (may someday be useful for testing and implementing support in irplus).

I'll take a chance and buy another dongle. By the screenshots, it works with ZaZaRemote.

irplus-remote commented 12 months ago

Hi, could you please post the USB Vendor ID and Product ID of your dongles?

flameshikari commented 12 months ago

Hi, could you please post the USB Vendor ID and Product ID of your dongles?

Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 045c:0134
Bus 002 Device 001: ID 1d6b:0003

Three devices appear when I connect the dongle. Will these values be enough? I got them from a rooted phone using lsusb command.

itstermoh commented 11 months ago

Hi, could you please post the USB Vendor ID and Product ID of your dongles?

int vid = 0x045c; pid = 0x0195;

itstermoh commented 11 months ago

Hi, could you please post the USB Vendor ID and Product ID of your dongles?

Bus 001 Device 001: ID 1d6b:0002
Bus 001 Device 002: ID 045c:0134
Bus 002 Device 001: ID 1d6b:0003

Three devices appear when I connect the dongle. Will these values be enough? I got them from a rooted phone using lsusb command.

are you using linux? if yes it should display more info

flameshikari commented 11 months ago

are you using linux? if yes it should display more info

Recently I received an adapter to connect this dongle to PC. lsusb -v output:

Bus 001 Device 003: ID 045c:0134 SMTCTL SMART
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x045c
  idProduct          0x0134
  bcdDevice            2.00
  iManufacturer           1 SMTCTL
  iProduct                2 SMART
  iSerial                 3 2017-2-25
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0033
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          0
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)
itstermoh commented 11 months ago

are you using linux? if yes it should display more info

Recently I received an adapter to connect this dongle to PC. lsusb -v output:

Bus 001 Device 003: ID 045c:0134 SMTCTL SMART
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.10
  bDeviceClass            2 Communications
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x045c
  idProduct          0x0134
  bcdDevice            2.00
  iManufacturer           1 SMTCTL
  iProduct                2 SMART
  iSerial                 3 2017-2-25
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0033
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         2 Communications
      bInterfaceSubClass      2 Abstract (modem)
      bInterfaceProtocol      1 AT-commands (v.25ter)
      iInterface              0
      CDC Header:
        bcdCDC               1.10
      CDC Call Management:
        bmCapabilities       0x00
        bDataInterface          0
      CDC ACM:
        bmCapabilities       0x02
          line coding and serial state
      CDC Union:
        bMasterInterface        0
        bSlaveInterface         1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval               0
Device Status:     0x0000
  (Bus Powered)

thank you for sharing this, 045c is the vendor id, 0134 is the product id and you can request the usb permission to the device adding 0x to these values

flameshikari commented 11 months ago

you can request the usb permission to the device adding 0x to these values

Sorry, but what does it mean? Where should I do this and what will it give?

itstermoh commented 11 months ago

you can request the usb permission to the device adding 0x to these values

Sorry, but what does it mean? Where should I do this and what will it give?

those values are used to communicate with the ir blaster in app, if vid matches one of the supported then the app will automatically send the right ir code to make it work

flameshikari commented 11 months ago

those values are used to communicate with the ir blaster in app, if vid matches one of the supported then the app will automatically send the right ir code to make it work

Thanks for the clarification, but I kinda understand that. I can't understand what you mean by you can request the usb permission to the device.

itstermoh commented 11 months ago

those values are used to communicate with the ir blaster in app, if vid matches one of the supported then the app will automatically send the right ir code to make it work

Thanks for the clarification, but I kinda understand that. I can't understand what you mean by you can request the usb permission to the device.

for SMART ir blaster I think that you need to ask a permission to communicate with the blaster like ocrustar app does, you can get vid and pid with just a line of code and add a function to your app that checks for vendor and product id, if these match the wanted ones then you'll send a broadcast where you have to accept or decline the permission to communicate with the ir, if you decline you'll need to open again the app else it will send ir codes to the ir and if it works it should light up the green led

flameshikari commented 11 months ago

add a function to your app

Wait, which app? What are we even talking about? :D

itstermoh commented 11 months ago

add a function to your app

Wait, which app? What are we even talking about? :D

you can create your own app to send ir codes

flameshikari commented 11 months ago

you can create your own app to send ir codes

Oh, well, yes. But I'm weak in programming. The best I can do now is to help test the application, or do something according to the instructions. Maybe sometime.

itstermoh commented 11 months ago

Hey @irplus-remote I wrote vendor and product id above

irplus-remote commented 11 months ago

thanks for your input - will try to add those hardware Ids and push the update to the playstore. Maybe they will work as well :)

coshiro1 commented 11 months ago

Just wanted to chime in and say this product works perfectly with irplus wave. VID 0x10C4 PID 0x8468. Thank you so much for this feature!

itstermoh commented 11 months ago

Just wanted to chime in and say this product works perfectly with irplus wave. VID 0x10C4 PID 0x8468. Thank you so much for this feature!

I have one ir of a brand named SMART and I bought the silver one that it's the same to this, but my vid is 0x045c

flameshikari commented 11 months ago

Just wanted to chime in and say this product works perfectly with irplus wave. VID 0x10C4 PID 0x8468. Thank you so much for this feature!

I have a dongle with same IDs and the app says Bad infrared code or not supported by emitter! :( But it works via ZaZaRemote. Can Android 14 cause the issue? By the way, Pixel 5a 5G (barbet).

irplus-remote commented 11 months ago

Just wanted to chime in and say this product works perfectly with irplus wave. VID 0x10C4 PID 0x8468. Thank you so much for this feature!

I have a dongle with same IDs and the app says Bad infrared code or not supported by emitter! :( But it works via ZaZaRemote. Can Android 14 cause the issue? By the way, Pixel 5a 5G (barbet).

Did you get the prompt to enable the dongle? Can you tell me the irplus version to make sure you're using the correct one?

flameshikari commented 11 months ago

Just wanted to chime in and say this product works perfectly with irplus wave. VID 0x10C4 PID 0x8468. Thank you so much for this feature!

I have a dongle with same IDs and the app says Bad infrared code or not supported by emitter! :( But it works via ZaZaRemote. Can Android 14 cause the issue? By the way, Pixel 5a 5G (barbet).

Did you get the prompt to enable the dongle? Can you tell me the irplus version to make sure you're using the correct one?

Nope, I didn't get the prompt. Version is 1.10 (322)

coshiro1 commented 11 months ago

Just wanted to chime in and say this product works perfectly with irplus wave. VID 0x10C4 PID 0x8468. Thank you so much for this feature!

I have a dongle with same IDs and the app says Bad infrared code or not supported by emitter! :( But it works via ZaZaRemote. Can Android 14 cause the issue? By the way, Pixel 5a 5G (barbet).

I'm on Samsung Galaxy S21, still on Android 13. App version 1.10. I have the "Nearby devices" permission allowed too but I don't know if that affects USB connected ones. What app version are you on? I get this popup when plugging in the tx and pushing a remote button:

Edit Removed embedded image for easier scroll https://github.com/irplus-remote/irplus-codes.github.io/assets/53509111/646c4d15-993f-43e9-9f9c-0b00fdcccbb6

flameshikari commented 11 months ago

I'm on Samsung Galaxy S21, still on Android 13. App version 1.10. I have the "Nearby devices" permission allowed too but I don't know if that affects USB connected ones. What app version are you on? I get this popup when plugging in the tx and pushing a remote button:

This popup appears only when using ZaZaRemote. I'm using irplus WAVE 1.10 (322). I'll try it on Samsung later.

irplus-remote commented 11 months ago

There was indeed a problem which causes the permission to fail on Android14. I changed the flag to IMMUTABLE to make it work again. Will push the update to irplusLAN, the subsequently to WAVE if everything worked there... :)

fun requestUsbPermissionForCompatibleDev(context: Context, usbManager: UsbManager) {
    for (device: UsbDevice in usbManager.deviceList.values) {
        if (isCompatibleDevice(device)) {
            val requestCode = 0
            val intent = Intent(ACTION_USB_PERMISSION)
            val piFlags = PendingIntent.FLAG_IMMUTABLE
            val pi = PendingIntent.getBroadcast(context, requestCode, intent, piFlags)
            usbManager.requestPermission(device, pi)
        }
    }
}
flameshikari commented 11 months ago

@irplus-remote 10c4:8468 is working now, many thanks!!! No luck for 045c:0134. If I can help somehow with 045c:0134 dongle (testing, etc.), feel free to contact me!

irplus-remote commented 11 months ago

Which blaster is it? got a photo ? link where i could order it to test it?

flameshikari commented 11 months ago

Which blaster is it? got a photo ? link where i could order it to test it?

I bought it here. It's supposed to work with Ocrustar app.

irplus-remote commented 11 months ago

Ah ok so the hardware is probably different than the ones that work with Zaza. If anyone knows how to comunicate with it let me know. Ill have opened a specific issue for it:
https://github.com/irplus-remote/irplus-codes.github.io/issues/640

Pharaoh2k commented 4 months ago

Ah ok so the hardware is probably different than the ones that work with Zaza. If anyone knows how to comunicate with it let me know. Ill have opened a specific issue for it: #640

I am using a Samsung Galaxy S24 Ultra. Which USB-C blaster has been confirmed to work with your amazing app? I wanna buy it right away.

P.S. Totally unrelated, but you could please add these 2 service menu buttons to the LG remote:

<irplus>
 <device manufacturer="LG" model="Service Remote Access " columns="1" format="WINLIRC_NEC1" rowSplit="8">
  <button label="IN-START" labelSize="50.0" span="8" labelColor="FF000000" backgroundColor="FFFF0000">0x20DF 0xDF20</button>
  <button label="EZ ADJUST" labelSize="50.0" span="8" labelColor="FF000000" backgroundColor="FFFFFF00">0x20DF 0xFF00</button>
 </device>
</irplus>
ShowroomCaoQuynh commented 2 weeks ago

Which blaster is it? got a photo ? link where i could order it to test it?

I bought it here. It's supposed to work with Ocrustar app.

Can you help me? I had the same like you and can only use Ocrustar

irplus-remote commented 2 weeks ago

A user said that this one worked for him.

https://www.amazon.co.uk/Smartphone-Anti-Dust-Universal-Controller-Cellphone-Dedicated-Type-C/dp/B09YM68WX3

generally speaking the Zaza ones should work