quinta-feira, 2 de setembro de 2010

Configurar e controlar o 3G e MMS , no Android 1.5

Desde que adquiri o meu Android , o LG GW620, há uma coisa que me irrita profundamente.
Primeiro, o 3G vem activado por default , e sempre que lhe dá na telha , acede a internet e recebe e manda uns KB de informação . Para quem não tem planos de internet móvel , isso significa cobrar automaticamente 1 euro por dia.
Segundo, se desligarmos o acesso 3G para não papar o dinheiro, perdemos o acesso ao serviço MMS. E para finalizar, sempre que ligamos o 3G para mandar MMS , o mais provável é uma carrada de programas quererem aceder à net e o resto... já sabemos.

Desta forma, apresento uma solução que se apresenta como viável e fácil de configurar , recorrendo a 3 apps do mercado.

Procedimento :

1. Instalar o 3G watchdog do mercado.


2. De seguida vamos configurar o 3G Watchdog , segundo o seu plano de internet móvel. No meu caso, caso aceda a internet, tenho direito a 10 MB por dia.



3. Seguidamente, vamos instalar mais uma aplicação do mercado : APNdroid .


4. Next, vamos configurar o APNdroid , de forma a mantermos os MMS activos, mesmo desligando o 3G.



5. Agora é tempo da ultima aplicação , APN Portugal .


6. Quando terminar a instalação, execute-a. A aplicação vai configurar as APN's de uma forma correcta.



7. As configurações em Definições -> Controlos sem Fios -> Redes Móveis -> Nomes de ponto de acesso , devem estar como as seguintes :



Já agora, no menu anterior a este, tem a opção Usar apenas redes 2G. Eu pelo sim pelo não, tenho o activado.

8. Estamos quase prontos. Vamos terminar a configuração do 3g Watchdog, como se segue :



E já está! Para experimentar, faça o seguinte :

No desktop, pressione o fundo do ecrã . Carregue em Widgets e adicione o APNdroid. Deve ficar algo como isto:


O símbolo verde indica que o 3G está activado. Caso queira desligar o 3G ... é só carregar.

Para a prova final, mantenha o icon desligado. Tente mandar uma MMS e.... sorria :P

sexta-feira, 20 de agosto de 2010

Using CURL to automate game-monitor searches

I wanted to automate the search for my friends using game-monitor. With that in mind , i knew i only had to grab the page of the search ( www.game-monitor.com uses GET method's to make the searches ) , see the results and output the result.

The only problem i had was grabing the page ; the website doesn't allow without a valid user-agent. So i just copied myne , using tamper data in firefox and the switch -A in Curl.

I then wrote a simply C program that levarages this feature.

Bear in mind that this is more like a POC; if you really want to track your mates / games they are playing, there are dedicated sites that can do that (e.g gametracker, and so on).

The program is here.


terça-feira, 15 de junho de 2010

SSH tunneling and VNC on ANDROID 1.5

This tutorial assumes that:

  1. You have a working SSH server on your computer
  2. You have a VNC server on your computer
1 and 2 wont'be covered , as google has a handful of tutorials.

Procedure:

  1. Install ConnectBot from Android Apps
  2. Create a new connection host. Example: (Protocol , ssh duh! ) Admin@192.168.YY.YY:22 , where YY is the IP on your local network of the SSH server
  3. See if all goes well and you can connect. Now create a port forward ( hit menu button , port forwards)
  4. On Port Forwards menu, click Add Port Forward with the folowing :
  • Nickname : VNC SSH ( or any other)
  • Type: Local
  • Source Port: 5900
  • Destination: localhost:5900
  • Hit click port forward
5. For the sake of it , disconect and connect again. Check if the rule you added is NOT striketroughed ( i think i just made a word? )
6. Download androidVNC from Android Apps
7. Create a new connection with the following :
  • Nickname: SSH-Android ( or any other)
  • Password: password-you-set-up-in-vnc-server ( see Additional Notes)
  • Adress: 127.0.0.1
  • Port: 5900
  • Hit connect
8. If all goes well , you have now a SSH tunnel with VNC on top of that :)


Additional Notes:

  1. Before you connect, check if ConnectBot is connected.
  2. If you're on Windows XP don't forget to add an execption on TCP port 22 ( SSH )

If you're running TightVNC Server READ THIS

  1. Right click on the icon in the taskbar
  2. Go to Administration tab
  3. Check the following
  • Allow loopback connections
  • Allow only loopback connections ( for security improvement)
The password you're supposed to enter in the VNC connection on Android is the one configured in Server tab / Primary Passsword


Nice diagram :

http://members.shaw.ca/nicholas.fong/vnc/tunnel-vnc.png

Android phone used : LG GW620 aka PowerHouse

Thanks goes to my brother :D

sexta-feira, 11 de junho de 2010

Emulating POV on a Joystick - Battlefield series oriented

The purpose of this tutorial is to emulate a POV - Hat switch on a joystick , even without one .

We'll be using a small progam called joy2key .

You can download it here.

I'm using a Microsoft Sidewinder Joystick USB 1.

Basically we will configure one button to act like a switch : when you press it , you will be able to press other button at the same time , thus improving the number of buttons available .

You can download my configuration files here ( md5 ) .

So extract the joytokey program and place the configuration files on the same folder . The progam will automatically load the .cfg files .


What to edit

( In POV - Joystick 1 )
.The switch button is currently Button 6 ( change that accordingly to your needs )

( In POV - Joystick 2 )
.Look right is Button 5
.Look left is Button 7
.Look up is Button 1 (Fire)

And that's it . To emulate the POV , just press and hold the switch and then one of the directions.

To play , start the JoyToKey and minimize it .


For BF1 / BF2 players :


Besides running the JtKey with the POV.cfg , open up another JtKey this time with the file Ctrl.cfg ( Ctrl is configured the same as the switch button ).

Now go fly some planes :-)