iists IT


slinks, laisks un kārs uz halvu

Tu domāji nepareizi

Pretēji tam, kā jums varētu šķist, šis superportāls nav miris. Kaut kur glabājas raksti, kurus neesmu publicējis, jo "lol". Pateikt man pretī tu arī neko nevari, jo pateicoties spameru ierakstiem (nevar saprast, tos rakstījuši ļaudis ir ar daļēji mirušām smadzenēm vai vienkārši robotu reklāma, kas rada krietni lielāku dilemmu kā parasts spams), komentāri ir atslēgti.

Tiekamies pēc pāris gadiem.

UPD @ Sept: Re, raksti ir atpakaļ

Sadaļa

Problēmas risināšana IT stilā

Kā vienmēr, vāros gari, TLDR: Asterisk.

Bitei ir laba zona, teikšu ka pat labāka kā Tele2. Bet ne visur. Un ne vienmēr. Teiksim kabinetā man neiet, it kā ir, bet tā -tā. Labā lieta ir tāda, ka parunāt var, bet reāli jau neviens nerunā kabinetā (lai netraucētu kolēģiem), tapēc dodas ārā. Parasti klusākā vieta kur nolīst ofisa ēkai ir tuvāk pilsētas centram, tur arī zona ir krietni labāka, ideāla.

Tā sanācis, ka pēdējā laikā biežāk sēžu kabinetā stāvu zemāk. Tur Bitei man zonas nav pilnīgi necik, nepalīdz nekas, ne forsēts 2G, nekas. Sanāca pat tā, ka kolēģis ar LMT regulāri nāca lejā, iedot telefonu parunāt, jo klients mani nevar sazvanīt. Un ja klients nevar sazvanīt, tad tas ir slikti. Neskatoties uz to ka mūsu ofiss atrodas Valmieras baltajās zīmēs, sajūta tāda kā dzīvotu trešās pasaules valstī. Vienkārši atrodamies pilsētas nomalē un ofisa ēka laikam ir viens liels faradeja būris kas nepatīk bites viļņiem.

Skatījos tarifus, bite tomēr uzvar, tieši tarifu ziņā. Tele2 ir laikam tik pat, bet minu ka Tele2 zona ir tāds pats craps. Un es vēl ļoti ilgi atcerēšos apjājienu ar Tele2 interneta tarifiem. Ja man būtu piektā nokija, tādas problēmas nebūtu, bet jau 10 gadus tālruņiem nav ārējās antenas.

Risinājumiem  bija dažādi, bet mans risinājums šai situācijai  ir tāds - Tā kā Android jau no 2.3 versijas ir native VOIP atbalsts, tad izlēmu būvēt telefoncentrāli. Paņēmu mājās veco raspberry pi, piespraudu tīkla vadu un no kolēģa aizlienētu "mobilo puļķi". Iekšā ieliku Okarti, tādas mētājas no dažādiem projektiem un uzstādīju  Asterisk atvērtā koda telefoncentrāli.

Protams tik vienkārši jau tas nebija, ņemot vērā, ka pieredze ar to ir ļoti ļoti minimāla (necik). Nekas tur negāja, kompilējot nekas negāja un likās ka tas ir absolūts no-go. Pat RasPBX īsti nesagāja uzreiz, bet ar laiku izdevās pielauzt un atkārtoti uzliekot vēl kādas 5 reizes, viss jau gāja pat ļoti raiti.

Sastāvdaļas - Android telefons, Raspberry Pi (der pirmais, pats senākais modelis), RasPBX, USB GSM modulis, Okarte un tīkla vads.

1. Android telefonam pievienoju savu telefoncentrāli kā SIP serveri (extension), ieslēdzu ienākošos zvanus, nodrošinot to ka centrāle mani var sasniegt jebkurā laikā.

2. Telefonam ar kodu *62* aktivizēju zvanu pāradresāciju uz sekundāro numuru laikos kad mans primārais numurs nav pieejams.

3. Centrālē USB puļķī ienākošos zvanus savienoju (trunk) ar savu centrāles numuru (extension) un zvani no sekundārā numura caur internetu nonāk pie manis. Aizmirsu pieminēt, ka (loģiski) kabinetā ir ļoti labs internets.

