Monday 14 February 2011

Configuring The CubeRevo IPBox 9000 HD

Installing Firmware

About the Images

There are three different relevant partitions on the cuberevo.
  • The boot partition, into which uboot is installed.
  • The kernel partition.
  • The database partition.
Normally, you wouldn't mess about with the boot partition - this is usually only done if you are upgrading the boot loader to allow you to use other images which are installed on the memory stick (e.g. Enigma2).

The best image to look for is usb_all_noboot.img, which installs both the kernel and the database partition in one go. If you just wanted to update the kernel, or just update the database, there are the kernel and db images to use.

Acquiring the Upgrade

Format a memory stick as FAT16 or FAT32.
Download the appropriate firmware from ftp.cuberevo-digital.com and rename to usb_upgrade.img.
Copy usb_upgrade.img to the memory stick.

Doing the Upgrade

Put the memory stick into the USB port on the decoder.
Hold the front panel power button and switch on. When you see 'BOOTING', press the up button on the front panel.

The upgrade will then take place, Loading / Erasing / Flashing / Done.
Do not interrupt this process!!
When you see 'Done', you can press the power button, and you should see Booting / Loading.

If you see ERR 10, make sure that the memory stick was formatted for FAT16 or FAT32, and try again.

Configuring the Firmware

The Serial Port View

The CubeRevo has a serial port, and debug information is passed out to it during all operations.

The Update Process
got all_noboot image.
updating boot loader.
DO NOT TURN OFF THE POWER while updating!!!
erase 0xa0040000 - 0xa1ffffff
..
Erased 2 sectors
..........
Erased 2 sectors
..
write to flash...
completed...
Select another file.
Or press power to reboot.

Completed !
Boot Process
U-Boot 1.3.1 (May 1 2009 - 17:58:06) - stm23-2008-03-19
Board: cuberevo (0x2D42C041)
Board: 12 dotmatrix vfd front
DRAM: 128 MB
Flash: 32 MB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Reserve 0x2010000 bytes from 0xa5ff0000 for DGS upgrade buffer.
Setup mac address.
booting...

## Booting image at a0060000 ...
Image Name: Linux 2.6
Image Type: Blackfin Linux Kernel Image (gzip compressed)
Data Size: 2052158 Bytes = 2 MB
Load Address: 84701000
Entry Point: 84702000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Warning: Unable to determine if kernel is built for 29- or 32-bit mode!

Starting kernel console=ttyAS1,115200 panic=3 root=/dev/mtdblock3 bigphysarea=1500 quiet - 0x00000000.

