Menu

Tree [r3] /
 History

HTTPS access


File Date Author Commit
 CoapMulticastForwarder 2016-12-25 fchaxel [r2] Full code
 LinuxFiles 2016-12-25 fchaxel [r2] Full code
 NodeBuilderFiles 2016-12-25 fchaxel [r2] Full code
 MIT_license.txt 2016-12-24 fchaxel [r1] First code
 README.txt 2016-12-29 fchaxel [r3]
 SharpPcap License-LGPL.txt 2016-12-25 fchaxel [r2] Full code

Read Me

-------------------------------------------------------------------------------
                     CoAP On Lonworks for Neuron 6000 IC
-------------------------------------------------------------------------------

1.  INTRO

	1.1 ABOUT
		CoAP_On_Lon is a very simple CoAP server protocol implementation
 		from scratch, for Neuron 6000 Chips & Izot Router. 
 		Observe service is not implemented today.
	
		This project is only for application developpers not for end users.

	1.2 CREDITS
		The project was created by F. Chaxel, in 2016.

2.  Neuron C codes

	2.1 Echo server on UDP
 		As a basic demo to shows how UDP datagrams should be handle
 		on Neuron 6000, includes echo.nc in NodeBuilder project.
 		If using one of the Bacnet sample, one could see :

 		 		when(msg_arrives)
 		 		{
	
 		 		    if (check_BACnet_msg())
 		 		        return;
 		 		 }

 		... just adds before the closing braket

 		 		if (do_Echo_msg())
 		 		    return;

		Trys it with an UDP echo client (or PacketSender), port 7.

	2.2 CoAP server on UDP

		Includes Coap.nc. This code assumes the existance of :
			MesureLumiere as an nvo SNVT_lux (Sensor data)
				network output far SNVT_lux MesureLumiere;
			ConsigneLumiere as an nvi SNVT_lux (Setpoint)
				network input far SNVT_lux ConsigneLumiere;

		Add one call to the init function when reset:
				init_CoAP(); 

		Modify the msg_arrival handler :
 		 		if (do_CoAP_msg())
		 		    return;
	
		Trys it with an CoAP Client such as Copper CU on Firefox.
		(Since Firefox 43 you need to allow unsigned add-ons by opening
		about:config and setting xpinstall.signatures.required to false).

3.  Multicast forwarding

	3.1 Concept
		Multicast on IP 224.0.1.187 is used to discovers CoAP servers
		in the surrounding. But the Izot Router do not forwards these 
		messages from Ethernet to Lon.
		So a mutlicast 'forwarder' should be installed on it.

		It has to listen on the multicast @ and send the requests on Lonworks.
		This can be simply done with a classic Udp endpoint on the both
		interfaces : broadcast on Lonworks rather than multicast (I don't know
		how to do !).
		But in such a case the Neuron 6000 receives request from the Izot router,
		and send it back to it (not to the real client).
		The Izot must send the reply to the real client, but not with it's
		endpoint : the Neuron 6000 endpoint must be in the reply.
		This cannot be done on top of Udp, only a pure ethernet packet (with
		IP/UDP header done by hand !) : listening raw data on Lon, changing on
		the fly the IP header (and Udp) and sending on ethernet is a way : using
		SharpPcap.dll library (and libpcap tool).

	3.1 Implementation
		Code is done in C#. So mono must be installed before on the router.
		Libpcap also but it's seems to be already done (with LonBridge code ?).

		This is a proof of concept. See source code or only linuxFiles.

		CoapMulticastForwarder.exe, PacketDotNet.dll & SharpPcap.dll must be
		copied on the router with two config files.

		app.config must be modified : 
		only the MyIP and MyMask fields (Lonworks side @, not ethernet !).

		SharpPcap.config should be modify to point to libcap.so

		CoapMulticastForwarder.exe must be started in sudo mode.

		A pure C code will be better. Maybe a day by me ... or Echelon why not,
		and also a new entry to start it automatically by supervisord.		
		
4.  Support
	There's no support for the project at this time, and certainly never. 
	If you write to me, I'm unlikely to answer. 

5.  Report errors
	Yes, there be errors alright. There always are. Many won't be interesting
	though. Eg. if you find a computer that behaves differently from others, 
	I'm unlikely to care. This is not a commercial project and I'm not trying 
	to push it to the greater good of the GPL world. (This may change though.)
	If you find a bug, write to me using the Sourceforge link..

6.  Contribute
	Really? You think it's missing something? It's not really meant as a huge 
	project, but if you really must, try contacting me using the Sourceforge
	link.

7. Misc
	Project web page is located at: 
	https://sourceforge.net/projects/CoAP-On-Lon/

	Lonworks, Neuron, Nodebuilder, Izot are trademarks of Echelon Corporation.