IpWay/RT...a new TCP/IP library for ChibiOS/RT

This forum is about you. Feel free to discuss anything is related to embedded and electronics, your awesome projects, your ideas, your announcements, not necessarily related to ChibiOS but to embedded in general. This forum is NOT for support.
gdimartino
Posts: 6
Joined: Fri Jul 17, 2015 10:54 am

IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gdimartino » Fri Jul 17, 2015 11:05 am

Hi All,

I'm glad to present you a new Tcp/Ip library: IpWay.

IpWay/RT is a tcp/ip stack library designed for real time embedded applications where execution efficiency and compact code are important requirements. IpWay is characterized by high portability, compact size and copyless feature also for application based on TCP protocol.

It is inspired to AUTOSAR Tcp/Ip Stack, so is very simple to port it on AUTOSA MCAL drivers.

In attached you can find a simple project done for STM32F407-OLIMEX_E407 board, and based of ChibiOS ver 3.0.0.

I would be very happy if you can have look it and give me your feedbacks to improve my project.

Best Regards.
Giovanni.
Attachments
RT-STM32F407-OLIMEX_E407-IPWAY-FATFS-USB.zip
(184.45 KiB) Downloaded 315 times

gallegojm
Posts: 42
Joined: Mon Apr 06, 2015 2:02 am
Location: Cumaná, Venezuela
Contact:

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gallegojm » Thu Aug 06, 2015 6:59 pm

Hi
Being curious, I look at your code.
There is something I do not understand.
Is http_server() function complete (in web/web.c)?
Looks like it misses a loop with the call to function http_server_serve(), unless I really do not understand the code :oops:
Jean-Michel

gdimartino
Posts: 6
Joined: Fri Jul 17, 2015 10:54 am

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gdimartino » Wed Aug 12, 2015 11:35 am

Hi Jean-Michel,

Thanks for your interesting to my post.

IpWay defines the "SocketIf" level as interface to application, so you can find it in binding/socket_if/src/SocketIf.c...in this file you can find the call to http_server_serve().

http_server() funcion is called just once to create the socket for the web application.

Unfortunately I forgot to add an UM in the package but you can get it from http://sourceforge.net/projects/ipway/ there is also an image that describes the architecture of IpWay/RT.

Best Regards,
Giovanni Di Martino.

gallegojm
Posts: 42
Joined: Mon Apr 06, 2015 2:02 am
Location: Cumaná, Venezuela
Contact:

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gallegojm » Mon Aug 17, 2015 12:29 am

Hi Giovanni
Now the demo is working :D
I want to port my little web server to your library. But I fall in a problem:
Apparently, function http_server_serve() is not called when the length of the received data is odd.
The bug is easy to simulate with the demo.
Calling the server with, for example, http://192.168.1.30/Abcde.html works.
But it does not work with http://192.168.1.30/Abcd.html (one character less)
Jean-Michel

gdimartino
Posts: 6
Joined: Fri Jul 17, 2015 10:54 am

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gdimartino » Tue Aug 18, 2015 7:16 am

Hi Jean-Michel,

Now I cannot debug the code because i don't have the board with me I'm on vacation now I'll be back next week. :)

Any way, Did you try with another name of web page, always even, but with more then 4 characters, example Abcdef.html? It seams, but I'm not sure, that the problem is the following check in web.c file...(line 40)

...
if (Length>=5 &&....

If this is the problem it means that I the parameter Length passed to http_server_serve() is wrong...

As soon as I'll be back I'll check this issue better...

many thanks.
Giovanni.

gallegojm
Posts: 42
Joined: Mon Apr 06, 2015 2:02 am
Location: Cumaná, Venezuela
Contact:

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gallegojm » Tue Aug 18, 2015 6:54 pm

Hi Giovanni
First of all, have a nice holiday!
And may I suggest you read the rest of this message once your holiday is unfortunately over 8-)

Did you try with another name of web page, always even, but with more then 4 characters

