EB069 WLAN wifi - how to use

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

EB069 WLAN wifi - how to use

Post by benp »

I updated to flowcode V4.5 and applied the patch from:
http://www.matrixmultimedia.com/mmforum ... lan#p26247
I would like to use the EB069 like I used to do with the EB023 ethernet board
I would like to send and receive data with TCP/IP
With the EB023, I am doing this
TCP initialize
TCP create TCP socket
TCP listen
If connected
SEND data
RECEIVED data

Is this possible with EB069 and how to do this?
I would do:
Initialise
Connect to SSID
If connection status=connect
Send string
Receive incoming

Is this correct or it is more complex (do I need to use command?)
Read connection status is not explained in help. What is returned?
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by Benj »

Hello,

Here is a example program for the EB069 board.
WLAN.fcf
(26.68 KiB) Downloaded 382 times
The datasheet for the module is available from here.

http://www.wiznet.co.kr/UpLoad_Files/Re ... V1.9.1.pdf

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by benp »

The wifi component is like the webserver (for EB023) but for EB069.
What I need is a TCP/IP component like the one on EB023.
In fact, the EB069 wifi is very easy to use with RS232 in TCP/IP or UDP. You only need to send and receive your data on RS232 line. All the configuration is on the EB069/wiz610wi webpage.
That's great because it is possible to use vnet to test the program.
I can post an example if it can help (same flowcode program which work with TCP/IP and UDP!)

My question is: is it possible for you to open the vnet+flowserver protocol. We will try to do a patch which make a fake rs232 and send the TCP and UDP datas to the flowcode simulation. Is it possible for you to explain the vnet protocol?

We will then be able to simulate in flowcode with a third program. We are doing projects with wifi android mobile phone or java on netbook or tablet.

Another easier solution would be that you make a wifi TCP/UDP component which is RS232 like and with vnet capabilities.
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

can you open the vnet protocol

Post by benp »

Can you explain the flowcode protocol with the VNET server? Is it a TCP/IP communication?
We would like a send TCP or UDP direct to flowcode simulation.
If you explain your protocol, we plan to do a quick java patch which transform our tcp or udp data in the flowserver protocol.
Unless matrix multimedia can do it.

Here is an example of student project:
http://www.youtube.com/watch?v=GxySfyV14ng

This is a Segway made by my students.
It is possible to monitor and control it with a wifi tablet in real time.
It was built with E-Blocks inside and the EB023 ethernet board.
We want to do the same kind of project with the new EB069 wifi E-Block
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by Steve »

I'm not sure if this is easy to do and I cannot give out too much information. It is performed by TCP comms, but it is fairly complex.

You should use a tool like Wireshark to spy on the messages sent and received by the VNET server application. A good way of filtering only VNET messages is to set the VNET server running on one PC and then set Flowcode and Wireshark up on another and set Wireshark's filter to "ip.src == IP_OF_VNET_SVR || ip.dst == IP_OF_VNET_SVR". This will display only comms between Flowcode and the VNET server (assuming there is no other comms occuring between these two PCs).

Here are various enumerations that might help you decipher what is going on:

Code: Select all

// CONSTS
#define BUFFER_SIZE			1024
#define HOSTNAME_SIZE		MAX_PATH
#define MAX_NAME			MAX_PATH

static const CString MXL_VNET_DEFPORT	= _T("4360");			// This is tcp port registared and listed by IANA under the name matrix_vnet
static const CString MXL_VNET_REGKEY	= _T("Software\\MatrixMM\\FlowCodeV4\\VNet");

enum MessageType
{
	VNET_NULL_MSG = 0,
	VNET_PING_MSG,

	VNET_LIST_REQ,
	VNET_LIST_RSP,

	VNET_INIT_REQ,
	VNET_INIT_ACK,

	VNET_JOIN_REQ,
	VNET_JOIN_ACK,

	VNET_QUIT_MSG,
	VNET_DESTROY_MSG,

	VNET_NODES_UPDATE,

	VNET_MEMBER_ADD,
	VNET_MEMBER_REMOVE,

	VNET_DIAG_REQ,
	VNET_DIAG_UPDATE,

	VNET_VBUS_MSG,

	VNET_GSIM_READY,
	VNET_GSIM_NOT_READY,

	VNET_GSIM_GO,
	VNET_GSIM_PAUSE,
	VNET_GSIM_STOP,

	VNET_GSIM,
	VNET_GSIM_REQ,
	VNET_GSIM_STATE,
	VNET_GSIM_ACK,
	VNET_SVR_PING,

	VNET_GSIM_HOLD,
	VNET_GSIM_RELEASE
};


enum VBusMessageType
{
	VBUS_MSG = 1
};


struct RawMessage
{
	LPBYTE	lpBuffer;
	DWORD	dwNumBytes;
};

typedef struct tagMessage
{
	char			msgID[MXUUID_LENGTH];	// Unique msg ID (UUID)
	MessageType		msgType;				// Message Type ID
	size_t			current;				// current message fragment number
	size_t			total;					// total message fragments
	size_t			totalNumBytes;			// total number of bytes in this message
	BYTE			body[BUFFER_SIZE];		// message payload buffer
} Message;


typedef struct tagVBusMessage
{
	VBusMessageType	vBusMsgType;			// Message Type ID
	TCHAR			node[MAX_NAME];			// current message fragment number
	long			protocol;				// the message protocol
	size_t			size;					// size of the data buffer
} VBusMessage;

typedef std::pair<VBusMessage, LPBYTE> VBusMsg;

enum VProtocol
	{
		ProtocolNone,

		ProtocolPin,      //this is a directly-connected pin

		ProtocolCAN,
		ProtocolLIN,

		ProtocolSPI,
		ProtocolI2C,
		ProtocolRS232,

		ProtocolMIDI,
		ProtocolIRDA,
		Protocol1Wire,
		ProtocolZigbee,
		ProtocolMAC,
		ProtocolX10
	};

I hope this helps get you started.

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by benp »

Thank you.
I had a quick look in wireshark.
If I have understood, I have to describe 28 objects and their TCP ethernet flow. That's a big job (with very few informations).
I don't think I have enough time to do this.
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by benp »

Here is a very raw example which show how to use the EB069 without the wifi component.
It is very very easy to use because data are send with the RS232 so it is possible to simulate send and receive data.
wlan-rs232v2-raw.fcf
(12 KiB) Downloaded 306 times
You can use netstuff to connect to the EB069 wlan and see the effect of trigger, reset (see the onboard wiznet chip usermanual for more information) , the limit size of the RS232 buffer.

That one is easier to use. It simply echoes the received data. The datas from the wiznet are displayed at the beginning (protocol, ip adress, port, siid wifi name ...) but this is not necessary.
wlan-rs232v8.-init no buffer.fcf
(18 KiB) Downloaded 311 times
It uses the hardware RS232 buffer, so it is not possible to receive more than 4 bytes per sending. RS232 interupt must used for more than 4.
Both works with TCPIP and UDP because configuration is inside de module webpage and not in flowcode.

It is very easy to do a real time data wifi sending on a computer (analogue data for example).
I could write a simple article which show how to send data, receive visualise with netstuff and treat the datas with excel.
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

benp
Posts: 155
Joined: Sat Mar 28, 2009 5:44 pm
Location: LYON FRANCE
Has thanked: 3 times
Been thanked: 41 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by benp »

I think that you can now undertand how we work with the wifi eblock with that post:
http://www.matrixmultimedia.com/mmforum ... f=2&t=9949

We use the RS232 component to send/receive data from wifi.

We want to simulate the ethernet communication inside flowcode. That's possible on the android side with eclipse virtual device.
If you can do this, it would be possible to switch on a Flowcode led from an android virtual device or a true device!

Maybe vnet is not the easiest way for you.

You could start with udp because that's more simple to use. TCP can be useful too because more robust.
What is needed is to redirect the datas from/to the rs232 to udp (with adress and port number parameter only).

option1:VNET
option2:RS232-data from/to rs232 are redirect from/to an udp port&ip adress
option3:new component copied from rs232 but with true tcp/udp capabilities. It would be easier if it is possible to adjust the same parameter as in the web interface from the EB069 module(especially serial settings)

Maybe option3 is the best.

Jonh told me that it can be possible for you to work on this.
Regards
INSA 1er cycle GCP projects with or without eblocks:
http://www.youtube.com/user/INSAgcp

User avatar
Steve
Matrix Staff
Posts: 3418
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: EB069 WLAN wifi - how to use

Post by Steve »

This is such a great idea, and thanks for sharing this with us.

Right now, though, we are all concentrating of Flowcode V5 and getting this released. I will have some time to look at this in the New Year and hopefully help you then.

Post Reply