martes, 20 de septiembre de 2016

E3372h debrick

Well, just debricked my E3372h-510 test pointing it, uploading usblsafe-3372h.bin with balong_usbdload and loading 21.110.99.02.00 downgrade with Huawei Flasher v2 (before extracted HMF with Huawei Flasher v1 and removed first comment line from HMF file).

You need connect those pins: http://s.kaskus.id/images/2015/12/29/8228477_20151229061027.jpg (or just boot to USB "GND case")
When you plug the modem, it won't blink, light is off but UI Interface is detected by PC.

Then:
balong_usbdload: https://github.com/forth32/balong-usbdload/blob/master/winbuild/Release/balong_usbdload.exe
usblsafe: https://github.com/forth32/balong-usbdload/blob/master/usblsafe-3372h.bin

Usage: balong_usbdload -p8 usblsafe-3372h.bin
(-p8 is COM8, as -p4 should be COM4)

Finally, instead of green quick blinking, modem will be cyan blinking very quick. Then use modem flasher v1.6 to extract, notepad to edit and finally modem flasher v2 with go-hldc ( http://www30.zippyshare.com/v/aee8MgJa/file.html ) to flash HMF --- (Modem Flasher v1.6 is easier to find).

It should work to flash any E3372h with their respective firmware.

miércoles, 31 de agosto de 2016

Building Liquidsoap from Source (For Airtime)



The guide of building process at Airtime's Wiki was removed, so I recovered the text from an archive and replaced Liquidsoap's Git with a legacy package as latest builds of Liquidsoap requires OCaml 4.02+, not included in Debian Jessie or Ubuntu less than 16.04 (xenial uses php7.0 so Airtime won't install via packages)

This page is necessary to add AAC+ Support to Airtime 

---------

Compilation

On Ubuntu 10.04 or newer install the following packages:
sudo apt-get -y --force-yes install git-core ocaml-findlib libao-ocaml-dev \
libportaudio-ocaml-dev libmad-ocaml-dev libtaglib-ocaml-dev libalsa-ocaml-dev \
libvorbis-ocaml-dev libladspa-ocaml-dev libxmlplaylist-ocaml-dev libflac-dev \
libxml-dom-perl libxml-dom-xpath-perl patch autoconf libmp3lame-dev \
libcamomile-ocaml-dev libcamlimages-ocaml-dev libtool libpulse-dev camlidl \
libfaad-dev libpcre-ocaml-dev

#backported opus 1.0+ packages from apt.sourcefabric.org
sudo apt-get install libopus-dev

#add festival dev packages for say: protocol support
sudo apt-get install festival-dev
  
#AAC encoder - only for Ubuntu versions 11.10 and up
sudo apt-get install libvo-aacenc-dev
## **** Liquidsoap must be compiled in a non-root user ! ****
rm -rf liquidsoap-full
#git clone https://github.com/savonet/liquidsoap-full
# Replaced Git to Liquidsoap 1.1.1 sources
wget http://downloads.sourceforge.net/project/savonet/liquidsoap/1.1.1/liquidsoap-1.1.1-full.tar.gz
tar -xvf liquidsoap-1.1.1-full.tar.gz
#cd liquidsoap-full
cd liquidsoap-1.1.1-full
#make init
#make update

cp PACKAGES.minimal PACKAGES

sed -i "s/#ocaml-portaudio/ocaml-portaudio/g" PACKAGES
sed -i "s/#ocaml-alsa/ocaml-alsa/g" PACKAGES
sed -i "s/#ocaml-pulseaudio/ocaml-pulseaudio/g" PACKAGES
sed -i "s/#ocaml-faad/ocaml-faad/g" PACKAGES

#Also enable ocaml-opus after installing backported dev packages
sed -i "s/#ocaml-opus/ocaml-opus/g" PACKAGES

#ocaml-voaacenc is not available on Lucid
sed -i "s/#ocaml-voaacenc/ocaml-voaacenc/g" PACKAGES

#AAC+ support full instructions here: https://wiki.sourcefabric.org/x/NgPQ
#Remove the hash '#' symbol from the following line to enable AAC+ 
#sed -i "s/#ocaml-fdkaac/ocaml-fdkaac/g" PACKAGES


./bootstrap
./configure
make

Create source package

  cd..
  cp -r liquidsoap-full/ /tmp/
  cd /tmp/liquidsoap-full/
  rm -rf .git .gitignore .gitmodules
  cd ..
  tar -czf liquidsoap-1.1.1.tar.gz liquidsoap-full/

Installation

The compiled liquidsoap binary will now be present in liquidsoap-full/liquidsoap/src
On Airtime 2.3 and lower, run

sudo service airtime-liquidsoap stop
sudo cp liquidsoap-full/liquidsoap/src/liquidsoap /usr/bin/liquidsoap
sudo service airtime-liquidsoap start 


On Airtime 2.4 and higher, run

sudo service airtime-liquidsoap stop-with-monit
sudo cp liquidsoap-full/liquidsoap/src/liquidsoap /usr/bin/liquidsoap
sudo service airtime-liquidsoap start-with-monit 
Your new Liquidsoap installation is now done!

Testing

To test Icecast:

cd liquidsoap/src
./liquidsoap 'output.icecast(%vorbis, mount="test.ogg", sine())'
mplayer http://localhost:8000/test.ogg

To test direct soundcard output:

cd liquidsoap/src
./liquidsoap 'output.ao(sine())'

In both of the options above, you should hear a constant buzzing noise that is generated by the input sine wave.


viernes, 19 de febrero de 2016

Convertir desde InnoDB a MyISAM

Debido al alto uso de RAM me vi obligado a reducir a un solo motor de MySQL, pero al intentar lo que muchos usuarios han hecho, me arroja:
Cannot delete or update a parent row: a foreign key constraint fails
Esto es porque MyISAM no soporta foreign keys. Existen soluciones para una sola base de datos, pero modifiqué los scripts para todas.

Acá eliminaré todas las foreign keys:
DELETE_SCRIPT=Delete_Foreign_Keys.sql
mysql -p -AN -e"SELECT concat('USE ',table_schema ,'; ALTER TABLE ',TABLE_NAME,' DROP FOREIGN KEY ',constraint_name,';') FROM information_schema.table_constraints WHERE constraint_type='FOREIGN KEY';" >  ${DELETE_SCRIPT}
mysql -p -A < ${DELETE_SCRIPT}
Y acá migro todas las tablas a MyISAM:


CONVERT_SCRIPT=Convert_InnoDB_to_MyISAM.sql
mysql -p -AN -e"SELECT CONCAT('ALTER TABLE ',table_schema,'.',table_name,' ENGINE=MyISAM;') FROM information_schema.tables WHERE engine ='InnoDB';" > ${CONVERT_SCRIPT}
mysql -p -A < ${CONVERT_SCRIPT}

* Nota: Estoy ejecutando desde root, chequear comillas, que el blog las cambia