CoAP Gateway for "Web of Things"

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.
jpnorair
Posts: 4
Joined: Tue Jan 31, 2012 8:31 am
Location: San Francisco, California
Contact:

CoAP Gateway for "Web of Things"

Postby jpnorair » Tue Jan 31, 2012 9:04 am

Hello: There are two things on my mind.

1. There is a CoAP plugtest in Paris on 24 March where I would like to test my project. My project is OpenTag, an implementation of a really light, really efficient wireless standard for devices (DASH7). CoAP is a UDP-based lightweight version of HTTP designed for MCU-based devices. Implementing CoAP on top of OpenTag will not be a big challenge, but I plan on doing it for the plugtest.

2. My original plan was to have the CoAP gateway running as software on my PC. Ethernet would go in the PC, carrying IPv6 + UDP + CoAP, and out of the PC would go a USB wire communicating with my OpenTag controller (using the OpenTag API protocol). Then I thought it would be very nice to use something like the STEVAL-PCC010V2 board to run the CoAP gateway instead of the PC. I would need to plug in an OpenTag board, but that is easily possible.

Here is a page showing the STEVAL-PCC010V2:
http://www.st.com/internet/evalboard/product/251530.jsp

Alternatively, I could use the STEVAL-PCC010V1 or STEVAL-PCC012V1, depending on what I can get in time, and what is the easiest drop-in.

In any case, I am looking for a nice package that contains an RTOS (ChibiOS is one I admire), Ethernet MAC driver, lwIP, and maybe a minimal HTTP web server or other sort of administration tool. I will produce the CoAP gateway.

What I am asking is: I do not have a lot of time to make this, so is there any ChibiOS user who has done something like this? I would rather go this direction than, for example, setting up a Beagleboard with Linux because the ChibiOS setup is something I could eventually minimize quite substantially. I like the idea of having a low-cost, low-power three-chip solution for the entire gateway: Ethernet PHY + STM32 + DASH7 PHY.

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: CoAP Gateway for "Web of Things"

Postby mabl » Tue Jan 31, 2012 1:53 pm

Hello jpnorair,

did you have a look at the STM32 Ethernet thread at viewtopic.php?f=3&t=23 ? Basically it is a hackish wrapper around the ST ethernet library. I juse it in my projects and it is very stable now. It should run on the STM32F107, the 207/407 might need some smaller adjustments.

jpnorair
Posts: 4
Joined: Tue Jan 31, 2012 8:31 am
Location: San Francisco, California
Contact:

Re: CoAP Gateway for "Web of Things"

Postby jpnorair » Tue Jan 31, 2012 9:56 pm

I did see that thread. It seems to be built into ChibiOS now: /os/hal/include/mii.h & mac.h. Am I wrong?

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: CoAP Gateway for "Web of Things"

Postby mabl » Tue Jan 31, 2012 10:04 pm

The code which is included in ChibiOS is supposed to be a clean functional replacement one day. It far from functional yet. Currently, you either have to use the wrapper (ugly but generally trouble free once it works) or implement the missing parts of the new ChibiOS driver.

jpnorair
Posts: 4
Joined: Tue Jan 31, 2012 8:31 am
Location: San Francisco, California
Contact:

Re: CoAP Gateway for "Web of Things"

Postby jpnorair » Wed Feb 01, 2012 12:04 am

OK: I've been thinking about this today, and I think I will try to pick up the Olimex STM32F107 dev board. I would really like to have an STM32F207/217 setup, but that will take some time that I don't have... it can wait, though. I will prove the idea on the F107 and then port ChibiOS and other relevant modules to the F207.

In summary, I need to achieve:
ChibiOS + Ethernet + lwIP + CoAP gateway + OpenTag Message API

Optional other things:
- USB Device-Class Printer communication interface (good for using with home routers that have printer support)
- OpenTag integration onto the same MCU
- (a) easier: as independent task that operates outside ChibiOS, and uses Message API to communicate (like interprocess pipe)
- (b) harder: as a group of ChibiOS tasks/threads, using stack/globals for inter-task communication

Anyway, I will be posting to this forum thread over the next 8 weeks to give status updates. I have about 2-3 weeks of other work to do before I get seriously started with this project.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: CoAP Gateway for "Web of Things"

Postby Giovanni » Wed Feb 01, 2012 9:16 am

Hi,

It is a very interesting project.

About your point (b), there are a variety of inter-thread communication mechanisms in ChibiOS, don't assume it is complex task, if you explain what you need to implement we could assist in selecting the most appropriate way. Usually mailboxes are very easy to use and efficient if you need to exchange data between threads (coupled with memory pools if you need to exchange large objects). An interesting use case are those "IRQ-STORM" test applications where many threads exchange messages at an ever increasing rate.

The Ethernet driver will be completed after releasing the version 2.4.0, it is one of the first items in the todo list.

Giovanni

jpnorair
Posts: 4
Joined: Tue Jan 31, 2012 8:31 am
Location: San Francisco, California
Contact:

Re: CoAP Gateway for "Web of Things"

Postby jpnorair » Wed Feb 01, 2012 10:21 am

What is the estimated release date for 2.4.0? I don't have a problem using the "wrapper" for now, but if I end up using this device for a product, then of course I'm interested in using the most official version.

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: CoAP Gateway for "Web of Things"

Postby mabl » Wed Feb 01, 2012 10:33 am

I think the release is imminent within the next few days. Regarding the wrapper and the official driver: They both support the Chibios driver interface - so from an application point of view it does not matter which driver you use and you can easily switch between them.

User avatar
Giovanni
Site Admin
Posts: 14455
Joined: Wed May 27, 2009 8:48 am
Location: Salerno, Italy
Has thanked: 1076 times
Been thanked: 922 times
Contact:

Re: CoAP Gateway for "Web of Things"

Postby Giovanni » Wed Feb 01, 2012 10:36 am

Correct, you can start with the wrapper then switch to the native driver with minimal effort.

I hope to release 2.4.0 in the weekend.

Giovanni


Return to “User Projects”

Who is online

Users browsing this forum: No registered users and 19 guests