INIT: version 2.86 booting
mount: you must specify the filesystem type
sd 1:0:0:0: [sdb] Assuming drive cache: write through
sd 1:0:0:0: [sdb] Assuming drive cache: write through
Checking all file systems...
fsck 1.39 (29-May-2006)
Hostname: (none).
INIT: Entering runlevel: 3
usb 1-1: failed to restore interface 0 altsetting 0 (error=-71)
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
Mounting sysfs on /sys....
sbox init script $Rev: 4454 $
make directory /var/bin/init.d
install default /etc/host.conf
install default /etc/hosts
install default /etc/passwd
install default /etc/group
cp: /etc/group.default: No such file or directory
installing /etc/group failed.
install default /etc/vsftpd.conf
install default /etc/httpd.conf
install default /etc/smb.conf
open success
checking database revision.
TV mode : 720x576-50i
* Looking for chipset model and version...
Load module stos_core [?] by insmod (pid 983)
Load module stsys_ioctl [253] by insmod (pid 1023)
STx7109 C detected (29BITS)
* Loading companions
sd 2:0:0:0: [sdb] Assuming drive cache: write through
sd 2:0:0:0: [sdb] Assuming drive cache: write through
usb 1-1: failed to restore interface 0 altsetting 0 (error=-71)
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
* Inserting Multicom
* Inserting STAPI Module
Load module stuart_core [253] by insmod (pid 1164)
Load module stevt_core [?] by insmod (pid 1164)
Load module stcommon_core [?] by insmod (pid 1164)
Load module stclkrv_core [?] by insmod (pid 1164)
Load module stfdma_core [251] by insmod (pid 1164)
Load module stmerge_core [?] by insmod (pid 1164)
Load module stavmem_core [?] by insmod (pid 1164)
Load module stbuffer_core [?] by insmod (pid 1164)
Load module stinject_core [?] by insmod (pid 1164)
Load module sti2c_core [?] by insmod (pid 1164)
Load module stpio_core [?] by insmod (pid 1164)
Load module stdenc_core [?] by insmod (pid 1164)
Load module stlayer_core [?] by insmod (pid 1164)
Load module stvout_core [?] by insmod (pid 1164)
Load module stvtg_core [?] by insmod (pid 1164)
Load module stvid_core [?] by insmod (pid 1164)
Load module stos_core [?] by insmod (pid 1164)
Load module stvmix_core [?] by insmod (pid 1164)
Load module stgxobj_core [?] by insmod (pid 1164)
Load module staudlx_core [250] by insmod (pid 1164)
Load module stblit_core [?] by insmod (pid 1164)
Load module stsubt_core [249] by insmod (pid 1164)
Load module stsmart_core [248] by insmod (pid 1164)
Load module sthdmi_core [?] by insmod (pid 1164)
Load module stpti4_core [?] by insmod (pid 1164)
Load module stuart_ioctl [247] by insmod (pid 1168)
Load module stevt_ioctl [246] by insmod (pid 1168)
Load module stcommon_ioctl [245] by insmod (pid 1168)
Load module stclkrv_ioctl [244] by insmod (pid 1168)
Load module stfdma_ioctl [243] by insmod (pid 1168)
Load module stmerge_ioctl [242] by insmod (pid 1168)
Load module stavmem_ioctl [241] by insmod (pid 1168)
Load module stbuffer_ioctl [240] by insmod (pid 1168)
Load module stinject_ioctl [239] by insmod (pid 1168)
Load module sti2c_ioctl [238] by insmod (pid 1168)
Load module stpio_ioctl [237] by insmod (pid 1168)
Load module stdenc_ioctl [236] by insmod (pid 1168)
Load module stlayer_ioctl [235] by insmod (pid 1168)
Load module stvout_ioctl [234] by insmod (pid 1168)
Load module stvtg_ioctl [233] by insmod (pid 1168)
Load module stvid_ioctl [232] by insmod (pid 1168)
Load module stvmix_ioctl [230] by insmod (pid 1168)
Load module stgxobj_ioctl [229] by insmod (pid 1168)
Load module stblit_ioctl [227] by insmod (pid 1168)
Load module stsubt_ioctl [226] by insmod (pid 1168)
Load module stsmart_ioctl [225] by insmod (pid 1168)
Load module sthdmi_ioctl [224] by insmod (pid 1168)
Load module stsys_ioctl [223] by insmod (pid 1168)
Load module stpti4_ioctl [222] by insmod (pid 1168)
* Creating device nodes in //dev/stapi
sd 3:0:0:0: [sdb] Assuming drive cache: write through
sd 3:0:0:0: [sdb] Assuming drive cache: write through
starting network.
usb 1-1: failed to restore interface 0 altsetting 0 (error=-71)
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
info, udhcpc (v0.9.9-pre) started
debug, Sending discover...
size : 488386584
start main application.
HDD Mode
debug, Sending discover...
sd 4:0:0:0: [sdb] Assuming drive cache: write through
sd 4:0:0:0: [sdb] Assuming drive cache: write through
usb 1-1: failed to restore interface 0 altsetting 0 (error=-71)
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
compiled at 02/09/11 17:53:50 by woolee@build
dir_home "/usr"
dir_db "/var"
dir_fdb "/var"
dir_hdb "/usr/db_hdd"
dir_edb "/var"
dir_scr "/usr/share/sbox/scr"
dir_mpg "/usr/share/sbox/mpeg"
dir_mpghdd "/usr/share/sbox/mpeg"
dir_media "/media"
dir_tv "/media"
dir_streaming "/media/multi"
dir_rad "/media"
dir_mp3 "/media/mp3"
dir_divx "/media/divx"
dir_pic "/media/photo"
dir_img "/usr/share/sbox/image"
dir_fnt "/usr/share/sbox/font"
dir_locale "/usr/share/locale"
dir_plugin "/var/plug-in"
dir_pluginhdd "/usr/dir_db/plugin"
dir_addon "/var/add-on"
dir_addonhdd "/usr/dir_db/addon"
dir_tmp "/tmp"
dir_bin "/usr/bin"
dir_epgdata "/media/epg"
debug, Sending discover...
debug, Sending select for 192.168.2.23...
info, Lease of 192.168.2.23 obtained, lease time 86400
route: SIOC[ADD|DEL]RT: No such process
adding dns 192.168.2.1
info, udhcpc (v0.9.9-pre) started
debug, Sending discover...
debug, Sending select for 192.168.2.23...
info, Lease of 192.168.2.23 obtained, lease time 86400
route: SIOC[ADD|DEL]RT: No such process
adding dns 192.168.2.1
sd 5:0:0:0: [sdb] Assuming drive cache: write through
sd 5:0:0:0: [sdb] Assuming drive cache: write through
starting vsftp daemon with /var/etc/vsftpd.conf
starting http daemon with /var/etc/httpd.conf
starting smb daemon with /var/etc/smb.conf
usb 1-1: failed to restore interface 0 altsetting 0 (error=-71)
Buffer I/O error on device sdb, logical block 0
Buffer I/O error on device sdb, logical block 0
/etc/rc.d/init.d/functions: line 19: /sbin/consoletype: No such file or directory
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
info, udhcpc (v0.9.9-pre) started
debug, Sending discover...
debug, Sending select for 192.168.2.23...
info, Lease of 192.168.2.23 obtained, lease time 86400
route: SIOC[ADD|DEL]RT: No such process
adding dns 192.168.2.1
sd 6:0:0:0: [sdb] Assuming drive cache: write through
sd 6:0:0:0: [sdb] Assuming drive cache: write through
ioctl failed.(Invalid argument)
[STAPI] SYS_Init()
[STAPI] PIO_Init()
[STAPI] EVT_Init()
[STAPI] MBX_Init()
[STAPI] DMA_Init()
[STAPI] DEMUX_Init()
[STAPI] INJECT_Init()
[STAPI] CLKRV_Init()
[STAPI] DENC_Init()
[STAPI] VTG_Init()
[STAPI] VOUT_Init()
[STAPI] LAYER_Init()
[STAPI] BLIT_Init()
[STAPI] GRAFIX_Init()
*** Error GRAFIX_Init:196: [TODO] remove text init
[STAPI] VMIX_Init()
[STAPI] VID_Init()
[STAPI] AUD_Init()
[STAPI] HDMI_Init()
[FRONT] [VFD] never use the power symbol