4. Zvanot kontaktiem, telefons ļauj izvēlēties kā vēlos zvanīt - caur primāro telefontīklu, vai SIP serveri. Tad kad nav zonas, zvanu caur SIP.

Tā kā viss patika, sākotnēji ieslēdzu arī zvanu ierakstīšanu, bet tā kā atvilnē atrastā SD karte bija veca un lēna, tad nebrīnos ka tieši tas bija iemesls tam, ka kādas pirmās 5 sekundes sarunā ir sarunas aizture uz kādām 2 sekundēm. Pēc tam viss ir kārtībā, aizturi, manuprāt, just nevar. Kad noņēmu ierakstīšanu, šāda aizture ir var būt sekundi vai divas pēc sarunas sākšanas.

Vēl viens sarežģījums radās, kad aizlienēto interneta puļķi nomainīju pret patstāvīgi, māsas doto. Abi ir huawei (chan_dongle prasība), bet otrais bija bloķēts. Pirmkārt, jānoņem SIM aizslēgu, bet pašu USB modemu var atslēgt, iegūstot kodu no IMEI numura (internetā atrodamas programmas) un ievadot to AT komandu veidā. Nesaprotu, kādēļ operatori tos vispār bloķē, jo atslēgšana aizņēma vien dažas minūtes.

Ja es pie šāda elementāra risinājuma būtu nonācis kādus 5 gadus atpakaļ, kad starp "lielākajiem" tīkliem nebija bezmaksas minūtes, varētu sev uztaisīt stipri lētākas sarunas, izmantojot vairākus puļķus un SIM karti katram tīklam. Tagad tas, protams, ir bezjēdzīgi, ja vienīgi noliek sev citu centrāli kaut kur ārzemēs, kur pašam sanāk biežāk zvanīt. Bet tam ir var ļoti ērti lietot zerozvanu.

Tā nu šoreiz esmu sadzīvisku problēmu risinājis nevis ar naudu (iegādājoties citu karti ar labāku pārklājumu), bet gan ar IT attapību ;)

Sadaļa

Lenovo S650 Lollipop

