Replies: 19 comments 4 replies
-
Update: porting to atmega2560 completed and is working fine . I can now see evohome traffic. |
Beta Was this translation helpful? Give feedback.
-
That's great news.
I wouldn't worry about the debug commands. If you're seeing messages it's probably not going to tell you anything interesting.
Have you tested TX?
The easiest way is to cut and paste a message from your received ones.
Look for an RQ message that has a corresponding RP.
Copy the RQ beginning with the RQ to the end of the line, ignore the opening 3 digit RSSI value.
Paste it back into the serial port with CR+LF.
It should echo with a 000 RSSI value and then hopefully you will also see the RP as well.
What do you intend to use your device with?
Peter
Get BlueMail for Android
…On 2 Apr 2023, 14:29, at 14:29, ago7 ***@***.***> wrote:
Update: porting to atmega2560 completed and is working fine . I can now
see evohome traffic.
Very few changes were needed: commented out flow control for uart (not
available in mega2560) and added minimal set of defines to build with
platformio and kept standard pin mapping for atmega ..u4
Next step will be debug commands, never tried yet. Still don’t know
how.. putty maybe?
--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you are subscribed to this thread.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Check this custom component for Home Assistant
<https://github.com/zxdavb/ramses_cc>
…On 2 Apr 2023, 22:42, at 22:42, ago7 ***@***.***> wrote:
I couldn’t test tx successfully. I can only see “I” messages, even
trying to set higher temperature setpoint.
Copy&pasting any “I” msg +CR+LF with or without RSSI does nothing,
neither echo.
With !V the evofw3 replies with version.
Is there a debug trace level to set to check whether I’m missing msgs
or having some issue during transmission?
The use of the device is simply monitoring and reporting, to learn
evohome behavior and may be fault detection in the future. I whould
like to monitor radiator info (valve open percentage, detected
temperature) and log. i’m using the mega2560 to recycle the only hw i
One. Should everything work, i whould like to integrate with home
assistant or some other sw like this.
Agostino
--
Reply to this email directly or view it on GitHub:
#39 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I missed your question about a trace option
Try
!T7
The 7 is a bit mask, see trace.h for bit definitions then you can scan the code to see what is being printed.
Send me a sample of the output.
What board definition are you using to compile?
From: ago7 ***@***.***
Sent: 04 April 2023 14:05
To: ghoti57/evofw3 ***@***.***>
Cc: Peter Price ***@***.***>; Comment ***@***.***>
Subject: Re: [ghoti57/evofw3] Arduino mega (Discussion #39)
ok, sure. I've read wikis of ramses_cc and ramses_rf. Once solved the current issue about TX I will star playing with.
Thank you very much.
—
Reply to this email directly, view it on GitHub <#39 (reply in thread)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIRU2W6ALXLOY3ZBVOKHCNTW7QMBPANCNFSM6AAAAAAWNHDJFQ> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AIRU2W7JIU2QSG6G2DNXKFDW7QMBPA5CNFSM6AAAAAAWNHDJFSWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAKQ7AG.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Thank you! Traces works correctly. I generated a valid RQ/RP transaction: But TX (copy&pasting) doesn't works: returns echo, but no reply: These are compile defines: |
Beta Was this translation helpful? Give feedback.
-
OK.
RX is clearly working. If you're not getting error messages in the trace indicating problems with more than an occasional RX message the connections associated with RX are fundamentally good.
This includes the SPI connections and the HW UART Rx pin.
Since the TX message is echoed the operations required by the FW to transmit the message complete. This involves the SPI and the GDO pin that is used to interrupt when the TX FIFO limits are reached (can't remember which one)
The RSSI values for the RQ/RP pair that were received are reasonably good and ARE similar values suggesting the controller and other device are a similar distance from the SSM.
You said you tried to trailer some connections. Which ones?
Most of the ones on the outer edge of the carrier PCB are GND. The GND pads on the PCB do not have very good heat relief characteristics so are difficult to solder cleanly however apparent shorts on that side are mainly írrelevant. The only important connection on that side is 3v3 which is clearly ok. (The others are NC)
On the other side of the radio module we have evidence that all the signal connections (SPI, UART, GDOn) are functional.
That leaves the antenna connection.
The 3 pads near the external antenna connector on the radio module are GND/ANT/GND
Since RX works there can't be a short between ANT and GND.
it's difficult to think of something else to check.
Get BlueMail for Android
…On 4 Apr 2023, 20:30, at 20:30, ago7 ***@***.***> wrote:
Thank you! Traces works correctly.
I generated a valid RQ/RP transaction:
19:55:31.284 > 065 RQ --- 04:050234 01:175396 --:------ 0004 002 0000
19:55:31.308 > 061 RP --- 01:175396 04:050234 --:------ 0004 022
00005A4F4E455A4F4E45310000000000000000000000
But TX (copy&pasting) doesn't works: returns echo, but no reply:
20:12:59.069 > 000 RQ --- 04:050234 01:175396 --:------ 0004 002 0000
These are compile defines:
-DHWUART
-DCCSEL=0 -DGDO0=INT3 -DGDO2=INT2
-DHOST_RATE=57600
-DARDUINO_EVOFW3_ATMEGA32U4
-DARDUINO_EVOFW3_ATMEGA2560 ; this is the only code change i did
to comment out UART flow control initialization
--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
The connections between the Mega2560 and CC1101 must be correct otherwise you wouldn't get RX to work.
TX uses the SPI interface and an interrupt input to the 2560. This must also be correct or you wouldn't get the echo of the TX message.
I think you need to connect the ground between the antenna and the cc1101.
Get BlueMail for Android
…On 5 Apr 2023, 17:02, at 17:02, ago7 ***@***.***> wrote:
The connections are the following (ordered by my C1101 board):
MEGA 2560 <-> CC1101
3.3V: VCC
GND: GND
(PCINT2) PB2: MOSI
(PCINT1) PB1: SCLK
(PCINT3) PB3: MISO
(INT2) PD2: GDO02
(INT3) PD3: GDO00
(!SS/PCINT0) PB0: CSN
CC1101 <-> ANTENNA
GND: not connected
ANT: ANTENNA
GND: not connected
SS (SPI Slave Select input) in mega2560 works with inverted logic
(!SS). I haven't check yet if this is tipical behaviour or can be MCU
specific.
I will check for shorts in antenna as soon as I can get back to the
board. This suggestion sounds good.
--
Reply to this email directly or view it on GitHub:
#39 (reply in thread)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
No short found checking with multimeter, either outer side of C11010 or antenna side. Tested TX: this time it didn't work at all. With debug trace enabled fw always returned "RQ --:---- ..... bad msg" and no echo without traces. May be TX connection has becomed unreliable and I should try another C1101 instance since I've got 5 identical. |
Beta Was this translation helpful? Give feedback.
-
By helical antenna I assume you mean one of these
<https://www.ebay.es/itm/224794742602?chn=ps&norover=1&mkevt=1&mkrid=118514682554860&mkcid=2&mkscid=101&itemid=224794742602&targetid=1988336187007&device=m&mktype=pla&googleloc=1005407&poi=&campaignid=19493756154&mkgroupid=142286609262&rlsatarget=pla-1988336187007&abcId=9304434&merchantid=116373309&gclid=Cj0KCQjw_r6hBhDdARIsAMIDhV94GXJw28lEVOyKBfIl_G3rodBKaqZ9ogIaDg-9zny5K77GGaCIH_YaAqiEEALw_wcB>
Try connecting it directly to the cc1101, so that you get the benefit of the ground plane.
By connecting the GND to the antenna I meant to a ground of the antenna not realising you didn't have one.
That antenna is not good for attaching to a long piece of wire. You need a ground plane.
Get BlueMail for Android
…On 6 Apr 2023, 17:43, at 17:43, ago7 ***@***.***> wrote:
No short found checking with multimeter, either outer side of C11010 or
antenna side.
Tryed to connect the 2 GND antenna pads to arduino's GND (this is what
I understood from your instructions). I'm using an helical antenna
testing about 2/3 meters from the controller.
Tested TX: this time it didn't work at all. With debug trace enabled fw
always returned "RQ --:---- ..... bad msg" and no echo without traces.
Disconnecting the TX wire from arduino gave the same result: bad msg.
Removed the 2 on-the-fly gnd connections from antenna, restarted visual
studio, checked connections, but no way, yesterday didn't worked at
all.
In all cases, RX still working.
May be TX connection has becomed unreliable and I should try another
C1101 instance since I've got 5 identical.
I could also try to setup a Logical Analyzer.
--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yes, the antenna i’m using is like that. Update: Connecting the logical analyzer I receive a lot of traffic from rx pin and nothing from tx. |
Beta Was this translation helpful? Give feedback.
-
TX pin to cc1101 is not used
Get BlueMail for Android
…On 7 Apr 2023, 22:43, at 22:43, ago7 ***@***.***> wrote:
Yes, the antenna i’m using is like that.
Update: Connecting the logical analyzer I receive a lot of traffic
from rx pin and nothing from tx.
Suspecting the tx pin were burned, i tried a serial print in a new
sketch but this time I received traffic with logical analyzer.
So, I suppose that uart tx of atmega32u4 is not 100% compatibile with
(arduino) atmega2560 or something similar.
--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
This is great info! Below a PulseView run using a 1M$... ehmmm.... 20$.... LogicAnalyzer. The UART RX gives traffic all the time, while evofw only produces sporadic traffic traces. This seems to confirm there's a lot of noise in RX, while fw only traces valid traffic, still been received correctly. But completely "no-life" during transmission makes me confused about what happened since when I had at least echo working. Next days I will try to replace the radio, I don't have more MCU (i whould have an ESP32 but too much difficult to integrate I think). May be I could try a loopback using different UARTs between TX and RX (e.g. TX2 and RX1) to avoid using same internal buffer?? |
Beta Was this translation helpful? Give feedback.
-
I keep saying. TX does not use the UART. Loopback isn't going to do anything.
RX does typically look noisy but there is a synch pattern in front of each message. RX is not considered "active" until that I is detected.
It's far from trivial to port to an ESP32. I'm looking at that but it's not going to happen soon.
…On 9 Apr 2023, 12:05, at 12:05, ago7 ***@***.***> wrote:
This is great info!
Below a PulseView run using a 1M$... ehmmm.... 20$.... LogicAnalyzer.
The SPI traffic should be associated to the bursts after RX, since I
didn't transmitted.
Trying to TX is completed transparent: none of the pins gives "signs of
life" (and "bad msg" from fw).
The UART RX gives traffic all the time, while evofw only produces
sporadic traffic traces.
This seems to confirm there's a lot of noise in RX, while fw only
traces valid traffic, still been received correctly. But completely
"no-life" during transmission makes me confused about what happened
since when I had at least echo working.
Next days I will try to replace the radio, I don't have more MCU (i
whould have an ESP32 but too much difficult to integrate I think). May
be I could try a loopback using different UARTs between TX and RX (e.g.
TX2 and RX1) to avoid using same internal buffer??

--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Yes, It was clear, sorry I get in mind another test that I was also trying in the meanwhile and I mixed two concepts. Ok, so rephrasing: I could try a loopback using the same 2560 sending from one c1101 to another radio attached to a different uart (rx2) of the same 2560. But what i cant’t understand is why there’s no activity at all during TX attempts. |
Beta Was this translation helpful? Give feedback.
-
For any TX to occur the FW has to believe that there is not a possible RX in progress. There’s no point transmitting when something else is already using the frequency.
The sample analyser trace you attached is not very helpful because it doesn’t contain a full RX message (or what the FW thinks is one).
The best way to capture a full message is by triggering on a CSN falling edge with a time offset to capture about 0.5 second of data before it (much longer than any RX message)
The SPI clock rate is 250 KHz, The RX data is 38.4 KHz (so 1 bit is about 26 uS)
I seem to remember capturing traces at 1MHz which gives the potential to capture a significant amount of trace. Higher sample rates are not helpful.
Try to send the TX as soon as you see the analyser trigger.
Then stop the trace a few seconds later (to stop it getting too big)
It should be possible to see how clean the RX data is.
There is some old DEBUG code in the firmware that it should be possible to use. It uses IO pins on an unused port to signal logical activity. With the 32u4 pin definitions this should be on port F. That actual functions being traced may need a little editing done. Although there are apparently 6 pins defined I seem to recall that only 5 are actually usable – TX debug is not currently enabled.
Just monitoring CSN, GDO0 and GDO2 will allow you to capture 5 other pins on an 8 channel analyser (the actual MISO/MOSI values aren’t too important as long as you can see CSN).
From: ago7 ***@***.***
Sent: 09 April 2023 15:26
To: ghoti57/evofw3 ***@***.***>
Cc: Peter Price ***@***.***>; Comment ***@***.***>
Subject: Re: [ghoti57/evofw3] Arduino mega (Discussion #39)
Yes, It was clear, sorry I get in mind another test that I was also trying in the meanwhile and I mixed two concepts. Ok, so rephrasing: I could try a loopback using the same 2560 sending from one c1101 to another radio attached to a different uart (rx2) of the same 2560. But what i cant’t understand is why there’s no activity at all during TX attempts.
—
Reply to this email directly, view it on GitHub <#39 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/AIRU2W2KYPWLWZT65KJECFLXALBHRANCNFSM6AAAAAAWNHDJFQ> .
You are receiving this because you commented. <https://github.com/notifications/beacon/AIRU2W3ZVJP2FLKBJBWCZN3XALBHRA5CNFSM6AAAAAAWNHDJFSWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAKTUEU.gif> Message ID: ***@***.*** ***@***.***> >
|
Beta Was this translation helpful? Give feedback.
-
Hi. I started studing fw code more deeply to better learn data workflow and added some additional debug trace just to collect more info. |
Beta Was this translation helpful? Give feedback.
-
I’m back.. to the scenario where tx is echoed correctly. with Logic analyzer, now i can see tx related spi traffic. Just as a first impression, it seems that during tx cs returns high prematurely when receiving something (may be noise) |
Beta Was this translation helpful? Give feedback.
-
RX is always disabled during TX
Get BlueMail for Android
…On 16 Apr 2023, 12:26, at 12:26, ago7 ***@***.***> wrote:
I’m back.. to the scenario where tx is echoed correctly. with Logic
analyzer, now i can see tx related spi traffic. Just as a first
impression, it seems that during tx cs returns high prematurely when
receiving something (may be noise)
Probably i’m wrong, but just to make a simple test, based in your
esperience how can i “disable” rx during tx only (where can i make this
temporary change in the code)?
thanks
--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
What makes you think CS is high?
Get BlueMail for Android
…On 16 Apr 2023, 12:26, at 12:26, ago7 ***@***.***> wrote:
I’m back.. to the scenario where tx is echoed correctly. with Logic
analyzer, now i can see tx related spi traffic. Just as a first
impression, it seems that during tx cs returns high prematurely when
receiving something (may be noise)
Probably i’m wrong, but just to make a simple test, based in your
esperience how can i “disable” rx during tx only (where can i make this
temporary change in the code)?
thanks
--
Reply to this email directly or view it on GitHub:
#39 (comment)
You are receiving this because you commented.
Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi ghoti57,
Great job!
I have got an arduino mega and a green cc1101 board labeled 868mhz.
Reading the discussions here, in my understanding it seems to be feasible porting the code to the mega (4 uart and cpu/timer mhz ok).
any suggestion on how to approach the porting and which code fragments should be impacted ?
(Assuming the mega is not ready to use as is)
thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions