Wednesday, June 12, 2013

C# Send/Read SMS using MT6225(Chine) Cellular

Code works over Windows XP/Sp2 + VS2008, problem is on Windows 7/x64


First you need download/install driver for Windows 7 from [1], after that download c# sample from [2].
for understand code, you need know At commands, that code only send AT command to Comx for interchange information with the cellular phone.
Same usually commands:

AT 
  (if result is OK, then connection is good)
AT+CMGF=1
    (Set message format  0:New/1:Read)
AT+CMGF?
    (Read current setting)
AT+CMGF=?
    (Show list possible values) 
AT+CMGL="ALL"
    (List of all messages)

Classic sequence:
AT+CMGF=1
AT+CMGL="ALL"

References:
[1] MT6225 for W7/x64 Driver http://hotfile.com/dl/42358552/cb0f022/MTK6227_Driver__For_XP__Vista.rar
[2] C# Source Code for test http://www.elguille.info/colabora/NET2006/mauro_melgar_envio_sms.htm
[3] AT Commands http://www.telit.com/module/infopool/download.php?id=542


Wednesday, May 29, 2013

Extend USB with UTP (20mts) Solved!



White Orange & Orange <=> Red
White Green <=> White
Green <=> Green
Rest <=> Black.


References:

[1] http://www.instructables.com/id/How-to-Extend-yout-USB-using-UTP/step2/The-making-of-Part-1/
[2] http://tutallerdebricolaje.com/como-hacer-un-alargador-o-extensor-usb/
[3] http://forums.hardwarezone.com.sg/mass-order-corner-251/mo-power-over-ethernet-poe-convertor-turn-any-ip-camera-into-poe-device-3826552.html

Linux::Network configuration::CentOS

1) Configure by console interfaces
system-config-network
system-config-securitylevel-tui
/etc/init.d/network restart
/etc/init.d/NetworkManager restart
service network restart

2) Working by scripts
2.1) Static

vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:11:22:33:44:55
IPADDR=192.168.1.x
NETMASK= 255.255.255.0
NETWORK= 192.168.1.0
ONBOOT=yes
GATEWAY= 192.168.1.y
TYPE=Ethernet

2.2) DHCP
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes

vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=www.kusaconsultores.com
GATEWAY=192.168.1.1

vi /etc/resolv.conf
nameserver 200.48.225.130
nameserver 200.48.225.146

/etc/init.d/network restart

References:
[1]http://rm-rf.es/como-configurar-tarjetas-de-red-en-red-hat-enterprise-centos-y-fedora-core/
[2]route
http://systemadmin.es/2009/04/anadir-rutas-route-add-en-centos

Thursday, May 23, 2013

Trying Mount W7 Image (Ghost) over VMWare

Problem:
I need start Virtual Machine with W7, so  i don't have DVD Installer, but i have W7 image (created with Norton Ghost).

I Think make one iso file with W7 image for mount that, next mount ghost boot tool for restore from W7 iso file, but ghost not read files from iso mounted.

One alternative is mount USB as Hard Disk, but now my usb have only 4Gb (image file is ~ 7Gb )
I Think too mount iso image over virtual drive using winmount http://www.winmount.com/winmount-free.html


 VMware vCenter Converter StandAlone (tool for convert your physical computer to virtual machine)

thinking more, then i choice one solution very very crazy.

I try shrink my physical partition for add one aditional partition using Computer Management, Disk Managment (10Gb), then attach that new partition on VMWare Disk and try  restore image with Ghost.

So,  Microsoft Windows Server 2008 R2 – Media is write protected. For resolve that you need execute next commands.

cmd
diskpart 
list disk
select disk N
attributes disk clear readonly


* Too i try put .gho file into .iso for mount then restore, for that i need use iso editor, por example poweriso:
http://www.poweriso.com/download.htm  (v5.6)
Name: TEAM CRUDE
Key   : MIT68-I7WLE-CAGZN-DJYPR-PVNE4

* Alternatives
http://www.magiciso.com/download.htm
http://www.minidvdsoft.com/isocreator/

* Ghost32 ( For Convert .gho to .vmdk )

>ghost64 -clone,mode=restore,src=AmdW7-100.GHO,dst=toW7-100.vmdk -batch -sure

[1] http://www.mediafire.com/download/s2xp8f734b5a5xa/Ghost32_ghost64_11.5.1_Symantec.rar
[2] Convert .gho to .vmdk using ghost32 http://www.gregoryaubry.com/virtualisation-2/converting-image-file-format-from-gho-to-vmdk-and-from-vmdk-to-gho-symantec-connect/

*Plop BootManager (force boot from USB on VMware) http://www.plop.at/en/bootmanager/download.html

* System Repair Disk (ISO) http://www.windowsreinstall.com/winre/createfromiso/#Downloads


* http://www.filecrop.com (for search resources)

Wednesday, May 22, 2013

Sql Server 2008 Mirroring Tips

Problem:
  *, **, ***
Solution:


Common Error Messages:
1) The server network address TCP:// can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.



References:
[1]Mirroring vs Replication and Others http://nilebride.wordpress.com/2011/07/24/log-shipping-vs-mirroring-vs-replication/
[2] Introduction http://www.guillesql.es/Articulos/database_Mirroring_SQL_Server_2005_2008.aspx

[3] High Recomended http://www.mssqltips.com/sqlservertip/1705/implementing-database-mirroring-in-sql-server-2005-across-domains/

[4] Resume http://blog.capside.com/2012/04/10/como-configurar-db-mirroring-utilizando-certificados-sql-server-2008-r2-db-mirroring-untrusted-servers-using-certificates/
[5] Mirroring 2008 using GUI http://www.databasejournal.com/features/mssql/article.php/3828341/Database-Mirroring-in-SQL-Server-2008.htm
[6] *  http://blog.sqlauthority.com/2010/01/11/the-server-network-address-tcpsqlserver5023-can-not-be-reached-or-does-not-exist-check-the-network-address-name-and-that-the-ports-for-the-local-and-remote-endpoints-are-operational-microso/
[7] ** http://www.gknzcfc.net/subsite/server-tcp-provider-failed-to-listen-on-1433-tcp-port-is-already-in-use.html
[8] *** https://www.simple-talk.com/sql/database-administration/sql-server-endpoints-soup-to-nuts/
[9] SQL Server Data Encryption http://selfhandle.com/post/2011/08/05/How-to-enableremove-Transparent-Data-Encryption-%28TDE%29.aspx


Monday, May 20, 2013

Nucom model R5000UNv2 Settings (Enable VNC ports by telnet)

Problem:
I need open vnc port 5900/5901 but i don't acces to GUI console(Web), only i have access to network by ssh. Then i need login to router and try set that with commands.


Syntax:

natp add <name> <WAN Interface> <TCP/UDP|TCP|UDP> <External Port(start:end)>
              <Internal Port(start:end)> <ipaddr>

 

#telnet 192.168.1.1


> wan show   # for show wan interfaces

> natp show table # for show current settings

> natp add vncport ppp0 TCP/UDP 5901:5901 5901:5901 192.168.1.100

ready!

Notes:
* Try use TP-Link W8960N for bandwidth control.
* If router mac is AABBCCDDEEFF try use BBAADDCCFFEE and user admin (Probably work)

References:
[1] http://www.adslzone.net/postt276042.html




Friday, May 17, 2013

Alternatives to dyndns (dyn.com)

dyndns.org/.com -> dyn.com (you need log to panel at least one time /month)

Alternatives:
 a) https://dynu.com
 b) http://freedns.afraid.org



References

[1] Server Software/Dns & DDns Providers http://www.dyndnsservices.com/tech.htm
[2] Providers list http://dnslookup.me/dynamic-dns/









Friday, May 03, 2013

SQL Server same versions and limits


SQL Server 2008 Express has a 4 GB limit on database size 
SQL Server 2008 R2 Express has 10 GB.
Windows Server 2008 R2 Evaluation (180 days)

Thursday, April 18, 2013

Sunat: impuesto por cuarta categoría/recibo por honorarios.


Declarar recibos por honorarios en PDT 601

Calcule su impuesto por cuarta categoría. http://mass.pe/node/305

SUNAT - RECIBOS POR HONORARIOS - EJERCICIO 2013
http://www.khronos.com.pe/SUNAT-RECIBOS-POR-HONORARIOS.html

Ejemplos: http://www.forosperu.net/showthread.php?t=174125 (Leer respuestas)

Php Mvc


References
[1] http://anantgarg.com/2009/03/13/write-your-own-php-mvc-framework-part-1/
[2] http://www.ajaxline.com/10-best-php-frameworks-and-cms

http://stackoverflow.com/questions/11770104/cms-routing-in-mvc
http://stackoverflow.com/questions/7361638/does-anyone-know-a-good-php-cms-built-on-a-mvc-framework

http://codereview.stackexchange.com/questions/14550/mvc-structured-cms

PostgreSQL json fields

select name->'es_PE',* from product_template where name->>'es_PE' like '%MEGACI%'   References: [1] https:/...