Selbstbau CUN (MapleCUN)

Begonnen von Telekatz, 09 November 2016, 20:29:52

Vorheriges Thema - Nächstes Thema

Telekatz

Zitat von: blueicechip am 18 Dezember 2017, 19:19:57
1) you can only use LAN or USB, not both together.
No, it is also possible to connect via LAN and USB at the same time.


Zitat von: bilbolodz am 18 Dezember 2017, 19:24:10
Is it wise?  E.x for MegaCul buffer is set on 1024. There is plenty of RAM in STM32 why these setting is set so low?
Do you need more? Is it wise to size the buffer larger than required?
It's not just one buffer of this size. The MapleCUN has six of these buffers.


Zitat von: bilbolodz am 18 Dezember 2017, 19:27:48
And one more question ;-) According https://wiki.fhem.de/wiki/MapleCUN

"KOPP and MBUS only work on CC0" but a few lines bellow there is a statement "MBUS works on each transceiver but not on more than one transceiver at a time."

I presume that second is true (first one is probably true for older versions).
 
Yes, the second statement is true.

bilbolodz

Zitat von: blueicechip am 18 Dezember 2017, 20:41:37- you not realy need to change the buffersize, these Mikrocontrollers has very less RAM, otherwise they are very fast. And the most RAM is used by the RF receive buffer and the protocol decoders.
Very less RAM? According data sheet there is 20kb RAM, that's quite decent value as for such MC.

Zitat von: Telekatz am 18 Dezember 2017, 20:54:44No, it is also possible to connect via LAN and USB at the same time.
Hmmmm. Strange after connecting MapleCUN I can only see (dmesg):
[21481.548453] usb 1-7.1: new full-speed USB device number 15 using xhci_hcd
[21481.650328] usb 1-7.1: New USB device found, idVendor=1eaf, idProduct=0003
[21481.650334] usb 1-7.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[21481.650337] usb 1-7.1: Product: Maple 003
[21481.650340] usb 1-7.1: Manufacturer: LeafLabs
[21481.650342] usb 1-7.1: SerialNumber: LLM 003

No serial devices..... What could be wrong? I'm using stm32 blue pill board instead maple board (for a while waiting for ebay parcel). I've some problems with flashing it maybe it's connected with it?

Zitat von: Telekatz am 18 Dezember 2017, 20:54:44
Do you need more? Is it wise to size the buffer larger than required?
It's not just one buffer of this size. The MapleCUN has six of these buffers.
I'm trying to decode WMbus. I can see messages in logs:
2017.12.18 14:50:34 2: WMBUS Error during LinkLayer parse:message too short, expected 156, got 143 bytes

In another topic connected  WMBUS there was a suggestion to increase buffer size.

Telekatz

Zitat von: bilbolodz am 18 Dezember 2017, 21:20:30
Hmmmm. Strange after connecting MapleCUN I can only see (dmesg):
[21481.548453] usb 1-7.1: new full-speed USB device number 15 using xhci_hcd
[21481.650328] usb 1-7.1: New USB device found, idVendor=1eaf, idProduct=0003
[21481.650334] usb 1-7.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[21481.650337] usb 1-7.1: Product: Maple 003
[21481.650340] usb 1-7.1: Manufacturer: LeafLabs
[21481.650342] usb 1-7.1: SerialNumber: LLM 003

No serial devices..... What could be wrong? I'm using stm32 blue pill board instead maple board (for a while waiting for ebay parcel). I've some problems with flashing it maybe it's connected with it?
I think the problem is the USB reset circuit which is not existent on the blue pill. The blue pill need a different USB reset method.  Which version of the STM32duino bootloader do you use?

Zitat von: bilbolodz am 18 Dezember 2017, 21:20:30
I'm trying to decode WMbus. I can see messages in logs:
2017.12.18 14:50:34 2: WMBUS Error during LinkLayer parse:message too short, expected 156, got 143 bytes

In another topic connected  WMBUS there was a suggestion to increase buffer size.
Then 512 should be enough.

bilbolodz

Zitat von: Telekatz am 18 Dezember 2017, 21:51:19
I think the problem is the USB reset circuit which is not existent on the blue pill. The blue pill need a different USB reset method.  Which version of the STM32duino bootloader do you use?
generic_boot20_pc13.bin

Telekatz

