issue109:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
issue109:c_c [2016/05/29 17:55] – créée auntiee | issue109:c_c [2016/06/16 12:20] (Version actuelle) – andre_domenech | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | I’ve always been a fan of electronics - be it Arduino, full-on computers, or something like a Raspberry Pi. However, I always try to balance out my purchases with actual need - which means I have never owned a Raspberry Pi. Until now. I recently ordered a model 3 off Amazon (in a complete bundle with a case, power supply and heatsinks - the SD card was missing, but as I own many of them, it wasn’t necessary). The intended use for this Raspberry Pi was to connect it to our older Brother MFC-230C printer - which is USB only. There were two reasons for this - firstly, heading to the office to manually connect a USB printer was a pain, and secondly, I wanted some method with which I could enable Google Cloud Print. For those who don’t know - Google Cloud Print is a service that allows printing from android tablets/ | + | **I’ve always been a fan of electronics - be it Arduino, full-on computers, or something like a Raspberry Pi. However, I always try to balance out my purchases with actual need - which means I have never owned a Raspberry Pi. Until now. I recently ordered a model 3 off Amazon (in a complete bundle with a case, power supply and heatsinks - the SD card was missing, but as I own many of them, it wasn’t necessary). The intended use for this Raspberry Pi was to connect it to our older Brother MFC-230C printer - which is USB only. There were two reasons for this - firstly, heading to the office to manually connect a USB printer was a pain, and secondly, I wanted some method with which I could enable Google Cloud Print. For those who don’t know - Google Cloud Print is a service that allows printing from android tablets/ |
- | The main reason I selected this kit was because this bundle shipped with Amazon Prime – the other bundles had additional shipping costs. | + | The main reason I selected this kit was because this bundle shipped with Amazon Prime – the other bundles had additional shipping costs.** |
- | What are you covering? | + | Depuis toujours, je suis passionné d' |
+ | |||
+ | La principale raison pour laquelle j'ai choisi cet ensemble, était qu'il était disponible avec Amazon Prime et les autres ensembles avaient des frais de port supplémentaires. | ||
+ | |||
+ | **What are you covering? | ||
I’m going to focus on the setup of the Raspberry Pi (RPi) this month. Once I’ve given myself sufficient time to test out the CUPS setup and Google cloud print, I will follow this article up with those exact steps. | I’m going to focus on the setup of the Raspberry Pi (RPi) this month. Once I’ve given myself sufficient time to test out the CUPS setup and Google cloud print, I will follow this article up with those exact steps. | ||
Ligne 19: | Ligne 23: | ||
Heatsinks - do I need them? | Heatsinks - do I need them? | ||
- | Heatsinks shouldn’t really be necessary at all - most people agree that even under the most extreme conditions, the RPi will be fine without. However, heatsinks may be beneficial for me, as the RPi will probably be operating in a slightly stuffy room, with a high chance of direct sunlight via the window. Heatsinks may help keep the RPi a little cooler in these positions. As the RPi seems to lack any sensors (for use with lm-sensors), | + | Heatsinks shouldn’t really be necessary at all - most people agree that even under the most extreme conditions, the RPi will be fine without. However, heatsinks may be beneficial for me, as the RPi will probably be operating in a slightly stuffy room, with a high chance of direct sunlight via the window. Heatsinks may help keep the RPi a little cooler in these positions. As the RPi seems to lack any sensors (for use with lm-sensors), |
- | Step 0: Assembly & Prep | + | De quoi parlez-vous ? |
+ | |||
+ | Ce mois-ci, je vais me concentrer sur le paramétrage du Raspberry Pi (RPi). Dès que j' | ||
+ | |||
+ | De quoi ai-je besoin ? | ||
+ | |||
+ | Vous aurez besoin d'un Raspberry Pi (et d'une carte SD qui fait au moins 4 Go), un clavier, une souris et un écran. Les trois derniers ne sont nécessaires que pour l' | ||
+ | |||
+ | Installeur NOOBS : https:// | ||
+ | |||
+ | NOTA 1 : Un installeur manuel existe aussi, mais j'ai mis l' | ||
+ | |||
+ | NOTA 2 : Outre des téléchargements directs, il y a des torrents, mais ils n'ont pas fonctionné dans rtorrent. | ||
+ | |||
+ | Les refroidisseurs, | ||
+ | |||
+ | On ne devrait pas avoir besoin de refroidisseurs, | ||
+ | |||
+ | **Step 0: Assembly & Prep | ||
I can’t offer exact instructions here, as it all depends on your case (or lack thereof). It shouldn’t be a difficult process. | I can’t offer exact instructions here, as it all depends on your case (or lack thereof). It shouldn’t be a difficult process. | ||
- | For the SD card, the official site recommends a tool for Windows or Mac. But if you’d rather do it by hand, the SD card just seems to need to be FAT32 (should be the standard for any size less than and including 32GB), or FAT16. Unfortunately, | + | For the SD card, the official site recommends a tool for Windows or Mac. But if you’d rather do it by hand, the SD card just seems to need to be FAT32 (should be the standard for any size less than and including 32GB), or FAT16. Unfortunately, |
- | Step 1: Installation | + | Étape 0 : Assemblage et préparatifs |
+ | |||
+ | Je ne peux pas vous proposer des instructions précises ici, car tout dépend de votre propre boîtier (ou de son absence). Cela ne devrait pas être difficile. | ||
+ | |||
+ | Pour ce qui concerne la carte SD, le site officiel recommande un outil pour Windows ou Mac. Mais si vous préférez le faire à la main, la carte SD devra vraisemblablement être formatée en FAT32 (ce qui est la norme pour toute taille jusqu' | ||
+ | |||
+ | **Step 1: Installation | ||
Once the case is set up, and the SD card ready, you’ll want to connect your peripherals, | Once the case is set up, and the SD card ready, you’ll want to connect your peripherals, | ||
Ligne 36: | Ligne 64: | ||
The first thing I did was connect my wireless, and tried to set a static IP (as my router doesn’t allow reserving IP addresses). The GUI tool seems to just add an entry into / | The first thing I did was connect my wireless, and tried to set a static IP (as my router doesn’t allow reserving IP addresses). The GUI tool seems to just add an entry into / | ||
+ | |||
+ | Interface wlan0** | ||
+ | |||
+ | Étape 1 : Installation | ||
+ | |||
+ | Une fois le boîtier configuré et la carte SD prête, vous devez connecter les périphériques, | ||
+ | |||
+ | Le RPi démarrera sur un écran très basique. Vous pouvez, soit vous connecter au Net et télécharger/ | ||
+ | |||
+ | Étape 2 : Il a redémarré - et maintenant ? | ||
+ | |||
+ | La première chose que j'ai faite était de connecter mon WiFi et essayer de paramétrer une adresse IP statique (puisque mon routeur ne permet pas la réservation d' | ||
Interface wlan0 | Interface wlan0 | ||
- | This tells dhcpcd to apply the following settings only for the wireless interface - so ethernet runs normally on DHCP, and my wireless will use the static IP I chose when connected to my home network. Other wireless networks should default back to DHCP (so you’ll never run into the issue that the RPi is assuming the wrong subnet). I have yet to test the RPi with another wireless network. | + | **This tells dhcpcd to apply the following settings only for the wireless interface - so ethernet runs normally on DHCP, and my wireless will use the static IP I chose when connected to my home network. Other wireless networks should default back to DHCP (so you’ll never run into the issue that the RPi is assuming the wrong subnet). I have yet to test the RPi with another wireless network. |
Once you have your IP reserved in your router, or statically assigned by the RPi, you’re ready to disconnect your keyboard/ | Once you have your IP reserved in your router, or statically assigned by the RPi, you’re ready to disconnect your keyboard/ | ||
Ligne 46: | Ligne 86: | ||
TightVNC is a VNC (Virtual Network Computing) client that is offered in the Raspbian repos. To install it just run: | TightVNC is a VNC (Virtual Network Computing) client that is offered in the Raspbian repos. To install it just run: | ||
- | |||
sudo apt-get install tightvncserver | sudo apt-get install tightvncserver | ||
Ligne 55: | Ligne 94: | ||
This should result in some information in the terminal, telling you there is a new ‘X’ desktop. To save resources, I recommend killing the X session on :0, with: | This should result in some information in the terminal, telling you there is a new ‘X’ desktop. To save resources, I recommend killing the X session on :0, with: | ||
+ | |||
+ | service lightdm stop** | ||
+ | |||
+ | Cela indique au dhcpcd d' | ||
+ | |||
+ | Une fois l'IP réservée dans votre routeur, ou assignée statiquement par le RPi, le moment est venu de déconnecter le clavier/ | ||
+ | |||
+ | Étape 2.1 : TightVNC | ||
+ | |||
+ | TightVNC est un client VNC (Virtual Network Computing, informatique virtuelle en réseau) proposé dans les dépôts Raspbian. Pour l' | ||
+ | |||
+ | sudo apt-get install tightvncserver | ||
+ | |||
+ | Une fois l' | ||
+ | |||
+ | tightvncserver | ||
+ | |||
+ | Vous devrez maintenant voir des informations dans le terminal vous disant qu'il y a un nouveau bureau « X ». Dans un but d' | ||
service lightdm stop | service lightdm stop | ||
- | Step 2.1.1: Connecting | + | **Step 2.1.1: Connecting |
If you use vncviewer on a Linux machine, just using the IP followed by the display number, you’ll be fine. Such as 192.168.0.15: | If you use vncviewer on a Linux machine, just using the IP followed by the display number, you’ll be fine. Such as 192.168.0.15: | ||
Ligne 68: | Ligne 125: | ||
I used the Raspberry Pi Configuration tool to boot automatically into the CLI - as I only need SSH access, and the occasional VNC call. | I used the Raspberry Pi Configuration tool to boot automatically into the CLI - as I only need SSH access, and the occasional VNC call. | ||
- | If you want to automatically start a VNC session, I would recommend looking at the official documentation: | + | If you want to automatically start a VNC session, I would recommend looking at the official documentation: |
- | Step 3: Applications | + | Étape 2.1.1 : Se connecter |
+ | |||
+ | Si vous vous servez de vncviewer sur une machine Linux, il suffit d' | ||
+ | |||
+ | Si vous configurez un mot de passe, gardez à l' | ||
+ | |||
+ | Étape 2.2 : Autostart | ||
+ | |||
+ | J'ai utilisé l' | ||
+ | |||
+ | Si vous voulez démarrer une session VNC automatiquement, | ||
+ | |||
+ | https:// | ||
+ | |||
+ | **Step 3: Applications | ||
Depending on what you want to do with the RPi, you may need to install other packages. In my case, I need to install the packages chromium-inspector (chromium browser - required for Cloud Print), and cups (for sharing the printer normally). | Depending on what you want to do with the RPi, you may need to install other packages. In my case, I need to install the packages chromium-inspector (chromium browser - required for Cloud Print), and cups (for sharing the printer normally). | ||
Ligne 79: | Ligne 150: | ||
• LAMP - for running a web server. | • LAMP - for running a web server. | ||
• Docker - I’m not sure how well Docker would run on an RPi, but of the virtualization options I can think of, it would probably offer the best performance. | • Docker - I’m not sure how well Docker would run on an RPi, but of the virtualization options I can think of, it would probably offer the best performance. | ||
- | • Samba (for using the RPi to share a USB hard drive on the network). | + | • Samba (for using the RPi to share a USB hard drive on the network).** |
- | Step 4: Debugging | + | Étape 3 : Applications |
+ | |||
+ | Selon ce que vous voulez faire avec le RPi, vous aurez éventuellement besoin d' | ||
+ | |||
+ | Divers articles fournissant les étapes exactes existent ; voici donc une liste de quelques trucs que des gens peuvent vouloir installer/ | ||
+ | • Bittorrent Sync (pour le partage de fichiers). | ||
+ | • Bluetooth (nécessite divers paquets tels que bluez, bluez-hcidump, | ||
+ | • LAMP - pour exécuter un serveur Web. | ||
+ | • Docker - je ne sais pas du tout si Docker peut bien tourner sur un RPi, mais parmi les options de virtualisation que je connais, il donnerait sans doute les meilleures performances. | ||
+ | • Samba (pour utiliser le RPi afin de partager un disque dur USB sur le réseau). | ||
+ | |||
+ | **Step 4: Debugging | ||
If, for some reason, your RPi isn’t working properly, you have two options: | If, for some reason, your RPi isn’t working properly, you have two options: | ||
Ligne 93: | Ligne 175: | ||
If, however, the RPi isn’t connected to the network (because it’s a new wireless network, for example), then you’ll typically need to connect it via ethernet, or use a monitor, keyboard, and mouse to connect to the new network. If you’re lazy and want to make life easier for you - you can simply set up a DHCP server on your laptop (on both Windows and Linux you’ll need to install and set up some form of DHCP server, but OS X offers that option by default under System Preferences -> Sharing -> Internet Sharing). After the DHCP server is running, you can just connect an ethernet cable to the RPi from your laptop, and then start the RPi (it may work on an already running system, but I have tested it only from an off state). From your laptop, you should be able to get a list of clients and their IPs - this depends on the server and OS you’re using. Once you get the IP of the client, you can just connect via SSH or VNC, and work from there. | If, however, the RPi isn’t connected to the network (because it’s a new wireless network, for example), then you’ll typically need to connect it via ethernet, or use a monitor, keyboard, and mouse to connect to the new network. If you’re lazy and want to make life easier for you - you can simply set up a DHCP server on your laptop (on both Windows and Linux you’ll need to install and set up some form of DHCP server, but OS X offers that option by default under System Preferences -> Sharing -> Internet Sharing). After the DHCP server is running, you can just connect an ethernet cable to the RPi from your laptop, and then start the RPi (it may work on an already running system, but I have tested it only from an off state). From your laptop, you should be able to get a list of clients and their IPs - this depends on the server and OS you’re using. Once you get the IP of the client, you can just connect via SSH or VNC, and work from there. | ||
- | That about wraps it up for this month. If you have any issues, or questions, feel free to email me at lswest34+fcm@gmail.com. The same is true for anyone who has suggestions or requests for articles - ideas are always welcome! | + | That about wraps it up for this month. If you have any issues, or questions, feel free to email me at lswest34+fcm@gmail.com. The same is true for anyone who has suggestions or requests for articles - ideas are always welcome!** |
+ | |||
+ | Étape 4 : Débogage | ||
+ | |||
+ | Si, pour une raison quelconque, votre RPi ne fonctionne pas comme il faut, vous avez deux possibilités : | ||
+ | • Connecter un écran, clavier souris et/ou une connexion Éthernet. | ||
+ | • Utiliser SSH ou VNC pour corriger les problèmes. | ||
+ | |||
+ | L' | ||
+ | |||
+ | Pour ce qui concerne l' | ||
+ | |||
+ | Si, cependant, le RPi n'est pas connecté au réseau (notamment parce qu'il s'agit d'un nouveau réseau WiFi), vous devrez généralement le connecter via l' | ||
+ | |||
+ | C'est tout pour ce mois-ci. Si vous avez des problèmes ou des questions, n' |
issue109/c_c.1464537312.txt.gz · Dernière modification : 2016/05/29 17:55 de auntiee