Yes, for example http://192.168.1.30/Abcdefghijklmnopqrstuvwxy.html works but http://192.168.1.30/Abcdefghijklmnopqrstuvwxyz.html don't

The problem is not at web.c
With an odd data length, the function http_server_serve() is not reached. Nor is SIF_Cbk()
As far as I can see, the problem is in function IWF_Tcp_RxSeg(), called at line 399 of function IWF_Cbk()

But these days, please set the priority of thread "vacation" to value HIGHPRIO or even ABSPRIO

Jean-Michel

gdimartino
Posts: 6
Joined: Fri Jul 17, 2015 10:54 am

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gdimartino » Mon Aug 24, 2015 4:53 pm

Hi Jean-Michel,

I have come back from vacation...unfortunately...

I tried on my side the Abcd.html page and on my side works...

To simplify the test I set the STATIC IP address, whereas in the package released I have used DHCP but is the same...therefore in IpWay_Cfg.h file I have the following setting now

#define IWD_IP_ADDR_ASSIGN_MTD_DHCP_PRIO 2 /**< @api @brief Priority of DHCP Ip Address Assigment method */
#define IWD_IP_ADDR_ASSIGN_MTD_STATIC_PRIO 1 /**< @api @brief Priority of STATIC Ip Address Assigment method */
#define IWD_IP_ADDR_ASSIGN_MTD_AUTOIP_PRIO 3 /**< @api @brief Priority of AUTOIP Ip Address Assigment method */

I put in attached the screeshot that shows the correct Abcd.html.png page in the memory, when PC is in SIF_Cbk() function...let me know...

Did you modify something in IpWay_Cfg.h file?

Best Regards
Gianni.
Attachments
Abcd.html.png

gdimartino
Posts: 6
Joined: Fri Jul 17, 2015 10:54 am

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gdimartino » Wed Aug 26, 2015 10:48 am

Hi,

in attached you can find the demo ported on IpWay_0.7.4.

Best Regards
Attachments
RT-STM32F407-OLIMEX_E407-IPWAY-FATFS-USB.zip
Demo ported on IpWay_0.7.4
(437.55 KiB) Downloaded 274 times

gallegojm
Posts: 42
Joined: Mon Apr 06, 2015 2:02 am
Location: Cumaná, Venezuela
Contact:

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gallegojm » Fri Aug 28, 2015 5:01 pm

Hi Giovanni
I use the last Chibi Studio and ChibiOs 3.0.1
I download your last zip and unzip it in C:\ChibiStudio\workspace30 , so I make the following changes:
in Makefile

# CHIBIOS = ../../..
CHIBIOS = C:/ChibiStudio/chibios3

include $(CHIBIOS)/os/hal/ports/STM32/STM32F4xx/platform.mk
# include $(CHIBIOS)/os/hal/boards/OLIMEX_STM32_E407/board.mk

in ipway.mk

# IPWAY = $(CHIBIOS)/demos/STM32/RT-STM32F407-OLIMEX_E407-IPWAY-FATFS-USB/ipway/library
IPWAY = C:/ChibiStudio/workspace30/RT-STM32F407-OLIMEX_E407-IPWAY-FATFS-USB/ipway/library

Finally, in IpWay_Cfg.h I modify those two define to match my local net configuration:

IWD_CFG_STATIC_IP_ADDR_NETIF_0
IWD_CFG_STATIC_IP_ADDR_GATEWAY_0

I still have the same problem on my Windows 7 computer. I test under a Windows XP machine with the same strange result.
But it works fine under Linux (Xubuntu) !

If I program the board with my webserver and the lwip library, it works in all cases.

Jean-Michel

gallegojm
Posts: 42
Joined: Mon Apr 06, 2015 2:02 am
Location: Cumaná, Venezuela
Contact:

Re: IpWay/RT...a new TCP/IP library for ChibiOS/RT

Postby gallegojm » Fri Aug 28, 2015 5:05 pm

Hi Giovanni
Is there a way to configure the mac address ?
Jean-Michel

Edited:
Got it: in ipwaythread.h


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 16 guests