Dear Andre,
I am happy to see the usability of canbus nodes,which i wrote two year back....as you mentioned candump node is working outright and cansend node has few issues....to summarize inputs to cansend node can be provided in one of the following ways
1.explicitly msg.canid and msg.payload
2.msg.payload in the form for id#data (as you are using currently)
3.only data in msg.payload, id will be taken from node configuration or randomly
4.Default canid or data in cansend node configuration
5.Random values if any of the filed is absent (not filled in node configuration or thru input wire)
However first method may be most suitable and flexible i feel..please share your feedback to enhance the node behaviour
dlc is calcuated based given data always..planning to add support payload in the form of object having id, data as fields(
msg.payload.id, msg.payload.data),slight change w.r.t input method-1...I am fine tuning the priority of input methods slightly...hopefully will update the node over this weekend.
Please find an example flow covering most of the test cases of cansend node usability,which is tested on Virtual CAN.The last input in this example is forming hex data as buffer,instead of string,hope it is near to your expectation.
Thanks,
Rajesh Sola.
ps:- facing some problem in attaching flow..so pasting here
[{"id":"f8373930.780ef8","type":"cansend","z":"8ed637d.a0a6448","config":"245413cb.1c6014","canid":"128","payload":"ABCD","x":535.7832641601562,"y":151.08338928222656,"wires":[]},{"id":"c213fd9b.c5ed68","type":"inject","z":"8ed637d.a0a6448","name":"","topic":"","payload":"abcd","payloadType":"str","repeat":"","crontab":"","once":false,"x":141.7833251953125,"y":151.00001525878906,"wires":[["70b2bdd2.df8f7c"]]},{"id":"70b2bdd2.df8f7c","type":"change","z":"8ed637d.a0a6448","name":"","rules":[{"t":"set","p":"canid","pt":"msg","to":"100","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":330.7833251953125,"y":150.83334350585938,"wires":[["f8373930.780ef8","593b8ff0.242cb8"]]},{"id":"9d4958ed.aeca2","type":"inject","z":"8ed637d.a0a6448","name":"","topic":"","payload":"192#xyzabc","payloadType":"str","repeat":"","crontab":"","once":false,"x":160.7833251953125,"y":216.00003051757812,"wires":[["f8373930.780ef8","593b8ff0.242cb8"]]},{"id":"3ffcc1fe.137d46","type":"inject","z":"8ed637d.a0a6448","name":"","topic":"","payload":"hello","payloadType":"str","repeat":"","crontab":"","once":false,"x":142.78334045410156,"y":271,"wires":[["f8373930.780ef8","593b8ff0.242cb8"]]},{"id":"593b8ff0.242cb8","type":"cansend","z":"8ed637d.a0a6448","config":"245413cb.1c6014","canid":"","payload":"","x":587.0833129882812,"y":252.0833740234375,"wires":[]},{"id":"170b039d.f543fc","type":"inject","z":"8ed637d.a0a6448","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":143.78330993652344,"y":323,"wires":[["593b8ff0.242cb8","f8373930.780ef8"]]},{"id":"b4dc163f.58e788","type":"inject","z":"8ed637d.a0a6448","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":149.0833282470703,"y":377.0833435058594,"wires":[["5361baf3.55204c"]]},{"id":"5361baf3.55204c","type":"change","z":"8ed637d.a0a6448","name":"","rules":[{"t":"set","p":"canid","pt":"msg","to":"320","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":334.0832824707031,"y":378.08335876464844,"wires":[["f8373930.780ef8","593b8ff0.242cb8"]]},{"id":"a6ee6089.672528","type":"inject","z":"8ed637d.a0a6448","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"x":117.78334045410156,"y":438.00001525878906,"wires":[["46369bb9.c05d4c"]]},{"id":"46369bb9.c05d4c","type":"function","z":"8ed637d.a0a6448","name":"","func":"var buf=new Buffer(4);\nfor(var i=0;i<4;i++)\n buf[i]=64+parseInt(Math.random()*26);\nmsg.payload=buf;\nreturn msg;","outputs":1,"noerr":0,"x":349.7832946777344,"y":465.1666259765625,"wires":[["593b8ff0.242cb8"]]},{"id":"245413cb.1c6014","type":"canconfig","z":"","channel":"vcan0","bitrate":"100000"}]