[STGFX] W[720]xH[576]
[STGFX] allocate osd
[STGFX] allocate osdbuf
STLAYER_OpenViewPort Sucess
STLAYER_OpenViewPort Sucess
input device name "/dev/input/event0"
img: prefix "/usr/share/sbox/image"
[PVR] open for play : 0 : 0x0
[PVR] open for record : 0 : 0x0
[PVR] open for record : 0 : 0x1
[PVR] open for play : 0 : 0x1
[PVR] open for record : 0 : 0x2
[PVR] open for record : 0 : 0x3
[TUNER] SMART_TUNER is enabled, start detect
[TUNER] try to detect 0
[TUNER] slot 0 : DVB-T
[TUNER] try to detect 1
[TUNER] slot 1 : DVB-S2
i2c_open success!(adap2),addr(0x68)
i2c_open success!(adap2),addr(0x60)
[TELETEXT] buffering thread start
slot_monitor
register RM recource 1 1 1
register AI recource 2 1 1
register CA recource 3 1 1
register MMI recource 64 1 1
[slot_monitor] smarcard resourceid = 00700041
register smartcard recource 112 1 1
epgdump: starting main thread

[LOCAL TIME] eepromdb_key_time : 137
piece: prefix "/usr/share/sbox/image"
487379970
/media is ready.
dir_home "/usr"
dir_db "/usr/dir_db"
dir_fdb "/usr/dir_db"
dir_hdb "/usr/db_hdd"
dir_edb "/usr/dir_db"
dir_scr "/usr/share/sbox/scr"
dir_mpg "/usr/share/sbox/mpeg"
dir_mpghdd "/usr/share/sbox/mpeg"
dir_media "/media"
dir_tv "/usr/var/media/tv"
dir_streaming "/usr/var/media/streaming"
dir_rad "/usr/var/media/radio"
dir_mp3 "/usr/var/media/mp3"
dir_divx "/usr/var/media/divx"
dir_pic "/usr/media/photo"
dir_img "/usr/share/sbox/image"
dir_fnt "/usr/share/sbox/font"
dir_locale "/usr/share/locale"
dir_plugin "/usr/dir_db/plugin"
dir_pluginhdd "/usr/dir_db/plugin"
dir_addon "/usr/dir_db/addon"
dir_addonhdd "/usr/dir_db/addon"
dir_tmp "/usr/tmp"
dir_bin "/usr/bin"
dir_epgdata "/usr/media"

[auto_desc] auto_desc_init
[auto_desc] condition wait....
[meta_check] done

