Raspberry Pi startx X flickering grey August 29, 2017
Posted by hackandfab in Uncategorized.add a comment
Using a different user than the default pi causes flickering under X windows.
The flickering can be seen at the top panel.
I tried changing the config.txt under /boot but it was not related
Is is due to the new user not belonging to the audio group
(After making changes logout and login again or simply reboot)
Solution:
sudo usermod -a -G audio yourusername
Android tethering and mobile hotspot not working August 21, 2017
Posted by hackandfab in Uncategorized.add a comment
If internet works from the phone and from another device conected to it ping 192.168.43.1 does work but ping 8.8.8.8 doesn’t (and google works) then it might be that the APN type is not set right. It has to have dun at the end.
APN type: default,supl,dun
The same happens to a tethered connection and or bluetooth connection for internet sharing.
HackAndFab 2017 update July 31, 2017
Posted by hackandfab in Uncategorized.add a comment
HackandFab started as a personal blog for Iker while he was trying to make a kind of “Fablab” on a shoestring budget. He gave several digital fabrication, programming and electronics workshops and taught artists how to use tech to make stuff. He had no clue about art itself and got an artist grant with Mar at Bilbaoarte. She had a background with hacktivists and a degree in art. They both liked robots and the blog was supposed to be used by both of them but they were busy and it was not. Then Mar created Filobotica. At the same time they were the cofounders together with other 6 people of BilbaoMakers (a Hackerspace/Makerspace in Bilbao) and after a while hackandfab was no longer used for 4 years. The domain was cancelled and not renewed sometime in 2015. At mid 2017 Iker bought it again and is being used for a small hackerspace near San Sebastian.
Probably no one is following this blog by now and it will be used as a notebook for a while.
Errores en LibreOffice Calc July 18, 2013
Posted by hackandfab in Uncategorized.Tags: bugs, Libreoffice
add a comment
El Libre Office Calc tiene errores significativos.
Cuando multiplicas directamente 0,000005 por 1000000 el resultado es 5
Jugando con coordenadas GPS, En una celda haces 43,271815-43,27181, da 0,000005 clavados y en otra coges lo anterior y lo multiplicas por 1000000. el resultado debería ser 5 y Libre Office dice por el… cuatro te la inco: 4,9999999945
LibreOffice 3.5.7.2
Build ID: 350m1(Build:2)
Libreoffice no me ha dado ticket.
Launchpad report: Bug #1202550
Sendkeys con programas tontos June 28, 2013
Posted by hackandfab in Uncategorized.add a comment
Como automatizar programas ajenos en windows con Sendkeys
ej: meter esto en un fichero .txt y renombrarlo a .vbs
<code>
rem
rem Autoria, liencia y para que sirve.
rem
Set wshShell = CreateObject(“WScript.Shell”)
wshShell.Run wshShell.ExpandEnvironmentStrings(“””%PROGRAMFILES%\blabla\blabla\bla.exe”””)
rem en windows 7 %PROGRAMFILES(x86)%
Do Until Success = True
Success = wshShell.AppActivate(“nombre_de_la_ventana_no_del_ejecutable”)
Wscript.Sleep 1000
Loop
Wscript.Sleep 500
wshShell.SendKeys “{TAB}”
Wscript.Sleep 100
wshShell.SendKeys “{TAB}”
Wscript.Sleep 100
wshShell.SendKeys ” “
rem asi se envia un espacio
Wscript.Sleep 100
wshShell.SendKeys “Parrafada del copon”
</code>
http://msdn.microsoft.com/en-us/library/8c6yea83%28v=vs.84%29.aspx
Syntaxis de C, C++, JAVA y la cosa de Duff June 22, 2013
Posted by hackandfab in Uncategorized.Tags: C, Duff, JAVA, Sintaxis, Syntax
add a comment
Durante una comida del trabajo me comentaron que la sintaxis y estructuras básicas de C, C++ y Java eran las mismas poniendo como ejemplo “el while y el case” y yo decia que no era asi. El caso más extremo práctico que no solo es una curiosidad academica es la cosa o dispositivo de Duff.
http://en.wikipedia.org/wiki/Duff%27s_device
Es un tipo de estructura muy usada en drivers para pasar datos entre registros.
Básicamente es un do_while dentro de un switch y esto se puede hacer en C y C++ pero no se puede hacer en JAVA. Es solo un ejemplo de que las estructuras son similares pero no idénticas. Es posible implementar lo mismo sin punteros, no es cuestion de que en JAVA no se puedan usar punteros sin más.
http://www.lysator.liu.se/c/duffs-device.html
send(to, from, count) register short *to, *from; register count; { register n = (count + 7) / 8; switch(count % 8) { case 0: do { *to = *from++; case 7: *to = *from++; case 6: *to = *from++; case 5: *to = *from++; case 4: *to = *from++; case 3: *to = *from++; case 2: *to = *from++; case 1: *to = *from++; } while(--n > 0); } }
Evitar proxys transparentes March 4, 2013
Posted by hackandfab in Uncategorized.Tags: hotfile, proxy
add a comment
Hay un par de trucos que suelen funcionar sin tener que hacer un tunel.
Poner https:// en la URL sirve para acceder a sitios bloqueados por http si es que tienen servicio por https. Con hotfile funciona.
Otra mas simple es poner un ? al final de la url
Tecnicamente esto es usar un tunel pero ya que está hecho…
http://proxy.org/ssl_proxies.shtml
GIT detras de un firewall automaticamente March 1, 2013
Posted by hackandfab in Uncategorized.add a comment
Cyanogen usa un montón de scripts que hay que cambiar manualmente para que usen https en vez de git para que funcionen en redes capadas por un firewall.
Con esto se hace automáticamente:
git config --global url."https://".insteadOf git://
Captura de video en linux EASYCAP September 6, 2012
Posted by hackandfab in Uncategorized.1 comment so far La idea era usar unas cámaras en una cara animatronica y tienen que ser estancas.
Lo mas barato es usar unas de vista trasera para coche que cuestan unos 15 euros con portes
en ebay. Lo difícil fue pensar como pasar la señal a un ordenador. Al principio pensé en reutilizar unas viejas BT878 de la época del canal+ pero seria un problema usar mas de 2 ya que las placas base de ahora no tienen casi ranuras PCI. Lo bueno fue que venden capturadoras múltiples en pinchos USB que funcionan en linux. Se encuentran buscando “4 channel easycap” en ebay.
Actualización: Tuve suerte, hay otros modelos visualmente muy similares que NO van en linux. http://linuxtv.org/wiki/index.php/Easycap#Indentify_the_device_before_buying
En este enlace hay mas info
http://easycap.blogspot.com.es/p/recording.html
dmesg dice esto:
[41973.348294] usb 1-1.3: new high-speed USB device number 9 using ehci_hcd
[41973.945267] easycap: module is from the staging directory, the quality is unknown, you have been warned.
[41973.945275] easycap: module is from the staging directory, the quality is unknown, you have been warned.
[41973.945283] easycap: module is from the staging directory, the quality is unknown, you have been warned.
[41973.946852] Easycap version: 0.9.01
[41977.227698] easycap::0adjust_standard: selected standard: PAL_BGHIN
[41977.538249] easycap::0adjust_format: sought: 640x480,UYVY(0x59565955),1=field,0x00=std mask
[41977.538258] easycap::0adjust_format: sought: V4L2_FIELD_NONE
[41977.538265] easycap::0adjust_format: actioning: 640x480 PAL_BGHIN_AT_640x480_FMT_UYVY-n
[41977.562167] easycap::0adjust_brightness: adjusting brightness to 0x7F
[41977.586112] easycap::0adjust_contrast: adjusting contrast to 0x3F
[41977.610080] easycap::0adjust_saturation: adjusting saturation to 0x2F
[41977.633911] easycap::0adjust_hue: adjusting hue to 0x00
[41977.635442] easycap::0easycap_usb_probe: registered with videodev: 1=minor
[41977.635452] easycap::0easycap_usb_probe: ends successfully for interface 0
[41977.636630] usbcore: registered new interface driver snd-usb-audio
[41977.637136] usbcore: registered new interface driver easycap
[41977.639069] easycap:: easycap_open: ==========OPEN=========
[41981.257664] easycap::0adjust_standard: selected standard: PAL_BGHIN
[41981.568106] easycap::0adjust_format: sought: 640x480,UYVY(0x59565955),1=field,0x00=std mask
[41981.568110] easycap::0adjust_format: sought: V4L2_FIELD_NONE
[41981.568112] easycap::0adjust_format: actioning: 640x480 PAL_BGHIN_AT_640x480_FMT_UYVY-n
[41981.591943] easycap::0adjust_brightness: adjusting brightness to 0x7F
[41981.616031] easycap::0adjust_contrast: adjusting contrast to 0x3F
[41981.639870] easycap::0adjust_saturation: adjusting saturation to 0x2F
[41981.663820] easycap::0adjust_hue: adjusting hue to 0x00
lsusb
Bus 001 Device 010: ID 05e1:0408 Syntek Semiconductor Co., Ltd STK1160 Video Capture Device
Al parecer los drivers son bastante cutres pero van incluso en ARM
Se estan haciendo nuevos en: https://github.com/ezequielgarcia/stk1160-standalone/
Bootable ISO desde tarjeta SD July 16, 2012
Posted by hackandfab in Uncategorized.add a comment
Ya que Linux no va bien en la Allwinner A10 tengo que usar Ubuntu 12.04 LTS 64 bit como plataforma de desarrollo para Android y voy a intentar documentar los pasos. El siguiente que me diga que el kernel de Android y de Linux es el mismo…
Estoy usando Ubuntu 12.04 i686 asi que lo primero es bajarme la iso de amd64
Ubuntu12 viene con la mierda de unity ya no tiene los menús de gnome y la bonita utilidad llamada usb-creator-gtk hay que ejecutarla desde la terminal
Dado que el sistema que me habian dejado era una ubuntu 32 bit en una sola partición mas swap he tenido que ejecutar gparted desde la terminal de la liveCD y redimensionar la partición antes de empezar la instalación para no borrar los datos.
Actualización: En windows teneis unetbootbin