meta data for this page
  •  

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
maemo:getting_started [2011/08/17 11:59]
japskua
maemo:getting_started [2011/08/18 13:43] (current)
japskua [Esbox Explained]
Line 2: Line 2:
  
 All of the machines are running image of Maemo development environment. It has Maemo SDK installed, which means emulator and Esbox (a customized version of Eclipse). With these two tools it is possible to "​easily"​ create python -based programs for the Nokia n900. All of the machines are running image of Maemo development environment. It has Maemo SDK installed, which means emulator and Esbox (a customized version of Eclipse). With these two tools it is possible to "​easily"​ create python -based programs for the Nokia n900.
 +
 +===== GETTING STARTED - FROM 0 to 100 =====
 +
 +==== Creating a Python Project ====
 +
  
 First, open the Esbox on your desktop First, open the Esbox on your desktop
  
-{{:​maemo:​starting1.png|}}+{{:​maemo:​starting1.png|Esbox Icon}} 
 + 
 +After this, the Esbox will start and ask you for the workspace path. Please, keep the suggested one, as this one works with the emulator. If you change this, there is a probability of **NOT GETTING THE EMULATOR TO WORK!** 
 + 
 +{{:​maemo:​starting2.png|Select your workspace}} 
 + 
 +After this, select File->​New Python Maemo Project 
 + 
 +Now you should see the following picture: 
 + 
 +{{:​maemo:​starting3.png|Project Template Selector}} 
 + 
 +Select the name monster **Maemo Python Hildon Hello World Project** and then select next 
 + 
 +{{:​maemo:​starting4.png|Project Configuration}} 
 + 
 +Now you are in the project configuration window. This is probably the most important window here and you will return here to play with this one later in the future. For now, use the suggested project name.  
 + 
 +Select all the boxes, so you will have all the options working (scratchbox,​ X86 and ARMEL) **AND DOUBLE CLICK THE X86 SO IT BECOMES HIGHLIGHTED AS BOLD TEXT** 
 + 
 +Now, just click next. 
 + 
 +{{:​maemo:​starting5.png|Extra Configurations}} 
 + 
 +In this window you can configure the author, the version number and the hello world text to display here. If you want, you can define the group name as the author (e.g. Masters of the Universe). Then just click finish. 
 + 
 + 
 +{{:​maemo:​starting6.png|Check Packages}} 
 + 
 +Here the Esbox asks whether you want to check the packages or not. I highly suggest to click yes here, as soemthing might have changed (Esbox is a magical thing, you never know). So, just to be sure, click yes ;-) 
 + 
 +{{:​maemo:​starting7.png|Validate Packages}} 
 + 
 +All you need to do here is just to check all the boxes and continue forwards on your voyage of discovery. 
 + 
 +{{:​maemo:​starting8.png|Package operations}} 
 + 
 +This is the last screen (FINALLY!). DO YOU WANT TO PROCEED? - HECK YEAH! 
 + 
 +And after some more magic, KAZING! You have the project visible (and if you're lucky, it's even a working one :-P) 
 + 
 +==== Esbox Explained ==== 
 +This is self-explanatory. No need for explaining. Try and see for youself :-P 
 + 
 + 
 + 
 +==== Running the Project in the Emulator ==== 
 + 
 +When you start the application with Run As -> Pythom Maemo Local Application you probably get the following screen 
 + 
 +{{:​maemo:​emulator1.png|Launch Maemo Emulator?​}} 
 + 
 +Just click yes and it should start your emulator. If you did have X86 selected as the exection environment,​ everything should go just fine and you should see the following result: 
 + 
 +{{:​maemo:​emulator2.png|Hello World on Emulator}} 
 + 
 +Unless you just got a blank screen, you are trying to run the project under ARMEL settings. Change the run configuration to X86 and try again. 
 + 
 +===== Running the Project in a Real Machine ===== 
 + 
 +==== Doing the Preconfiguration (one-time only!) ==== 
 + 
 + 
 +Here are the instructions on how run your project ​ on the real physical n900. Note that before this, you have to have switched the project run settings to ARMEL in order to run the code on the device. 
 + 
 +{{:​maemo:​remote1.png|Starting SSH Shell}} 
 + 
 +Select the Remote Systems tab -> Maemo Device (USB) -> SSH shells and right click. Select Connect... from the right-click menu. 
 + 
 +{{:​maemo:​remote2.png|Password dialog}} 
 + 
 +After this you will be queried for the password and username. The details are the following:​ 
 +  * Username: user 
 +  * password: lut 
 +And I suggest saving the info so you don't have to give it again. 
 + 
 +{{:​maemo:​remote3.png|RSA Keys}} 
 + 
 +If this is the first run, you will be asked to accept the RSA keys. Just choose yes here. 
 + 
 +{{:​maemo:​remote4.png|Password required - again}} 
 + 
 +And in this final screen just input the same information as in the previous password dialog. Remember settings and voilá! You should have SSH connection working. 
 + 
 +**After this just Run the project as a Remote Project and it should run in the real machine. Enjoy! ;-)** 
 + 
 +===== Changing Run Settings ===== 
 + 
 +Here is the instructions on changing the Run Settings. This is needed to switch between Local Emulator and Remote Real Device. 
 + 
 +Right click your Project folder in Esbox and choose Preferences from the right-click menu. After this you should see the following picture 
 + 
 +{{:​maemo:​changing_run.png|Changing Running settings}}
  
-{{:​maemo:​starting2.png|}}+Here you need to double click the wanted Interpreter (either X86 or ARMEL). The wanted interpreter should change to bold font.
  
-{{:​maemo:​starting3.png|}}+ARMEL = Real Device 
 +X86 = Virtual Device
  
-{{:​maemo:​starting4.png|}} 
  
-{{:​maemo:​starting5.png|}}+==== Running the Project Remotely ====
  
-{{:​maemo:​starting6.png|}}+To run the project remotely, you need to first change to the correct interpreter from the project settings (ARMEL is for Remote)
  
-{{:​maemo:​starting7.png|}}+After this, right click the main python file you want to run and select Run As -> Maemo Remote Application. **If you don't see option for Remote Application,​ you have not changed the Interperter to ARMEL**.
  
-{{:maemo:​starting8.png|}}+Now, when running remotely, you should see the following:
  
-ALL THE PICTURES+{{:​maemo:​remote_exec1.png|Configuring Python Interpreter}}
  
-{{:​maemo:​emulator1.png|}}+Just click okay here and things should go just fine. Unless the great Cthulhu decides otherwise.
  
-{{:maemo:emulator2.png|}}+{{:maemo:remote_exec2.png|Download Methods to Use}}
  
-{{:maemo:esbox_explained.png|}}+Here you have to choose the Copy Program (SSH) options. The other one should not even work and just give you bunch of errors. So please, don't choose that :-D 
 +Now click okay and you get the following dialog:
  
-{{:maemo:remote1.png|}}+{{:maemo:remote_exec3.png|Selecting the Target}}
  
-{{:​maemo:​remote2.png|}}+Choose the right remote connection you are using. The correct answer here might be USB. Or it might not be? Who knows, but you. However, if you ARE indeed use the usb cable, then USB is your best choice. However, feel free to try Bluetooth or a tin hat. As you like.
  
-{{:maemo:remote3.png|}}+{{:maemo:remote_exec4.png|Password required}}
  
-{{:​maemo:​remote4.png|}}+just put the same stuff as before hereuser & lut and your soul will be transferred to Nokia in a blink of an eye. Enjoy!