issue116:tuto2
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue116:tuto2 [2017/01/11 09:48] – d52fr | issue116:tuto2 [2017/01/13 14:31] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 2: | Ligne 2: | ||
In the previous part of this series, we put our complete application together using Free Vision for the user interface, Sqlite to create a local database, and CURL and XML to retrieve fresh data from an RSS feed from the Web to update our database. In this part, we will see various ways in which our application can run on a Raspberry Pi.** | In the previous part of this series, we put our complete application together using Free Vision for the user interface, Sqlite to create a local database, and CURL and XML to retrieve fresh data from an RSS feed from the Web to update our database. In this part, we will see various ways in which our application can run on a Raspberry Pi.** | ||
+ | |||
+ | Dans cette série d' | ||
+ | |||
+ | Dans l' | ||
**The Raspberry Pi family and Ubuntu | **The Raspberry Pi family and Ubuntu | ||
Ligne 8: | Ligne 12: | ||
The Raspberry Pi family is actually based on two different series of processors: the RPi versions A, B, and B+ have a Broadcom System-on-a-Chip (SOC) based on the ARMv6 architecture, | The Raspberry Pi family is actually based on two different series of processors: the RPi versions A, B, and B+ have a Broadcom System-on-a-Chip (SOC) based on the ARMv6 architecture, | ||
+ | |||
+ | La famille Raspberry Pi et Ubuntu | ||
+ | |||
+ | La famille d' | ||
+ | |||
+ | La famille Raspberry Pi est, en fait, basée sur deux types différents de processeurs : les versions A, B et B+ du RPi ont un SOC (System-on-Chip - système sur une puce) Broadcom sur une architecture ARMv6, alors que les modèles RPi 2 et RPi 3 sont basés sur une architecture ARMv7. Ceci a des conséquences pour le système d' | ||
**On the other hand, for the earlier ARMv6 versions of the RPi, we will need to get a Debian (Raspbian) image. Raspbian is a very acceptable alternative for Ubuntu Server, with only two major differences. The first one is the default user (login name: pi / password: raspberry) instead of Ubuntu’s (ubuntu/ | **On the other hand, for the earlier ARMv6 versions of the RPi, we will need to get a Debian (Raspbian) image. Raspbian is a very acceptable alternative for Ubuntu Server, with only two major differences. The first one is the default user (login name: pi / password: raspberry) instead of Ubuntu’s (ubuntu/ | ||
However, for both versions, we find clues to indicate that the main target of the Free Pascal project is, indeed, the Intel 32-bit architecture. A few of the libraries do not seem to have been carried over correctly to the ARM build. For our project, the only one of note is the XMLReader unit, so we will not be able to implement the RSS reader, while the other libraries (Free Vision, Database and CURL) seem to work correctly. This would no doubt be a minor inconvenience, | However, for both versions, we find clues to indicate that the main target of the Free Pascal project is, indeed, the Intel 32-bit architecture. A few of the libraries do not seem to have been carried over correctly to the ARM build. For our project, the only one of note is the XMLReader unit, so we will not be able to implement the RSS reader, while the other libraries (Free Vision, Database and CURL) seem to work correctly. This would no doubt be a minor inconvenience, | ||
+ | |||
+ | D'un autre côté, pour les versions plus anciennes du RPi en ARMv6, nous aurons besoin d'une image Debian (Raspbian). Raspbian est une alternative très acceptable à Ubuntu Server, avec seulement deux différences majeures. La première est l' | ||
+ | |||
+ | Cependant, pour les deux versions, vous trouvez des indications pour signaler que la cible principale du projet Free Pascal est, bien sûr, l' | ||
**In any case, it may be worth noting that programs compiled for the Intel 32- or 64-bit architectures will not work directly on an RPi, since the processor architecture is different and the machine language instruction sets are not compatible. This means a re-compile will be required. There are two techniques to do so. | **In any case, it may be worth noting that programs compiled for the Intel 32- or 64-bit architectures will not work directly on an RPi, since the processor architecture is different and the machine language instruction sets are not compatible. This means a re-compile will be required. There are two techniques to do so. | ||
Ligne 18: | Ligne 32: | ||
Since the RPi has sufficient power to compile its own programs on-board without being too slow about it, I would suggest readers go this route and avoid delving into cross-compiling.** | Since the RPi has sufficient power to compile its own programs on-board without being too slow about it, I would suggest readers go this route and avoid delving into cross-compiling.** | ||
+ | |||
+ | De toute façon, il vaut mieux garder en tête que les programmes compilés pour les architectures 32- et 64-bit d' | ||
+ | • La première consiste à installer le compilateur Free Pascal sur le RPi cible, puis à simplement transférer dessus nos fichiers source en Pascal. Ils sont recompilés par le RPi lui-même. Une fois terminé, les fichiers binaires (les programmes exécutables) peuvent être copiés et utilisés directement sur d' | ||
+ | • Une seconde technique peut présenter de l' | ||
+ | |||
+ | Comme le RPi est assez puissant pour compiler lui-même ses propres programmes sans être trop lent, je suggère aux lecteurs de suivre cette solution et d' | ||
**Using the Raspberry Pi directly | **Using the Raspberry Pi directly | ||
Ligne 28: | Ligne 48: | ||
Depending on the foreseen use of the device, a user could even be automatically logged into the console, and the Free Vision application launched immediately upon login.** | Depending on the foreseen use of the device, a user could even be automatically logged into the console, and the Free Vision application launched immediately upon login.** | ||
+ | |||
+ | Utiliser directement le Raspberry Pi | ||
+ | |||
+ | Toutes les générations du Raspberry Pi ont une sortie pour connecter un écran, une sortie vidéo composite (le jack jaune RCA) pour les versions A et B, et une HDMI sur tous. Il y a aussi un port USB pour connecter un clavier externe ; ainsi, rien de plus n'est nécessaire pour utiliser un RPi comme terminal pour faire tourner un programme Free Vision. | ||
+ | |||
+ | L' | ||
+ | |||
+ | Les applications sont assez réactives, même sur un vieux modèle B. Les 512 Mo de RAM du RPi ne sont pas surchargées, | ||
+ | |||
+ | Suivant l' | ||
**The Raspberry as an application server | **The Raspberry as an application server | ||
Ligne 36: | Ligne 66: | ||
apt install wpasupplicant** | apt install wpasupplicant** | ||
+ | |||
+ | Le Raspberry Pi comme serveur d' | ||
+ | |||
+ | Une des belles caractéristiques des applications Free Vision est qu' | ||
+ | |||
+ | Le Raspberry Pi nous permet d' | ||
+ | |||
+ | apt install wpasupplicant | ||
**Now, we need to create a hash of our WiFi’s WPA key: | **Now, we need to create a hash of our WiFi’s WPA key: | ||
Ligne 58: | Ligne 96: | ||
naturally, replacing these values with your own as appropriate.** | naturally, replacing these values with your own as appropriate.** | ||
+ | |||
+ | Maintenant, nous devons créer un hachage de notre clé WPA du WiFi : | ||
+ | |||
+ | wpa_passphrase essid key | ||
+ | |||
+ | où « essid » devra être remplacé par l' | ||
+ | |||
+ | # wpa_passphrase myessid 12345678 | ||
+ | network={ | ||
+ | ssid=" | ||
+ | # | ||
+ | psk=407c7d4b572bf701afc06ddd6886cf33ce4f4f2e924d7f12cebe54628d74013e | ||
+ | } | ||
+ | |||
+ | Nous pouvons maintenant éditer le fichier / | ||
+ | |||
+ | auto wlan0 | ||
+ | iface wlan0 inet dhcp | ||
+ | wpa-ssid myessid | ||
+ | wpa-psk 407c7d4b572bf701afc06ddd6886cf33ce4f4f2e924d7f12cebe54628d74013e | ||
+ | | ||
+ | en remplaçant, | ||
**The final installation is rather minimal, consisting just of the RPi 3 itself, micro-SD card and a telephone charger for power. It can be placed in a suitable location, but please do make sure it has sufficient ventilation since the more powerful processor on this model can have issues with overheating. | **The final installation is rather minimal, consisting just of the RPi 3 itself, micro-SD card and a telephone charger for power. It can be placed in a suitable location, but please do make sure it has sufficient ventilation since the more powerful processor on this model can have issues with overheating. | ||
Ligne 64: | Ligne 124: | ||
In this part of our series on using Free Pascal with Ubuntu, we saw various ways in which our application can run on a Raspberry Pi, turning it either into a lightweight terminal or an equally lightweight application server. In the next part, we will focus on what makes the Raspberry Pi unique, and will build a Free Vision interface to make use of the General Purpose I/O ports on this small board computer.** | In this part of our series on using Free Pascal with Ubuntu, we saw various ways in which our application can run on a Raspberry Pi, turning it either into a lightweight terminal or an equally lightweight application server. In the next part, we will focus on what makes the Raspberry Pi unique, and will build a Free Vision interface to make use of the General Purpose I/O ports on this small board computer.** | ||
+ | |||
+ | L' | ||
+ | |||
+ | Un tel paramétrage peut être suffisant pour le travail avec une base de données légère, telle que la saisie d'une vente ou un connaissement dans une entreprise, ou des saisies de données à la volée pour une application scientifique. Les données entrées peuvent ensuite être transférées périodiquement vers un plus gros ordinateur et intégrées dans sa base. Si un besoin de gestion d'une grande quantité de données est nécessaire, | ||
+ | |||
+ | Dans cette partie de la série sur l' | ||
+ | façons de faire tourner notre application sur un Raspberry Pi, le transformant, | ||
+ |
issue116/tuto2.1484124532.txt.gz · Dernière modification : 2017/01/11 09:48 de d52fr