david4599 / PricehaxBT

Wireless tool to communicate with IR based ESLs from a smartphone ;-)
GNU General Public License v3.0
58 stars 7 forks source link

"BT transmitter not found" error #7

Open Sliicy opened 6 months ago

Sliicy commented 6 months ago

Hi there, I am having an issue with the Android app connecting properly to my BT HC06 module. When I tried replicating this project using an Arduino Uno, and a BT HC06 module, along with the Android app that I downloaded from the releases page v1.3-21, I get the following error:

"BT transmitter not found": image

When I try sending images that fails too since Bluetooth is not set up.

The device successfully paired to my phone (OnePlus 8, had to use 1234 as the PIN): image

image

Here is my setup: image

And this is the device I am trying to hack: image

I made sure to verify that the PINs are correct with the Uno board I'm using. When I run the code, the BT HC06 module continually flashes red. Also anyone downloading this Android app might not intuitively know that the top bar scrolls to the right.

Thank you for your help!

Sliicy commented 6 months ago

Also, would you be able to rebuild this project and update the releases, since the release doesn't seem to be most up-to-date, and when I try cloning the project to Android Studio, I'm having trouble getting the gradle to recognize the project: Unable to find Gradle tasks to build: [:]. Build mode: ASSEMBLE. Tests: None. image

Sliicy commented 6 months ago

After further investigating, I was able to change the Bluetooth name and baud rate using a USBTTL adapter: AT+NAMEPRICEHAX TX V3 -> sets the name to "PRICEHAX TX V3" AT+BAUD8 -> sets the baud rate to 115200bps The version: AYMY V3.0

And now the dongle is being seen by my phone, and has a solid red LED light on. But it is still not updating when pointing my IR LED to my ESL. It says waking up ESL, then it sends packets, and finishes. I also tried adjusting the PPM mode to a slower amount, and also tested Force RAW sending mode: image

david4599 commented 6 months ago

Hi, by googling a bit, this IR module seems to be the HX-53 which doesn't have a proper driver circuit for the LED and I am not sure how bright the LED is in your setup and by using a 1.25MHz carrier frequency needed for the protocols instead of the usual 38kHz. See the replies here about this module: https://arduino.stackexchange.com/questions/67137/how-to-use-hx-53-ir-transmitter-infrared-sensor-module-with-esp32

I guess you should see the little LED blink as the arduino transmits but to be sure, you can check with your phone camera if you see a pink/purple blinking (like with a TV remote). As another troubleshooting step, you can try to upload an example sketch of the IRremote arduino library e.g. IRsendDemo and check if the LED is emitting light correctly: https://www.arduino.cc/reference/en/libraries/irremote/

These ESLs are quite sensitive and I remember that it didn't work properly when the distance between my dongle having 3 LEDs and the ESLs were too low (saturation of the sensors maybe?). It worked nicely at around 50cm.

As for the app, there are not many changes since the last release, only a few ESL types were added but I will rebuild it probably this week-end.

What is your Android Studio version? I don't use that software that much so I stayed on an old one, maybe Gradle stuff changed since. I will see that when I get a chance.

david4599 commented 6 months ago

The apk version 1.4 is built. About the tab scrolling, I agree. I don't have that much time to think of a solution so I just added a note in the build section of the readme.

Sliicy commented 6 months ago

Hi, by googling a bit, this IR module seems to be the HX-53 which doesn't have a proper driver circuit for the LED and I am not sure how bright the LED is in your setup and by using a 1.25MHz carrier frequency needed for the protocols instead of the usual 38kHz. See the replies here about this module: https://arduino.stackexchange.com/questions/67137/how-to-use-hx-53-ir-transmitter-infrared-sensor-module-with-esp32

I guess you should see the little LED blink as the arduino transmits but to be sure, you can check with your phone camera if you see a pink/purple blinking (like with a TV remote). As another troubleshooting step, you can try to upload an example sketch of the IRremote arduino library e.g. IRsendDemo and check if the LED is emitting light correctly: https://www.arduino.cc/reference/en/libraries/irremote/

These ESLs are quite sensitive and I remember that it didn't work properly when the distance between my dongle having 3 LEDs and the ESLs were too low (saturation of the sensors maybe?). It worked nicely at around 50cm.

As for the app, there are not many changes since the last release, only a few ESL types were added but I will rebuild it probably this week-end.

What is your Android Studio version? I don't use that software that much so I stayed on an old one, maybe Gradle stuff changed since. I will see that when I get a chance.

Thank you for your suggestions! When I get a chance, I'll have to test setting up a custom IR LED for it.

Sliicy commented 5 months ago

Hi @david4599, Here's my new setup (tested with latest version of Android app v1.4-22): image

Video of issue: (https://www.youtube.com/watch?v=qdpiB7CX6gw) Pricehax not working video

My diagram is nearly the same as the schematic pictured here: https://github.com/david4599/PricehaxBT/blob/master/dongle/v3.2.0/PricehaxBT_IRDongle_sch.jpg The only differences are, I'm using a 10 ohm resistor instead of 22 ohms for the 3 Infrared LEDs (I also tested with 20 ohms resistance). Also, my capacitor is a ceramic 332M 1KV.

I also tested it further away, and also in the dark. The video on the iPad can barely see the infrared LEDs, but my phone picks it up easily: image

I also tried PP16 vs PP4C, and tweaking the fast vs slow speeds.

Do you have any ideas why this isn't working? Thank you!

david4599 commented 5 months ago

Thanks for the video and explanations!

I don't see anything wrong, the LEDs seem bright enough. Have you tried to change the page by clicking on "Set DotMatrix page" in the first tab? There is way less information to transmit than an entire image and the same command is sent many times. I believe the max page number is 3 for these graphic ESLs. You can also try to show the debug info and blink the green LED if the command is supported.

But now I'm wondering that maybe the ESL you have is the issue. Just to be sure, did you remove the battery pack on the side? The firmware is stored in RAM so it's actually possible to brick the ESL by simply removing the batteries for more than maybe 20s. From what I saw with my large model, every 24h the ESL is refreshing its display by itself (I guess to avoid some ghosting effect due to how the e-ink technology works). So that's one way to check if it still work even though that's not easy to know when it will refresh.

In any case, I don't think the batteries would be dead because it's a quite recent model and they should last at least 8-10 years IIRC.

Also, a "store key" can be set in this system to allow communicating with ESLs from the same store only. They usually don't set it but you may be unlucky if that's the case. Bruteforcing it would require too much time since it's a 16-bit key.

If changing the page doesn't work, I don't have any idea left other than trying on another ESL. If you're not aware, there are sometimes cheap listings on ebay and maybe other marketplaces that you can find by searching for the brand + "ESL" or "SmartTag".

Sliicy commented 5 months ago

Should I try removing the battery for a moment or that will brick it? Also, what's the exact model of the ESL you tested on that works? Maybe I'll shop around for that same model! Also, excuse the noob question but if the battery dies, wouldn't the screen lose its image? Or do e-ink displays retain the last image even without power?

david4599 commented 5 months ago

That would be useless and it will not solve the issue anyway. The ESL will still work for a few seconds after removing it thanks to some capacitors slowly discharging but then it will power off and the firmware will disappear at the same moment. It's just enough time to allow swapping the battery pack by a new one. In case of misunderstanding, I was saying that if you removed it out of curiosity or something, you could have bricked the label within 20-30s. But you sound like you didn't so I guess there is probably a store key configured in this one.

Other people and I have tested quite a number of models over time, you can check the list in the code: https://github.com/david4599/PricehaxBT/blob/0a3396e7bdeb81e1d0d213d93e704fe9ac4979c1/app/src/app/src/main/java/org/furrtek/pricehaxbt/MainActivity.java#L201 FYI, Continuum is the old LCD-based segment type. Only the DotMatrix or SmartTag ones can display images. For instance, on the picture of the readme, it's a SmartTag HD150 Red.

Yep, the e-ink displays don't consume anything to show images, they just need power to update them.

Sliicy commented 5 months ago

So in other words, there's no way for me to know if the battery is dead, because the screen would always stay on...

david4599 commented 5 months ago

Well, the only way would be to see if the screen refreshes itself every 24h which can happen in the middle of the night...

But as I said, I don't think the battery is dead. Based on the barcode, your label was made in 2018 and I actually have one model similar to yours made in 2016 which still works. I even have a few old (2009!) Continuum ones that still work too.

IMO, there is a higher chance that you can't communicate with it just because of a store key.

Also, you can get your hands on Furrtek's ESL Blaster to be sure that's not a dongle issue.