Forum KNX francophone / English KNX forum

Version complète : [eibd] Routing server
Vous consultez actuellement la version basse qualité d’un document. Voir la version complète avec le bon formatage.
Hello,

J'ai une question concernant le mode 'Routing Server' de eibd. Dans la doc, il est noté :

Citation :Additionally, eibd can acts as limited EIBnet/IP Tunneling and/or Routing Server. The limitation is, that only one KNX address can be used as source address of EIBnet/IP Clients. This address is shared between multiple possible routing or tunneling connections. To the EIBnet/IP client, the address 0.0.0 is used, to the EIB/KNX bus the address of the interface device is used. eibd maps between these addresses (like NAT for TCP/IP).

Quelqu'un comprend-il ce que ça signifie ?

Pour info, avec un bête socket de type multicast bindé à l'adresse ("224.0.23.12", 3671), l'activité sur le bus est bien reçue, via une trame cEMILData. Par exemple, lorsque j'allume une lumière, je reçois (log du framework) :

Code :
UDP receiver::UDPTransceiver._receiverLoop(): inFrame='\x06\x10\x050\x00\x11)\x00\xbc\xd0\x11\x1e1\x01\x01\x00\x81'
UDP receiver::UDPTransceiver._receiverLoop(): KNXnetIP header=<KNXnetIPHeader(service='routing.ind', totalSize=17)>
UDP receiver::UDPTransceiver._receiverLoop(): frame=bytearray(b')\x00\xbc\xd0\x11\x1e1\x01\x01\x00\x81')
UDP receiver::UDPTransceiver._receiverLoop(): cEMI=<CEMILData(mc=0x29, priority=low, src=1.1.30, dest=6/1/1, npdu=bytearray(b'\x01\x00\x81'))>
UDP receiver::L_DataService.putInFrame(): cEMI=<CEMILData(mc=0x29, priority=low, src=1.1.30, dest=6/1/1, npdu=bytearray(b'\x01\x00\x81'))>
LinkLayer::L_DataService.run(): cEMI=<CEMILData(mc=0x29, priority=low, src=1.1.30, dest=6/1/1, npdu=bytearray(b'\x01\x00\x81'))>
LinkLayer::N_GroupDataService.dataInd(): cEMI=<CEMILData(mc=0x29, priority=<Priority('low')>, src=<IndividualAddress('1.1.30')>, dest=<GroupAddress('6/1/1')>, npdu=bytearray(b'\x01\x00\x81'))>
LinkLayer::T_GroupDataService.groupDataInd(): src=1.1.30, gad=6/1/1, priority=low, tPDU=bytearray(b'\x00\x81')
LinkLayer::A_GroupDataService.groupDataInd(): src=1.1.30, gad=6/1/1, priority=low, aPDU=bytearray(b'\x00\x81')
LinkLayer::Group.groupValueWriteInd(): src=1.1.30, gad=6/1/1, priority=low, data=bytearray(b'\x01')
LinkLayer::GroupObject.onWrite(): src=1.1.30, data=bytearray(b'\x01')
LinkLayer::FuntionalBlock.notify(): dp=state, oldValue=Off, newValue=On
LinkLayer::Notifier.datapointNotify(): dp=state, oldValue='Off', newValue='On'
LinkLayer::Notifier.datapointNotify(): trigger method stateChanged() of <LightTimerFB('light_timer')>
LinkLayer::LightTimerFB.stateChanged(): event={'oldValue': 'Off', 'newValue': 'On', 'dp': 'state', 'event': 'datapoint'}

On voit bien que l'adresse source du device est transmise. Mais si j'essaye d'envoyer quelque chose, en construisant une trame cEMI du genre :

Code :
Thread-15::A_GroupDataService.groupValueWriteReq(): gad=6/0/1, priority=low, data=bytearray(b'\x00'), size=0
Thread-15::T_GroupDataService.groupDataReq(): gad=6/0/1, priority=low, tSDU=bytearray(b'\x00\x80')
Thread-15::N_GroupDataService.groupDataReq(): gad=6/0/1, priority=low, nSDU=bytearray(b'\x00\x80')
Thread-15::L_DataService.dataReq(): cEMI=<CEMILData(mc=0x11, priority=low, src=0.0.0, dest=6/0/1, npdu=bytearray(b'\x01\x00\x80'))>
UDP transmitter::UDPTransceiver._transmitterLoop(): transmission=<Transmission(payload=<CEMILDataFrame(mc=0x11, addIL=0, ctrl1=0xbc, ctrl2=0xe0, src=0x0, dest=0x3001)>, waitConfirm=True, result=0)>
UDP transmitter::UDPTransceiver._transmitterLoop(): frame= bytearray(b'\x06\x10\x050\x00\x11\x11\x00\xbc\xe0\x00\x000\x01\x01\x00\x80')
UDP transmitter::UDPTransceiver._transmitterLoop(): transmission=<Transmission(payload=<CEMILDataFrame(mc=0x11, addIL=0, ctrl1=0xbc, ctrl2=0xe0, src=0x0, dest=0x3001)>, waitConfirm=False, result=0)>

Rien n'est transmis au bus (eibd lancé en vbusmonitor2 ne sort rien).

Une idée de ce qui merdoie ? J'ai essayé d'autres adresses source, sans succès. Mais, comme dit, la phrase plus haut n'est pas du tout clair quant à la restriction sur ces adresses sources...

Pour info, eibd et lancé avec la commande suivante :

$ eibd --daemon=/var/log/eibd.log --pid-file=/var/log/eibd.pid --eibaddr=0.0.1 -D -S --Tunnelling --Routing --listen-tcp=6720 ipt:192.168.0.148:3671

Merci d'avance pour vos lumières.
Bon, j'ai trouvé le problème. Le Message Code à utiliser pour la requète est MC_LDATA_IND, au lieu de MC_LDATA_REQ. Là, je ne pige absolument pas pourquoi, mais le fait est que ça fonctionne...