Good news, we have working Android 5 available for our phone, Lenovo S650. Of course it's third party again, but it works, there is no bloatware (besides google chrome) preinstalled so it's all good. And we have stock settings and Google Now Launcher by default. So far it looks clean and performant, no HW issues whatsoever. EDIT: not a real lollopop :(

Sadaļa

Lenovo S650 AOSP 4.4.2 (Kitkat) + common issues I've had installing it

Lenovo S650 is a great phone and I think it's newer brother, S660, is even better. There are only 2 real drawbacks:

  • it has no built in compass (which is really really bad)
  • it has very special software, VibeUI on it.

The VibeUI. It can very well be kitkat (yes, they do have official kitkat update now), but you wouldn't know that unless you look at the software version, because they have modified everything. Even settings menu is custom, I hate that. Another issue is that fishy antivirus thingy that keeps bugging me. It could run in background, but instead it's always on status bar. I hate that. I tried to escape it in any way, but there is no support, seems like everyone loves the VibeUI.

Last night I found out there is an AOSP kitkat version that actually works. So i've written a small article how I installed it on my S650, because this custom firmware is published on russian site and while i can somehow read it, i believe there are people that cannot.

First, here's a link to the forum topic that has various firmwares: http://4pda.ru/forum/index.php?showtopic=567114

IMEI backup

It's very possible that you will loose your mobile connectivity because of invalid IMEI error after flashing any firmware. You have to write down both IMEI numbers of your phone just to be safe. You have been warned. Do this first and save the numbers.

Custom recovery

You will need TWRP recovery for your phone. I got it from here: http://lenovo-forums.ru/topic/3499-lenovo-s650-%D1%80%D0%B0%D1%81%D1%88… (or here)

I had ROW version installed already because my phone was ROW.

Firmware

I chose "Google_AOSP by Zver999666", because it was latest that had all features i wanted. It's posted here: http://4pda.ru/forum/index.php?showtopic=567114&st=1380#entry35813841

There are 3 downloads: ROW version, CN version and Root that works on both. You have two options to choose from: ROW ROM or CN ROM, but you have to flash version that your current system has. I tried to run ROW, but I got stuck on a boot loop with coloured dots flying around, never finishing the boot.

ROW TO CN TWRP change

So what i did is, i changed TWRP from ROW to CN by flashing a new one and I also flashed filesystem fix rp_5.5+0.5gb-cn.zip, originally posted here, but the link didn't work so i got it from here: http://lenovo-forums.ru/index.php?app=forums&module=forums&section=atta… .

It  also comes with an instruction: you flash TWRP CN version (2.7), reboot and then flash the format.zip that has been automatically created in root of sdcard.

Then i flashed the rp_5.5+0.5gb-cn.zip mentioned earlier and it was all good now.

Flashing CN version

So yeah, I flashed the CN version, then Root pack and it just worked.

Invalid IMEI

This one has been bugging me from the very first night I got the phone and flashed it. I think i accidentally formatted the wrong partitions or something, but i had to fix IMEI. Apparently it was erased so I had to fix it somehow. IMEI1 is written on the back of the phone, I calculated another IMEI using online calculator (cannot recall which one), because you cannot just provide a random one. I used those 2 IMEI numbers and software called imei_mtk6515 (I know we have MTK6582, but it indeed works) from https://github.com/luckasfb/Fly_IQ255_Firmware_Build/tree/master/tools/…

You have to run it like this: imei.exe <15digit_IMEI_1> <15digit_IMEI_2> MP0B_001
I have linux, but the exe file still works even for me, so apparently it doesn't matter if you have windows or linux.

This command generates nvram file MP0B_001, that you have to put in /data/nvram/md/NVRAM/NVD_IMEI/ . To accomplish this, i used software called "ES File explorer" that has "Root browser" option which allows copying the MP0B_001 and putting it in location provided above.

One more thing: It didn't work for me at first, but i figured out i have to set permissions for the file, 660 (rw rw -).

Reboot the phone and you should have coverage now.

Sadaļa

Valmierā apkaro veselīgu dzivesveidu

Pēc šādas, neregulētā tipa gājēju pārejas šķērsošanas ar velosipēdu un vēl vienas regulētas gājēju pārejas šķersošanas, aptuveni 200 metrus tālāk, Valmieras Policijas operatīvais transports ieslēdza bākugunis un pabrauca zem 282.1 zīmes, lai mani apstādinātu.

Protokols izrakstīts par CSN 1.21 punktu un 224 punktu, sods piemērots pēc Administratīvo Pārkāpumu Kodeksa 149. panta 21. daļas. Tā kā man pie rokas nebija CSN grāmata, tad nezināju, ko šis punkts saka, bet man tika interpretēts tadā veidā, ka velosipēdisti nedrīkst šķersot pāreju atrodoties uz velosipēda (kas nav tiešā veidā rakstīts CSN noteikumos, bet var noprast tikai pēc "kas nav atļauts, ir aizliegts" principa, bet to daļu man neteica). Vaļā tiku palaists tikai tad, kad atzinu, ka saprotu savu kļūdu un parakstīju protokolu.

Šo pašu ekipāžu ļoti bieži nākās redzēt Valmierā, Rīgas ielas un A. Upīša ielas krustojuma stāvlaukumā, ķerot gājējus kad tie pāriet 5 metrus platu ielu pie sarkanās gaismas un preventīvi izrakstot sodus, draudot ar naudas sodiem, neskatoties uz to, ka tuvumā nav bijuši citi satiksmes līdzekļi. Šāda veida sodīšanu es atbalstu, tā ir loģiska un ja jau jāatrod kādu ko sodīt, tad šis būs tas labākais veids, un šis būs tas labākais uzdevums ko policijas ekipāžai darīt.

Ja šķiet ka ar velosipēdu braukt ir lētāk, kā piesārņojot vidi, piemēram, braukt ar taksometru, tad tā nav taisnība - neskatoties uz to, ka iepriekš CSN nav pārkāpti, tika sastādīts protokols ar 7 Eur naudas sodu un vairākkārt teikts par maksimālo, 30 Eur sodu. Administratīvā pakalpojuma protokola sastādīšanas procesā tiek vaicāta arī darba vieta un alga (??), pārvaicājot šo nepieciešamību, tas tiek argumentēts ar Ministru Kabineta sastādītu dokumentu.

Manā situācijā satiksmes uzraudzības rotas jaunākais inspektors Rimants Bluķis veica "ļoti labu" preventīvo darbu un sodīja mani par ielas šķērsošanu gaišajā diennakts laikā, mirklī kad netika traucēta citu transporta līdzekļu satiksme (policijas auto atradās aptuveni 30 metrus no gajēju pārejas). Šāda policijas darbinieku attieksme un darbība ir ļoti neizprotama, iepriekš bija uzskats, ka Valmierā ir pozitīvāka attieksme pret veselīga dzīvesveida uzturētājiem.

Papildinājums: Nedaudz vēlāk atradu sarakstu ar amatpersonām izmaksāto darba algu par 2013.gada novembri - tas daudz ko izskaidro tīri no psiholoģiskā viedokļa, jo, kā saka, "kad Tev rokās ir āmurs, tad viss izskatās pēc naglām" un tādos apstākļos arī es laika gaitā zaudētu cilvēcīgumu un sāktu rīkoties līdzīgi.

Sadaļa

EXIF rename

Atjaunoju sen pazaudētās bildes, bet tā arī nebiju sašķirojis. Uzmontēju mazu koda gabalu, kas tās vismaz sakārto pa mapītēm.

 

for file in atguutaas_bildes/*jpg
do
    # get date from exif
    dst=$(exif -t 0x9003 -m $file | sed 's/ /-/g' | sed 's/://g')
    dst_date=$(echo $dst | cut -d "-" -f 1)
    dst_time=$(echo $dst | cut -d "-" -f 2)

    filename="${file##*/}"
    newname=$dst_date/$dst_date-$dst_time-$filename.jpg

    # test for empty date
    if [ -z "$dst" ] 
    then 
        newname=$(basename $file)
    fi

    # create folder if doesn't exist
    if [ ! -d sorted/$dst_date ] 
    then
        mkdir -p sorted/$dst_date
    fi

    # move pics
    mv $file sorted/$newname
    #echo sorted/$newname