Should be the right on. But as noted in the readme of the STM32duino-bootloader it is not guaranteed that the reset method will always work properly.

bilbolodz

Zitat von: Telekatz am 18 Dezember 2017, 23:12:21
Should be the right on. But as noted in the readme of the STM32duino-bootloader it is not guaranteed that the reset method will always work properly.
First I've connected just with wires only one RF1101SE and serial ports were working fine. After soldering PCB (3 RF modules and W5500) and connecting by wire Blue Pill to PCB ethernet was working but serial ports not. Strange.....

Phili

Zitat von: Telekatz am 18 Dezember 2017, 18:50:49
Nur bei SlowRF muss man die Frequenz manuell setzen. Da SlowRF nicht an cc3 funktioniert wird da auch nichts gespeichert.
Die anderen Protokolle stelle automatisch die passende Frequenz ein.

Super danke, macht Sinn!

Ich würde gern mit cc01 intertechno schalten, muss ich dafür auch die Änderungen durchführen, die du ein paar Beiträge zuvor bzgl. ITRepetition geschrieben hast?

Gruß
Philipp

Phili

Noch eine Frage:

IT Steckdosen kann ich jetzt schalten, jedoch nur über c00 (868). Wobei es so aussieht, als ob der Befehl an cc01 (433,92) weitergegeben wird:
2017.12.19 21:41:45.784 3: mapleCUN1 IT_set: ELRO_10110_B off
2017.12.19 21:41:46.199 4: CUL_Parse: mapleCUN2 i155154F2 -81
2017.12.19 21:41:46.205 5: mapleCUN2: dispatch i155154
2017.12.19 21:41:46.208 4: mapleCUN2 IT: message "i155154" (7)
2017.12.19 21:41:46.210 4: mapleCUN2 IT: msgcode "0FFFFF0FFFF0" (12) bin = 000101010101000101010100
2017.12.19 21:41:46.211 5: mapleCUN2 IT: V1 housecode = 0FFFFF0FFF  onoffcode = F0
2017.12.19 21:41:46.213 3: mapleCUN2 IT: ELRO_10110_B off->off


Wenn ich das IOdef der Steckdose direkt auf cc01 setze geht es nicht mehr
2017.12.19 21:46:25.040 3: mapleCUN2 IT_set: ELRO_10110_B on
2017.12.19 21:46:25.412 5: CUL/RAW (ReadAnswer): *is0FFFFF0FFFFF


Ich verstehe das nicht :(.

Ranseyer

Hier mal ein Photo der leicht aktualisierten Small-Ausführung des CUL für den origalen MAPLE (Original soll meinen alles im 2,54mm Raster = leicht zu löten)

Aktualisiert habe ich den Footprint für Mini-Stamps (die sind dann etwas weniger leicht zu löten, aber wenn man Entlözlitze hat...)

Platinen dazu gibt es hier: https://forum.fhem.de/index.php?topic=80319
FHEM mit FTUI. Homematic-Funk für Thermostate und Licht. MySensors als Basis für eigene HW.
Zentrale ist der MAPLE-CUL mit RFM69+HModUART-AddOn.
Doku zu meinen Projekten: Github/Ranseyer. Platinen falls verfügbar gerne auf Anfrage.
Support: gerne wenn ich Zeit+Lust habe im Forum. Nicht per PN!

PeMue

#639
Hallo,

meine Platine zeigt erweiterte Grundreflexe:
-I- Getting new Started Project --<\n><\r>
-I- MapleCUNx4<\n><\r>
-I- Compiled: Sep 18 2017 20:28:11 --<\n><\r>
-I- init Flash<\n><\r>
-I- init Timer<\n><\r>
-I- init EEprom<\n><\r>
-I- init Ethernet<\n><\r>
WIZCHIP Initialized success.<\n><\r>
-I- Detected CC0: PN 0x00  VER 0x14 <\n><\r>
-I- Detected CC1: PN 0x00  VER 0x14 <\n><\r>
-I- Not detected CC2: PN 0x00  VER 0x00 <\n><\r>
-I- Detected CC3: PN 0x00  VER 0x14 <\n><\r>
-I- Not detected ethernet <\n><\r>
-I- Detected onewire <\n><\r>
-I- init ONEWIRE<\n><\r>
-I- init USB<\n><\r>
-I- init Complete<\n><\r>


Mich irritiert etwas diese Zeile:
-I- init Ethernet WIZCHIP Initialized success.
da noch kein Ethernet Modul verbaut wird. Mal sehen, was passiert, wenn das Ding eingelötet ist.

Morgen kommt noch der MySensors Teil und dann wird das Ganze ins Gehäuse gebaut  ;D ;D ;D.

Gruß PeMue
RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

Ranseyer

#640
Das ist normal siehe: https://wiki.fhem.de/wiki/MapleCUN#Debugging_.2F_weiteres

Wenn das LAN Modul erkannt wird siehst du noch:
Zitat-I- Detected ethernet

ed: Der X41, welcher Verbinder ist das  ? (Finde ich interessant)
FHEM mit FTUI. Homematic-Funk für Thermostate und Licht. MySensors als Basis für eigene HW.
Zentrale ist der MAPLE-CUL mit RFM69+HModUART-AddOn.
Doku zu meinen Projekten: Github/Ranseyer. Platinen falls verfügbar gerne auf Anfrage.
Support: gerne wenn ich Zeit+Lust habe im Forum. Nicht per PN!

PeMue

RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

PeMue

Hallo zusammen,

hat jemand von Euch schon Erfahrung mit einem Atmega328P an USB0?

Ich habe folgendes probiert:
- Blink Sketch um einen Zähler erweitert, der liefert mit 11500 baud an /dev/ACM1 brav die entsprechende Zahl
- der Atmega328P hat einen Bootloader drauf, aber
sudo avrdude -p m328p -P /dev/ttyACM1 -c arduino  -V -U flash:w:/tmp/GatewaySerial_8MHz.hex
findet keinen Bootloader
- der MySensors Sketch funktioniert auch nicht
- der Sketch funktioniert aber auf anderen einem seriellen Gateway mit Arduino nano
- das NRF24L02 Modul funktioniert auch am seriellen Gateway

Bevor ich das LAN Modul bzw. das HMUART Modul auflöte, sollte klar sein, dass es nicht an der Hardware liegt.

Meine nächsten Schritte:
- Überprüfen der Verkabelung zum Transceiver (MySensors hat halt keine vernünftigen Schaltpläte)
Meine nächsten Schritte  ;D
- anlöten zweier dünnen Kable an Rx, Tx (ist leider nicht rausgeführt) das Booten des Gateways mitzuloggen

Habt ihr sonst noch Ideen?

Danke + Gruß

PeMue
RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser

Ranseyer

Flashen des Arduinos geht nur bequem wenn auch auf der Arduino-Seite DTR verbunden ist.

Das LAN Modul könntest Du auf der ersten Platine ja auch nur stecken (Buchsenleiste). So eine Testplatine macht eh Sinn falls du LAN Module vor dem verlöten testen willst.
FHEM mit FTUI. Homematic-Funk für Thermostate und Licht. MySensors als Basis für eigene HW.
Zentrale ist der MAPLE-CUL mit RFM69+HModUART-AddOn.
Doku zu meinen Projekten: Github/Ranseyer. Platinen falls verfügbar gerne auf Anfrage.
Support: gerne wenn ich Zeit+Lust habe im Forum. Nicht per PN!

PeMue

fertig  ;D ;D ;D

Der MySensors Teil zickt noch etwas rum. Falls das nicht funktioniert, mache ich halt eine Adapterplatine für den RFM95 und mache einen seriellen Sketch für meine Photovoltaikanlage.
Testen muss ich noch 1-wire, da fehlt auch ein 100 Ohm Widerstand  ::), aber das sollte auch klappen.
Alles in allem kostet das Ganze doch mehr Zeit als ursprünglich gedacht  :o

Gruß PeMue
RPi3Bv1.2 rpiaddon 1.66 6.0 1xHM-CC-RT-DN 1.4 1xHM-TC-IT-WM 1.1 2xHB-UW-Sen-THPL-O 0.15 1x-I 0.14OTAU  1xCUNO2 1.67 2xEM1000WZ 2xUniroll 1xASH2200 3xHMS100T(F) 1xRFXtrx 90 1xWT440H 3xTFA30.3150 5xFA21
RPi1Bv2 LCDCSM 1.63 5.8 2xMAX HKT 1xMAX RT V200KW1 Heizung Wasser