/dev/sda2:
setting standby to 10 (50 seconds)
[RTC] clear alarm
use "/usr/share/locale/en/LC_MESSAGES/sbox.mo" as mo file.
[TZ] TZ updated with "/usr/share/zoneinfo/Etc/UTC"
hddinit success
> execute ui_init.
[STAUD] volume : 0
[PIECE] Open "volume" piece... 24 / 65
[PIECE] Open "progressbar_volume" piece... 25 / 65
[PIECE] Open "frame_mute" piece... 26 / 65
[PIECE] Open "dark_help" piece... 27 / 65
[PIECE] Open "background" piece... 28 / 65
[PIECE] Open "frame_big_radio_background" piece... 29 / 65
[PIECE] Open "frame_small_radio_background" piece... 30 / 65
[START]system locking check
[STAUD] current aud info
stream content : 0
freq : -1
### Warning aud_set_spdif_mode:270: [STAUD] can not stop audio(already stopped ??) : STAUD_ERROR_DECOP
[STAUD] spdif compressed
### Warning aud_set_spdif_mode:305: [STAUD] can not start audio(maybe started by DVM/PRM ??) : ST_ERRR
[STAUD] hdmi noncompressed
[RTC] clear alarm
[PIECE] Open "buttons_chlist" piece... 31 / 65
[PIECE] Open "button_simple_chlist_title" piece... 32 / 65
[PIECE] Open "textbox_chlist_epginfo" piece... 33 / 65
use "/usr/share/locale/en/LC_MESSAGES/sbox.mo" as mo file.
[PIECE] Open "button_base_darkmain" piece... 41 / 65
[AUTOMOUNT] automount_init ... !
[AUTOMOUNT] !! detected new usb device [sdb]
[AUTOMOUNT] ... mount [sdb]...
[AUTOMOUNT] ..... num of partition in sdb = 2
[AUTOMOUNT] ..... mount -o sync /dev/sdb1 /mnt/usb/usb0
[PVR_CORE]there is no live
[AUTOMOUNT] ..... mount -o sync /dev/sdb2 /mnt/usb/usb1
mount: /dev/sdb2 is not a valid block device
[AUTOMOUNT] ..... failed to mount , remove target directory [/mnt/usb/usb1]
usbinfo[0].host : scsi6
usbinfo[0].vendor : JetFlash
usbinfo[0].model : Transcend 2GB

[AUTOMOUNT] ... mount SUCCESS [sdb]
[PIECE] Open "msgbox_default" piece... 42 / 65
[PIECE] Open "frame_messagebox" piece... 43 / 65
[PIECE] Open "textbox_msgbox" piece... 44 / 65



Friday 4 February 2011

VoIP and Inter-provider Dialling Codes


Background


I've got an SPA3102 VoIP adaptor, and am frustrated by the lack of proper dialling codes when using VoIP from a normal handset.

I want to be able to dial:

01234 12345678 -> Normal Landline Phone Call
#01234 12345678 -> Normal Phone over Internet
*1001 12345678 -> Call to another VoIP Phone

The problem is this: When you dial a VoIP phone, you dial

phonenumber@voipprovider.address

A phone number is easy to dial, but the @voipprovider.address is usually impossible to enter from a standard phone handset (which is exactly what you plug into an SPA3102 Analogue Telephone Adaptor)

I've tried sipbroker, as my provider gives you a prefix for it. What sipbroker does is have a directory of VoIP providers, and when you dial *pppnnnnn, it is translated to nnnnn@provider.address. So it's great for dialling out!

The problem is when calls are received. When I get an incomming call, the Caller Line ID (CLID) has the full sending address, but by the time it gets to my phone simply gives me their VoIP account number (i.e. misses off the @voipprovider.address, or *ppp), rather than something I can use to uniquely work out who has called.

I can't simply use my phone handset to return the call!

A Solution

What is needed is a mechanism where translations from @voipprovider.address to a dialling code can be standardised, and the numerical translation to be inserted into CLID numbers when calls are received.

Or at least that is what is needed at the handset end.

I'd like to be able to modify the code on the SPA3102 to enable a lookup table to be loaded. This lookup table would have a translation between the ascii addresses and numeric ones, for example:
1001 eu.voxalot.com
1002 voiptalk.org
If the number dialled were *1001999999999, the number would be translated to 999999999@eu.voxalot.com, and if a call were received from 999999999@voiptalk.org, it would be translated to *1002999999999 before being passed to the phone.

The lookup database could be standardised worldwide, however it is not essential, because the translation is done within the local modem.

The Stumbling Block

The stumbling block, as always, is access to the code! From the looks of the SPA3102, it contains GPL code, so I should be able to do the modification. My problem is that Cisco haven't released it (i.e. I believe there may be a GPL violation here).

On the CISCO website, you can request code, and you are advised that you will get a response within 2-3 business days. It's been 5 days so far, but I'm still hopeful - I've heard that they are quite responsive in this matter.

It's now 10 days, and I've submitted my third request. All that has happend so far is that Cisco appear to have added my email address to a junk mailing list, so at the moment, I'm not too happy.