done

Sadaļa

Sweex LW150 firmware upgrade

Just like every other el-cheapo home wifi router i've had lately, this one (Sweex LW150) gave up too (of course only when warranty was over). Occasionally hanging up, quietly waiting for reset.  

I have TPlink lying around too, but it would be too fancy, having wifi router with a USB port. So I looked for firmware upgrades, but found none, even in sweex homepage. Googled firmware I was currently on (H1_V3.2.5e) and found, as it appears, an alternative device Tenda W268R.

Why would I even think of flashing different firmware in it? Lucky guess - I found this listing and assumed W268R is rebranded LW150. 

So yeah, i did flash it (not so much with fingers crossed, more with hope of getting new hardware) and it still works, just different Web-UI. Same settings, just like casual upgrade. Rebooted several times, reset to default config, reconfigured and will see how it acts during nightly data backup sessions.

TLDR: If you have Sweex LW150, you can upgrade it with firmware from Tenda W268R. Just look out for old firmware name, you gotta look out for correct prefix (H1_V3.xxx)

Sadaļa

How to fix low mic volume issue on Cubot GT99

Cubot GT99 is cheap yet beautiful quad core android phone from yet another Chinese manufacturer. Of course there's no support or anything for it and user base is low.

I struggled with this issue where other party was unable to hear me because my mic level appeared to be really low. There is no setting to change it. First i thought that might be faulty hardware or something, but it works okay when in speaker mode so i wanted to figure it out.

Phone is based on MKT (MTK6589) chip so we'll use Mobileuncle MTK Tools to boost mic volume.

1. Download application from Play Store: Mobileuncle MTK Tools

2. Open application, navigate "Engineer Mode > Engineer Mode ( MTK )", then swipe to "Hardware Testing" tab and open "Audio > Normal Mode"

3. Watch carefully for "Type", change to "Mic".

4. Change values for Level 0 to 6 one by one and don't forget to press "Set" after each change.

Note: for even louder mic, you can set all values to 255

Level 0 - 112
Level 1 - 136
Level 2 - 160
Level 3 - 184
Level 4 - 208
Level 5 - 232 
Level 6 - 255

After you've saved (Set) last setting, you may exit the application and everything should work. If you are like me and you want to see other settings too, go ahead. Just don't fiddle with them much as you can easily "break your phone" by changing wrong setting. 

btw, here's the easiest way to root cubot gt99 in case you need it. works both on windows and linux - http://blog.geekbuying.com/index.php/2013/07/31/how-to-root-cubot-gt99-mtk6589-quad-core-smart-phone/

Piezīme: Šis ir vēl viens angļu valodas ieraksts samērā retai problēmai, kurai internetā neradu risinājumu un atrisināju pats.

Sadaļa

Flash cl-osd into g-osd using usbasp S51 avr

I've had this g-osd for couple years already which lacked few features. There was very promising project coming up on rcgroups which stated that we'll be able to have better firmware for those el-cheapo OSD's.

CL-OSD project page

I have no experience with chip programming whatsoever so i thought this is going to be really complicated, keeping in mind that i have ubuntu linux computer.

So i bought this cheap programmer off ebay (more permananent link from dx instead) , called "USBASP USBISP Downloader Programmer for 51 AVR". Was really cheap, like 5$ shipped.

Use picture from project site (see G-OSD pic) as a reference to solder of wires in place. Test which is correct wire and solder down connector pins.

Download subversion if you don't have any
# sudo apt-get install subversion

Download latest cl-osd code:
# svn checkout http://cl-osd.googlecode.com/svn/trunk/

Install avrdude on ubuntu, like this
# sudo apt-get install avrdude

Then change into cl-osd directory
cd trunk

Note: if you plan changing anything, this is the source. Otherwise (and i suggest doing that for the first time, just change directory that contains pre-compiled binaries.
# cd G-OSD

Connect the programmer (and the OSD device), programm chip like this:
# sudo avrdude -p m88 -c usbasp -U flash:w:cl-osd.hex -U eeprom:w:cl-osd.eep

This didn't work out for me because of some errors, so i forced the flash:
# sudo avrdude -p m88 -c usbasp -U flash:w:cl-osd.hex -U eeprom:w:cl-osd.eep -F

Then some upload progress happened and less than minute later i was ready to hook it up to video link again. And it works!

Sadaļa

How to root Pipo M9 using Ubuntu Linux

 

Note: updated version of this article available on my other website, dedicated to pipo m9 device only: http://www.pipo-m9.info/

 

Was unable to get the windows driver working properly, so i gave Ubuntu 13.04 a shot at rooting Pipo M9 device.
We're running all commands as root, so start with "sudo su". Your prompt should start with "#" now. 

1. Download usual windows rooting archive from http://www.mediafire.com/download/dzx599tkq0rdehl/RK3188_ROOT_Tool.zip (zip password is "geekbuying.com".

2. Get adb. I didn't have one, so i installed it like this:
# add-apt-repository ppa:nilarimogard/webupd8
# apt-get update
# apt-get install android-tools-adb android-tools-fastboot

3. Make sure your computer can see device. Turn on "USB Debugging", connect usb cable and see dmesg output.
# dmesg
Should return something like this:
[45441.193934] usb 2-1.3: new high-speed USB device number 12 using ehci-pci
[45441.286976] usb 2-1.3: New USB device found, idVendor=2207, idProduct=0010
[45441.286983] usb 2-1.3: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[45441.286987] usb 2-1.3: Product: M9
[45441.286991] usb 2-1.3: Manufacturer: rockchip
[45441.286994] usb 2-1.3: SerialNumber: KI8VAVXFUD

4. Get the udev rolling
# sudo gedit /etc/udev/rules.d/99-android.rules
paste this text: SUBSYSTEMS=="usb", ATTRS{idVendor}=="2207", ATTRS{idProduct}=="0010", MODE="0660", OWNER="root"

# service udev restart
# udevadm control --reload-rules
# echo "0x2207" > ~/.android/adb_usb.ini

5. Hopefully adb can see device now (fingerscrossed)
# adb kill-server
# adb devices 
Should return this:
List of devices attached 
KI8VAVXFUD device

6. Explore the RK3188_ROOT_Tool zip you downloaded and extracted earlier, move into directory
#  cd /home/janis/Downloads/RK3188-root
Pay attention to TPSparkyRoot.bat file, you should open it in text editor and execute it line by line (following the directions in echo parts of code). 
After you run the commands listed in bat file, your device should be succesfully rooted and your tabled should have new icon (SuperSu app) on home screen.

 
Ierakstu izdomāju uzbakstīt angliski, jo man neizdevās atrast risinājumu šai problēmai. Iespējams kādam citam noder. 

Sadaļa