1 / 39

Développement d'un driver radio pour réseau de capteurs

Développement d'un driver radio pour réseau de capteurs. Orange Labs Matthieu ANNE & Julien TOUS , Recherche & Développement jeudi 23 octobre 2008 , présentation pour le Master 2 « Electronique des Télécommunications » de l'Université de Savoie. sommaire.

oihane
Télécharger la présentation

Développement d'un driver radio pour réseau de capteurs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Développement d'un driver radiopour réseau de capteurs Orange Labs Matthieu ANNE & Julien TOUS, Recherche & Développement jeudi 23 octobre 2008,présentation pour le Master 2 « Electronique des Télécommunications » de l'Université de Savoie

  2. sommaire partie 1 Présentation générale du projet partie 2 Think : Infrastructure de développement de logiciels à base de composants partie 3 Exemple : eNose partie 4 Objectifs du projet Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  3. Partie 1 : Présentation générale du projet Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  4. Le groupe Orange c’est: Dans le monde: Une présence dans 220 pays 170 millions de clients En Europe: Le troisième opérateur mobile Le premier fournisseur d’accès ADSL Un chiffre d’affaire de 52,9 milliards d’euros en 2007 La division R&D : Orange Labs 16 sites répartis sur 4 continents 3800 chercheurs et ingénieurs 8500 brevets Orange Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  5. Réseaux de capteurs • Chaque nœud possède : • Des capacités d'acquisition d'information sur son environnement • Des ressources de calculs • Un système de communication sans fils Principale contrainte : autonomie Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  6. Extension EM2420 Cognichip EM2420 RCM DKcarrierBoard Matériel Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  7. Driver EM2420 • Implémenter un driver pour les puces radio EM2420 • Le driver devra respecter la norme 802.15.4 • Driver sous la forme d'un ensemble de composants Think • Architecture du driver devra faciliter son utilisation sur différentes plateformes (cognichip, EM2420 RCM, …) Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  8. sommaire partie 1 Présentation générale du projet partie 2 Think : Infrastructure de développement de logiciels à base de composants partie 3 Exemple : eNose partie 4 Objectifs du projet Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  9. Partie 2 : ThinkInfrastructure de développement de logiciels à base de composants Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  10. Think en bref • Implémentation "C" du modèle à composant Fractal • Projet "Open source" (GPL) hébergé par Object Web • Langages : • ADL : Architecture Description Language • IDL : Interface Description Language • NuptC: C + annotations • Chaîne de compilation • Bibliothèque de composants Kortex (LGPL): • Composants systèmes : ordonnanceurs, pilots matériels, files d'attentes … • Plateformes : AVR, ARM, MPS 430 Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  11. Le modèle Fractal – en bref • Modèle de composants au développement et à l'exécution • Composant = brique logiciel, unité de composition de déploiement et d'administration • Modèle réflexif • Introspection : connaître la constitution d'un système à l'exécution • Intercession : modification de l'architecture • Modèle récursif • Un composant peut être constitué d'autres composants • Implémentations • Java : Julia (implémentation de référence) • C : Think • Nuptse (V4) : simplification et prise en compte des contraintes relatives à l'embarqué – travaux réalisés et exploités à FT • … Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  12. Les composants Think (1/3) • Un composant : • Fournie des interfaces serveurs • Requière des interfaces clientes • A des attributs interfaces de contrôles interface serveur 1 interface cliente 1 interface serveur n interface cliente m att1, attl, composant Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  13. Les composants Think (2/3) • Le contenu : • Implémente les interfaces serveur • Code fonctionnel NuptC • Sous-composants • La membrane : • Implémente les interfaces de contrôles (ContentController, LifeCycleController,…) • Est facultative interfaces de contrôles membrane Impl interface serveur 1 interface cliente 1 contenu Implem.c interface serveur n interface cliente m sous- composant att1, attl, composant Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  14. Les composants Think (3/3) C • Les liaisons : • Canal de communication d'une interface client vers une interface serveur • Permettent le transfert entre l'interface d'un composant et celle d'un de ses sous-composants interfaces de contrôles liaison membrane Impl interface serveur 1 interface cliente 1 contenu Implem.c interface serveur n interface cliente m sous- composant att1, attl, composant Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  15. ADL ADL ADL IDL IDL IDL NuptC NuptC NuptC C C C La compilation • Haut niveau: • Transformations d'architecture (AST), optimisations (propriétés) • Transforme et génère du code "C" • Bas niveau • Utilisation de gcc pour produire l'image binaire du système ou d'une partie du système pour téléchargement dynamique Think elf gcc/ld Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  16. component helloWorld.lib.helloWorld { provides helloWorld.api.SayHello as hello attribute int repeat content helloWorld } component helloWorld.lib.wishToSayHello { provides activity.api.Main as main requires helloWorld.api.SayHello as hello content wishToSayHello } helloWorld.adl wishToSayHello.adl component main { contains boot = boot.lib.boot contains wtsh = helloWorld.lib.wishToSayHello contains hw = helloWorld.lib.helloWorld assigns hw.repeat = 3 binds boot.entry to wtsh.main binds wtsh.hello to hw.hello } main boot hw entry hello boot.c helloWorld.c wtsh main hello main.adl wishToSayHello.c Architecture Description Language ADL (1/2) Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  17. hw abstract component helloWorld.lib.helloWorld { provides helloWorld.api. as hello attribute int repeat } hello helloWorld.adl component englishHello extends helloWorld.lib.helloWorld { content englishHello } englishHello.adl englishHello frenchHello component frenchHello extends helloWorld.lib.helloWorld { content frenchHello } hello hello englishHello.c frenchHello.c ADL - extension de définition (2/2) frenchHello.adl Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  18. Interface description Language (IDL) (1/2) • Les interfaces des composants sont définies en utilisant l'IDL • Déclaration du type de interface hello (helloworld.api.SayHello.idl) package helloWorld.api; public interface SayHello { void printHello (); } SayHello.idl Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  19. typedef int myType1; typedef struct { myType1 toto; } * myType2; package helloWorld.api; Typedefs myTypes; public interface SayHello { void printHello (char* info, myType2 moreInfo); } myTypes.h SayHello.idl Interface description Language (IDL) (2/2) • type et typedef dans l'IDL Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  20. /* * @@ ClientInterfacePrefix(hello, HELLO_) @@ * @@ DefaultServerMethods @@ */ void main (int argc, char* argv) { HELLO_printHello(); } wishToSayHello.c Programmation des composants (1/2) • nuptC : langage utilisé pour le code fonctionnel • nuptC : langage C + annotations • Annotation = correspondance entre ADL et code C component helloWorld.lib.wishToSayHello { provides activity.api.Main as main requires helloWorld.api.SayHello as hello content wishToSayHello } wishToSayHello.adl Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  21. Programmation des composants (2/2) • Plus d'une 10ème d'annotations • DefaultServerMethods • DefaultClientMethods • DefaultAttributes • PrivateData • PrivateMethod • … • Annotations par défaut • SRV_itf__methodName(…) • CLT_itf__methodName(…) • PRV_methodName(…) • … Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  22. Bibliothèque de composants : Kortex atm2561 |-- boot | `-- lib | |-- boot.adl | |-- head.S | |-- reconf.adl | `-- reconf.c |-- hw | `-- lib | |-- PORTA.adl | |-- PORTB.adl | |-- PORTC.adl | … | |-- PORTJ.adl | |-- PORTK.adl | `-- PORTL.adl |-- irq | |-- api | | `-- TrapHandler.idl | `-- lib | |-- busylock.adl | |-- busylock.c | … | |-- timerType.adl | |-- trap.adl | |-- trap.c | |-- trap_interrupt.adl | `-- trap_interrupt.c `-- net `-- lib |-- traped_usart0.adl |-- usart0.adl |-- usart1.adl `-- usart_sender.adl src |-- arch | |-- arm | |-- avr | |-- msp430 | `-- unix |-- buzz | |-- arch | `-- generic |-- chip | |-- adc | |-- eNose | |-- memory | |-- radio | `-- serialnum |-- generic | |-- activity | |-- boot | … | |-- net | |-- patterns | |-- types.h | |-- util | `-- video `-- platform |-- at91sam7x-ek |-- cognichip2561 |-- em128 `-- ipaq avr |-- activity |-- adc |-- api |-- atm128 |-- atm2561 |-- boot |-- hw |-- irq |-- kortex_types_avr.h |-- kortex_types_avr6.h |-- libc |-- loader |-- memory `-- net PB: très peu de doc  Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  23. sommaire partie 1 Présentation générale du projet partie 2 Think : Infrastructure de développement de logiciels à base de composants partie 3 Exemple : eNose partie 4 Objectifs du projet Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  24. Partie 3 : Exemple eNose Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  25. eNose Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  26. Architecture générale Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  27. Architecture : driver eNose Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  28. boot sensorBoard layout sensors mux dataProcessor manager leds Lego logiciel & matériel Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  29. boot sensorBoard layout sensors mux dataProcessor manager leds Lego logiciel & matériel Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  30. package hw.api; public interface BitControl { void set(); void unset(); kt_native get(); } BitControl.idl Chip ltc2408 : description ltc2408 component adc.ltc2408.lib.ltc2408 { provides adc.ltc2408.api.MuxChannelControl as channelControl provides adc.ltc2408.api.GetAdcData as getData requires activity.api.Delay as wait requireshw.api.BitControl as sck // synchro clock requireshw.api.BitControl as chipSelect //CS requireshw.api.BitControl as channelSelect //DIN requireshw.api.BitControl as data //SDO (Serial Data Output) … } wait chanelControl sck chipSelect ltc2408.adl channelSelect getData data Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  31. Chip ltc2408 : code fonctionnel (convertisseur) … //@@ PrivateMethod @@ kt_native getDataBit(){ kt_native dataBit; SCK_set(); WAIT_udelay(CLOCK_LENGTH); dataBit = DATA_get(); SCK_unset(); WAIT_udelay(CLOCK_LENGTH); return dataBit; } … // getData server method ltc2408_data_t getData(){ kt_u8 i; … for(i=0; i<DATA_SIZE; i++){ muxData.data = muxData.data << 1; muxData.data |= getDataBit(); } … return muxData; } /** * @@ DefaultServerMethods @@ * @@ ClientInterfacePrefix (wait, WAIT_) @@ * @@ ClientInterfacePrefix (sck, SCK_) @@ * @@ ClientInterfacePrefix (chipSelect, CS_) @@ * @@ ClientInterfacePrefix (data, DATA_) @@ */ … ltc2408.c ltc2408.c Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  32. layout wait porta lcc sck gpio sck porta chipSelect chipSelect portd channelSelect portd channelSelect gpio data data component cognichip2561.eNose.eNoseLayout { provides fractal.api.LifeCycleController as lcc provides hw.api.BitControl as sck // synchro clock provides hw.api.BitControl as chipSelect //CS provides hw.api.BitControl as channelSelect //DIN provides hw.api.BitControl as data //SDO //(Serial Data Output) requires hw.api.GPIO as porta requires hw.api.GPIO as portd content cognichip2561.eNose.eNoseLayout } layout.adl //@@ ServerInterfacePrefix (sck, SCK_) @@ //@@ ClientInterfacePrefix (porta,PORTA_) @@ #define SCK_BIT 0x02 … void SCK_set(){ PORTA_set_POUT(PORTA_get_POUT() | SCK_BIT); } void SCK_unset(){ PORTA_set_POUT(PORTA_get_POUT() & ~SCK_BIT); } kt_native SCK_get(){ if (PORTA_get_POUT() & SCK_BIT) return 1; else return 0; } … // @@ DefaultServerMethods (lcc) @@ void start(){ //defining ios //out xxxx 111x PORTA_set_PDIR(PORTA_get_PDIR() | 0x0E); //in xxxx 0xxx PORTD_set_PDIR(PORTD_get_PDIR() & ~0x08);} void stop(){ } Composant Layout ltc2408 layout.c Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  33. sommaire partie 1 Présentation générale du projet partie 2 Think : Infrastructure de développement de logiciels à base de composants partie 3 Exemple : eNose partie 4 Objectifs du projet Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  34. Partie 4 : Objectifs du projet Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  35. I/ Driver bas niveau EM2420 • Faire communiquer deux 2 cartes Ember EM2420 RCM [7](DkcarrierBoard.pdf [8]) par liaison radio hadhoc (couche MAC et supérieur). A ce niveau, les deux composants logiciels principaux à fournir sont les composants « phy-cc2420 » et « layout ». Le composant phycc2420 est en charge de l'implémentation de la couche physique du protocole 802.15.4 [9]. Quand au composant layout, il doit permettre l'abstraction du matériel afin de facilité la portabilité. • Définition des interfaces et du composant phy-cc2420 ainsi que son implémentation. • Assemblage du composant layout pour la carte EM2420 RCM à partir des composants bas niveau existants dans la bibliothèque Kortex (gpio...). Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  36. II/ Driver multi-plateformes • L’objectif est de faire communiquer un Cognichip (carte d'expérimentation d'Orange (Atm2561 + extension EM2420)) et la carte EM2420 RCM par une liaison radio hadhoc (couche MAC et supérieur). • Définition d'un composant layout pour le Cognichip à partir des composants bas niveau existants dans la bibliothèque Kortex (gpio...). Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  37. III/ Sur-couche 802.15.4 • L'objectif visé ici est l'implémentation de la couche MAC de la norme 802.15.4. Cet objectif est divisé en trois étapes. Ci-dessous un schéma représentant les applications correspondant à l'objectif 3. • Étape 1 : Implémentation partielle (Reduced Function Device) capable de s'insérer dans un réseau 802.15.4 existant. L’objectif est de faire communiquer le Cognichip et/ou la carte EM2420 RCM avec un device 802.15.4 banalisé, par exemple la carte EM2420 RCM avec le logiciel propriétaire fournis par Ember. Pour cela il faudra définir les interfaces et le composant MAC-802.15.4 ainsi que son implémentation. • Étape 2 : Création d'un réseau 802.15.4 aux fonctionnalités partielles Utiliser le Cognichip comme coordinateur 802.15.4 (Full Function Device) avec la carte Ember comme end-device. (Note malgré la dénomination « Full Function Device » cet implémentation pourra se limiter à un sous ensemble de 802.15.4 commun avec le « Reduce Function Device » développé précédemment.) • Étape 3 : Implémentation complète de la norme 802.15.4 Cognichip coordinateur, capable de supporter n'importe quel EndDevice 802.15.4 Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  38. Organisation du travail • Prise en main de Think • http://think.objectweb.org/getting_started.html • Travaux pratiques • Vendredi 7 novembre 2008 • Leds, buzzer, boutons… (DKcarrierBoard) • Subversion • Création de comptes sur ObjectWeb • Branche du projet dans kortex • Contact: • matthieu.anne@orange-ftgroup.com • jtous.ext@orange-ftgroup.com • ruan.he@orange-ftgroup.com Orange Labs - Recherche & Développement – Driver radio EM2420 – 23/10/2008

  39. Bon courage!

More Related