-
Notifications
You must be signed in to change notification settings - Fork 122
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
Receive OK, but sending does not work with espurna #2
Comments
I don't know the status of the espurna firmware if every commands are supported. |
Hi, can you tell us how you are using the code? I tested it also with Tasmota Software, but same problem. |
I do all the tests with a COM terminal program like HTerm. |
To what port do you connect and with what baud rate? |
To the RX/TX header next to the EFM8BB1. And put the switch to the OFF position. This will cancel the RS232 connection to the ESP ISP. |
Hi , i tried with your way with HTerm, but still nothing was send. I tried also the sample code on your page. |
AA Sync Looks alright. I will test it later this week. |
I've also flashed the provided hex file and I'm able to learn commands but they don't work when sent back. I assume there is a problem with sending. |
Hi, the code you put as "original" does not work. |
I checked the transmitting and there is a problem of handling the SYN115 chip. The SYN115 chip will transfer the data but the sync isn't correct. So the receiver will not understand the signal. The chip looks like is turning off transmit after ~7ms. So I can't transmit a sync bit with 10ms!? So if anyone do have information about this SYN115 let me know! |
I hope having a look here will help. |
No, they just attach dummy data in front to enable the chip. Also they don't have a pause of 10ms in the transfer. |
I will have to wait till I get a new Bridge with original firmware than I can log what is happening on the data line. I hope I will also be able to read the original firmware from the chip. I found that with my Wellon VP998 I can read the data from the EFM8 chip as long as the code protection bit is not set. |
Chip protection isn't set. Also I asked them for the original HEX file - no support. |
@Portisch I have a oscilloscope only have to wait on a new bridge with original firmware. I ordered a few but it seems the (delivery)pigeon have difficulties finding the Netherlands. So when they arrive I hope to have the original firmware available and can do some measurements. b.t.w. I have read somewhere the data from the receiver is always inverted to what is send to the transmitter in your images I don't see that. |
Hi , thanks to keep on going. Maybe this link helps : https://drive.google.com/open?id=0BwEYW5Q6bg_ZTDhKQXphN0ZxdEU. Original web side is http://www.rflink.nl/blog2/development. It looks like they support two SYN115 devices. http://www.rflink.nl/blog2/wiring : Cheap Alternative transmitter 2. Hope this can help. Br. Frank |
@AlbertWeterings A meassurement on the original firmware would be helpfull. I know espurna will make repeats. But I don't know if the firmware of the EFM8 will do also repeats when transmitting. May I open another branch for testing repeating by the EFM8 chip. |
I have created a new branch. |
@Portisch I will test it but will not be at home before tomorrow morning. As far as I can see ESPURNA in RAW supported mode: In original mode: So i'm not sure if it makes sense to have the EFM repeat the message as having it repeating it will not be able to receive during that time. |
@AlbertWeterings may you try the master again. I fixed the wrong byte position in the uart data. |
@Portisch Tested the latest version now and it still doesn't transmit anything. I also connected the input line from the receiver to decoding Arduino direct to Data line to transmitter and don't see anything passing by. Did you program the light on pin 14 (P1.0) that it must blink while transmit? This stays off all the time. I have send this several times to the EFM: In the morning I will hook up a oscilloscope to see if there is something coming out of the EFM |
@Portisch Last update and going to sleep now. AAA50601D0F932113355 AAA80601D0F932113355 AAB00601D0F932113355 |
@Portisch Well have been testing today and found all kind of strange behavior. I think we will have to sort out things more structural. I wrote a little program to send data into the EFM the same way ESPURNA does. 0D0A0D0AAA {A8} 382C01AE055045D50C550D0A 0D0A0D0AAA {B0} 382C01AE055045D50C550D0A I think we shout first figure out how to get A5 mode send correct data that will be the original mode. Currently it sends something but unable to decode. A wild guess from me is lets try to invert the ASK signal. |
The receiver on the same RF Bridge get disabled while transmission. You only can see it on the oscilloscope. Or did you use another receiver? |
@Portisch I use a other receiver. And finally I figured out how to measure the pulses coming out of the EFM. The signal of a EV1527: You can see there is a difference between the length of a pulse in low and high state, I think that should not be the case. Tomorrow I will measure the ASK signal on both transmitters of the remotes to get theire timings. I have also connected a different transmitter on the ASK line of the EFM that one did also not transmit a signal that could be decided. |
The length of the pulses should not matter. Only the duty cycle. 75% for a 1 bi, 25% for a 0 bit. Like 1400us and 430us are 23%. |
@Portisch I think I found where it goes wrong. I'm currently comparing the transmission from back to front. |
@Portisch Well I have put some time today in finding a working solution based on the data sheets of PT2264 and EV1527 remotes. To compare practical working and theory I used specific receivers for PT2264 and one for EV1527. And started to generate signals according to data sheets instead of signals transmitted by remotes and came to some nice conclusions. For PT2264 The data sheet say's: For EV1527 The data sheet say's: The period time is what we know as Thigh coming from the EFM when it receives the value has to be divided by 3 to get 1 period time. So if we are able to Learn a Signal with the bridge we can construct the output signal using only Thigh Here is the Arduino Sketch I used to test on a Arduino Leonardo with a standard low-cost transmitter: |
Hi, i tested the new code and it is working for me with my older bridge and the espurna code 1.1.24! Br. Frank |
@franki29 are you using the web interface of Espurna? Did you enable "raw" flag when flashing? |
Hi, no i am using the standard bin version of Espurna, i did not compile by myself this time. |
For me the new code for some buttons I have at work doesn't work. It doesn't show up after pressing learn. Some DIO buttons, model: CAWST-907. |
Some more information: OFF But even i use the OLD PCB code in the new PCB it does not work with the new PCB. |
@Portisch
Now we have to find a way to transmit the signals in the correct format based on the hex data we send to the EFM. I found that if the period time (Thigh/3) is higher than 444us it is alway's a PT226x based remote below 444us it can be a EV1527 and PT2264. To get to know below 444us what remote format to use is harder I think I found a way but can't confirm yet, it looks like the decimal "code" value of a EV1527 has always 1 digit more than the PT2264. Will try to find confirmation in the datasheets. It is also a possibility to send the codes in both formats PT226x and EV1527 but that can lead to having devices respond to codes that supposed to go to a different device. |
Very nice. |
@ErikAndren I like the idea. Problem is the original FW can do the trick without sending a extra Byte so to stay backwards compatible the most general protocols shout work without sending a extra byte. In RAW mode I think having the extra Byte would be a good thing to make sure the data is send in the proper shape. |
@franki29 My new unknow 5 Pin chip is namend "IB3HB" |
This is Correct:
Not correct! Sync = 32 * period time. It's hard to read but the arrows in the datasheet shows 1/32 and 31/32 for the sync. So I see no difference between except the sync. For PT226x it should be on back, for EV1527 it is in the front. @Jason2866 EDIT: Or it is a Step-Up controller. This is may the reason of L7, D7 and C26. Meassure the voltage on pin 3 a the SYN115 chip if the voltage is higher as 3.3V. |
@Portisch ok, thx. So new and old version should in general work?! |
@Portisch: You are right it is a step up controller. Pin 3 on SYN115 is 12 Volt. |
I don't follow this math: According to datasheet tsync is 4096 alpha, ts_high is 128 alpha: |
@ErikAndren I checked the EV1527 command 297C0168042EB22894: So T-Sync-high should be 10620 / (4096 - 128) * 128 == 342µs EDIT: With original firmware: |
ok, thank you. |
I have done now some more tests with the original firmware:
Make the sync: Bit 0: Bit 1: I added a new branch to act like the original firmware on command 0xA5: aef7a13 |
Interesting. |
The master branch is doing like the datasheet is telling us. But it looks like not working 100%. The alternative firmware have to be 100% compatible to the original one to be able to work with an espurna firmware what isn't supporting the RAW data mode. |
@ErikAndren Good question. Protocol Specs. are made for best compatibility. But real life is sometimes different. Maybe the guys at ITEAD made an error or the copied (wrong) code "everybody" use... |
@Portisch I agree on the part where for EV1527 Tsync low is 31* period time. If I generate the signals with a arduino they are perfectly accepted by the specific receivers to the EV1527 and PT226x I tried to put the sync as calculated for the EV1527 behind the code part of the PT226x and the receiver doesn't respond anymore.
|
@AlbertWeterings |
I have to agree with @Jason2866 the values the EFM with original FW is spitting out for Tsync and Tlow can't be right. I can not find any way to compair them to the signals @Portisch and myself have measured by oscilloscope. The only value I could make sens of is Thigh if I divide it by 3 it always comes close to the High part of a bit 1 @Portisch I will test right away when I'm at home |
As the transmit like described in the datasheet isn't working very well I have done this new PT226x branch. I think ITEAD have done trial & error on the firmware. So the alternative firmware should "simulate" as near as possible the original behavior. But I don't know if this will also have affect to the transmitting:
The original firmware reduce the timings about 10%. This is with the PT226x branch:
|
@Portisch The PT2264 branch is better than the master It learns PT2264 remote (pretty well sometimes need retries) and instantly learns EV1527. It transmits PT2264 reliable (receiver responds by only the repeats from the EFM) EV1527 reliable (receiver responds by only the repeats from the EFM) Codes from SonOff PIR-2 are learned ok ( Chip LD27L2 ) ESPURNA may not repeat otherwise receiver is triggered twice. So codes cannot be used in the webinterface. This looks really good thanks for the effort. Can you tell how the values TSync, Tlow and Thigh are now related to the generated signal? |
Just take a look above: #2 (comment) |
Yes, the commit got merged to the master. |
Hello, i could manage to load the prebuild hex image to my sonoff rfbridge.
Now i tried to learn a code from my remote and it is working.
But i could not send any learnd command.
I am using pilight with my raspberry pi for sniffering and my bridge does not send out any code.
Any help what i have to do to get it work?
The text was updated successfully, but these errors were encountered: