Comments (4)
Firstly, While the 16MHz ATMega328P is capable of capturing messages from a RAMSES based control system (e.g. EvoHome) it is not as good as a ATMega32U4 based device.
This is because the ATMega328P devices use their HW UART interface to communicate with a host device (PC/Linux/MAC) via a UART/USB converter chip. The ATMega32U4 has an internal USB interface leaving the HW UART free to interface to the CC1101 chip while the ATMega328P has to use a software implementation of a UART.
This SW UART implementation uses most of the available processor cycles while it is receiving a message leaving little scope for sophisticated error handling.
from evofw3.
Thanks - before looking into this I had naively thought the 328P might be superior due to not having to handle USB internally!
In this case though I think it's the power supply to the CC1101 making the SPI bus misbehave (and presumably the ATMega is hanging on the while loop that waits for MISO). I've sorted out the power and it's been running fine overnight so far.
Thanks for the firmware by the way! I'm pretty sure I have a spare 32U4 somewhere and will give it a try.
from evofw3.
So now to your observations.
Firstly, when you enter the !F command what it does is to read 3 register values from the CC1101 SPI interface and use them to report the configured frequency divider. The expected value is 21656A which implies you felt the need to run an auto-calibration sequence.
I have said repeatedly that this was only necessary for devices based on a particular batch of ATMega328P sticks from a German supplier (can't remember which one) that appeared to have a low quality crystal fitted to the cc1101 module. Autotune was never really intended to be a long term feature of the code and it is possible that it has bugs.
The value you have is only different by 8 a difference of about 0.0003% from the ideal value.
I strongly suggest you reset the cc1101 parameters back to default with the cmd !ER followed by a power cycle of the device.
from evofw3.
As to why you see different values in response to !F I can think of a couple of reasons
- The internal state of the cc1101 has been corrupted - unlikely because it wouldn't self recover.
- The SPI interface is being used for something else so the values acquired are not those expected. I think this is the case.
It could be that you have a noisy radio environment or that the listening device is not in an ideal location compared to your control system devices. The 3 digit value at the beginning of each message line is an RSSI value; small values are good, bigger values are bad. Values above 090 are often a signe of poor reception and you have some reported values near this boundary.
You should ensure that the antenna on the device is vertical as this is the alignment used in all the control system devices. The antenna being in other planes will result in poorer reception.
I suspect that the FW is detecting what it believes is the beginning of a new message but then, before a successful ending is detected, an error in the message is detected. The default behaviour in this situation is to silently discard the message.
When the FW determines that a detected message has ended, either succesfully or with an error, it reads the RSSI value from the CC1101 via the SPI interface. If it is trying to do this at the same time as your !F command this access could result in erroneous values for F being reported.
You can see if the FW is detecting many badly formed messages using the !T2 command. This will cause messages with detected errors to be printed.
from evofw3.
Related Issues (20)
- Is there a 'buy me a beer, coffee' or 'donate to my preferred charity'?
- Please change arduino.h to Arduino.h in tty_usb.cpp HOT 1
- can't program this onto my UNO HOT 2
- CC1101 to ATMEGA328P pinning HOT 38
- No response on specific command HOT 10
- Esp8266 or esp32 usefull HOT 7
- enhancement request: trace flag for device_id HOT 1
- No longer working after upgrading to 0.7 HOT 22
- flashing to nanocul not working HOT 11
- nano CUL not working HOT 11
- Starting tuning process on Raspberry Pi HOT 20
- No serial communication after successful board programming. nanoCUL board advice needed HOT 10
- nanoCUL not transmitting HOT 18
- Strange behavior on Remeha Elga Ace heatpump after activating Nanocul (evofw3) with Home Assistant (ramses_cc) HOT 3
- Please add License
- Header wrong in Wiki HOT 1
- STM8 HOT 28
- Evofw3 in Domoticz HOT 7
- Error messages HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from evofw3.