Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Did you see a new gadget or toy and start brimming with ideas? See something that has tons of potential? Discuss these thoughts here.

Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby pdrift » January 24th, 2014, 1:26 am

Image
I recently bought this gadget at walmart called the Dane-Elec Media Streamer
that I had been eyeing for some time. It is a small battery powerd portable wifi
streaming device about the size of my tp-link mr3020. After playing around with
it I feel that it has potential but the android app for it is in beta (i think) and
leaves alot to be desired. My first complaint is that the only supported format
for upload is photos and it has to be from the camera app, you can't even upload
a picture from the gallery, and only one at a time.

So I did some searching to see if the device has any support from the hacker
community, but there is none as far as I can tell. So I did some more searching
and I found that the device looks to be a clone of this device made by Gigastone
called the Smartbox. Now the Smartbox also has an app but it looks like it has
more features. I already tried the smartbox app to see if it works with the
media streamer but it doesn't.
Image

Some how I stumbled upon this page and found lots of info about the device.

Specifications listed for the SmartBox A2-25B and A2-50B include:

Processor — Qualcomm Atheros AR9331 (1x MIPs 24K core @ 400MHz)
Memory — 128MB DDR RAM; 32MB SPI flash
Storage — SDHC/SDXC card slot with microSD adapter; up to 32GB
Wireless — 802.11b/g/n (2.4GHz) access point/personal hotspot with AP bridge function (up to 10 meters)
Streaming format support — MP4/MOV/M4V, MP3/WAV, JPG/PNG/BMP
Other I/O — USB port (for charging in and out)
Battery/power:
2500mAh, 8-hour active, 16-hour standby (A2-25B)
5000mAh, 16-hour active, 32 hours standby (A2-50B)
DC 5V/ 1000mA power
Up to 4 hours battery backup for USB-attached mobile device (A2-25B)
Weight — 75g (A2-25B); 140g (A2-50B)
Dimensions — 75 x 60 x 16.1mm (A2-25B); 75 x 60 x 22.5mm (A2-50B)
Operating system — embedded Linux 2.6.31; supports access from free Android or iOS app


The page also states:
Internally, the box runs Linux on a Qualcomm Atheros AR9331 (pdf) processor, a Gigastone rep informed us.
This part no longer appears to be supported by Qualcomm as one of its 12 XSPAN AR9xxx processors.
The AR9331 offers a single MIPS 24k core clocked at 400MHz, and is typically paired with the WiFi-oriented
OpenWRT Linux. The device also has 128MB DDR RAM and 32MB SPI flash, says Gigastone.


So I can't tell if it runs openwrt or not but if it does then maybe it can be hacked
to add ftp server support by adding some packages. My goal would be to add an ftp
server feature and just use ES file explorer to manage uploading files to the device
from my phone. That way I could do batch uploads/downloads and still stream off
the device. I already tried to see if I could connect to it using es file explorer but
I can't. So any ideas?
pdrift
 
Posts: 3
Joined: January 23rd, 2014, 7:47 pm

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby pdrift » January 31st, 2014, 10:30 am

small update (if anyone is reading this), I can telnet into this device at 192.168.1.2 user:root password:root. it seems like a linux file system. Is there a command to see what os its running?
pdrift
 
Posts: 3
Joined: January 23rd, 2014, 7:47 pm

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby asheets » January 31st, 2014, 10:54 am

Here's some commands I would try:


uname -a
df -h
cat /etc/*ease
asheets
 
Posts: 300
Joined: February 17th, 2011, 4:30 pm

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby TheZuke! » February 4th, 2014, 9:53 am

Don't forget to try

ps -a
pwd
whoami
ls -a
ls -a /

let us know what it responds with...

Of course, it may help to move this post (later on?) to the Software Help subforum
TheZuke!
 
Posts: 65
Joined: September 10th, 2012, 8:24 am
Location: SE Minnesota, USA

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby mkelley88 » February 19th, 2014, 10:20 pm

I just picked up one of these for $40 at Wal-Mart myself. I can confirm it is running linux and is telnet connected at 192.168.1.2.

Code: Select all
~ # uname -a
Linux (none) 2.6.31--LSDK-9.2.0_U10.5.13-GST-A4 #8 Mon Aug 26 14:35:32 CST 2013 mips GNU/Linux


Code: Select all
~ # df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.5M      2.5M         0 100% /
/dev/sda1                14.8G      6.5G      8.4G  44% /tmp/ftp/SDdisk/SD/.sda1


Code: Select all
~ # ps w
  PID USER       VSZ STAT COMMAND
    1 root       860 S    init
    2 root         0 SW<  [kthreadd]
    3 root         0 SW<  [ksoftirqd/0]
    4 root         0 SW<  [events/0]
    5 root         0 SW<  [khelper]
    8 root         0 SW<  [async/mgr]
   54 root         0 SW<  [kblockd/0]
   63 root         0 SW<  [khubd]
   82 root         0 SW   [pdflush]
   83 root         0 SW   [pdflush]
   84 root         0 SW<  [kswapd0]
   86 root         0 SW<  [crypto/0]
  114 root         0 SW<  [mtdblockd]
  151 root         0 RW<  [unlzma/0]
  361 root       860 S    /usr/sbin/telnetd
  364 root       852 D    factoryreset /dev/freset
  390 root       236 S <  /sbin/udevd -d
  399 root         0 SW<  [scsi_eh_0]
  400 root         0 SW<  [usb-storage]
  442 nobody     364 S    /sbin/dnsmasq --clear-on-reload --conf-file=/tmp/www/dns/dnsmasq.conf
  459 root       860 S    /usr/sbin/udhcpd /tmp/www/udhcpd.conf
  461 root       972 S    /tmp/www/ghttpd -c /tmp/ftp/SDdisk -f /tmp/www/ghttpd.conf
  462 root      1148 S    /sbin/vsftpd /etc/vsftpd.conf
  983 root      1188 S    hostapd -B /tmp/secath0
 1021 root       868 S    {auto_poweroff.s} /bin/sh /tmp/www/auto_poweroff.sh
 1027 root       868 S    /sbin/getty ttyS0 115200
 1049 root       868 S    -sh
 1129 root       860 R    ps w
 1130 root       868 S    {auto_poweroff.s} /bin/sh /tmp/www/auto_poweroff.sh
 1131 root       852 S    dmesg
 1132 root       856 S    grep XactErr


Code: Select all
~ # pwd
/tmp


Code: Select all
~ # ls
br0            device         ftp            secath0        www
conf_filename  dnsmasq.pid    hostapd        secfs.log

~ # cat /etc/*ease
cat: can't open '/etc/*ease': No such file or directory

~ # cat /etc/
ath/                host.conf           passwd              services            udhcpd_br0.conf
dnsmasq.conf        hostapd.conf        ppp/                shadow              vsftpd.chroot_list
dnsmasq.hosts       inittab             rc.d/               udev/               vsftpd.conf
fstab               issue               resolv.conf         udhcpc.script       vsftpd.user_list
group               nsswitch.conf       securetty           udhcpd.conf         wpa.conf

~ # whoami
-sh: whoami: not found

~ # ls -a
.              .apcfg         .profile       conf_filename  dnsmasq.pid    hostapd        secfs.log
..             .apup          br0            device         ftp            secath0        www

~ # ls -a /
.           bin         etc         linuxrc     mnt         root        sys         usr         version
..          dev         lib         lost+found  proc        sbin        tmp         var
mkelley88
 
Posts: 1
Joined: February 19th, 2014, 9:53 pm

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby mchaos » March 4th, 2014, 3:51 pm

I picked one of these up as well. The best thing that I can see is that it has a vi editor! I'm set. /tmp/www/settings/index.html has many commands in it. I have already started work on some custom scripts. I haven't seen it, but I am hoping it supports PHP ;)

EDIT: I have made 2 new discoveries. FIRST the best one. FTP! 192.168.1.2:21 user:root password:root. Well this also means any one using one of these is a huge canadate for some one messing with them. SO... For those of use in the Know, ghttp.conf has settings, you can change the login and password to whatever you want. ;)

EDIT: If you go into /tmp/www/cgi-bin you will find a bunch of commands to control this thing. If you open each script you will see the raw command you can use in command line.

EDIT AGAIN: Okay, here is a very impressive list of commands. NOTE: busybox installed!

basename clear cmp du dumplease eject ecpr find free fuser hexdump killall logname lsof lsusb md5sum mesg pstree pwdx readlink reset tail tee telnet test tftp time top tr traceroute tty unexpand uptime wc wget

particularly interested in wget!

my goodness this will be fun!

For the OP. I believe the reason the other app does not work, is probably because the default password is different for each app. if you can figure out what user and pw the other app is trying to use, you will be set.... or hell, write your own app! Not sure how many edits I will have, but I keep finding nice things to share...

Code: Select all
(none) login: root
Password:
~ # pwd
/tmp
~ # help
-sh: help: not found
~ # man
-sh: man: not found
~ # whoami
-sh: whoami: not found
~ # ps
  PID USER       VSZ STAT COMMAND
    1 root       860 S    init
    2 root         0 SW<  [kthreadd]
    3 root         0 SW<  [ksoftirqd/0]
    4 root         0 SW<  [events/0]
    5 root         0 SW<  [khelper]
    8 root         0 SW<  [async/mgr]
   54 root         0 SW<  [kblockd/0]
   63 root         0 SW<  [khubd]
   82 root         0 SW   [pdflush]
   83 root         0 SW   [pdflush]
   84 root         0 SW<  [kswapd0]
   86 root         0 SW<  [crypto/0]
  114 root         0 SW<  [mtdblockd]
  151 root         0 SW<  [unlzma/0]
  354 root       860 S    /usr/sbin/telnetd
  357 root       852 D    factoryreset /dev/freset
  383 root       236 S <  /sbin/udevd -d
  392 root         0 SW<  [scsi_eh_0]
  393 root         0 SW<  [usb-storage]
  435 nobody     364 S    /sbin/dnsmasq --clear-on-reload --conf-file=/tmp/www
  452 root       860 S    /usr/sbin/udhcpd /tmp/www/udhcpd.conf
  454 root       972 S    /tmp/www/ghttpd -c /tmp/ftp/SDdisk -f /tmp/www/ghttp
  455 root      1148 S    /sbin/vsftpd /etc/vsftpd.conf

~
~
~
~
~
~
~
~
~
~
~
#!/bin/sh

usage () {
        echo "Usage: $0 <USB/SD>, <sda/sdb>"
        exit 1
}

if [ "$1" = "" ]; then
        usage
fi
DEVTYPE=$1
if [ "$2" = "" ]; then

Port 80
User root
Group root
ServerName MediaStreamer.MediaStreamer
DocumentRoot /tmp/ftp/SDdisk
#UserDir public_html
DirectoryIndex index.html
DirectoryMaker /tmp/www/ghttpd_i
DirectoryCache /tmp/www/dircache
KeepAliveMax 1000
KeepAliveTimeout 10
MimeTypes /tmp/www/mime.types
DefaultType text/plain
CGIPath /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
Alias /.css /tmp/www/.css
Alias /.js /tmp/www/.js
Alias /.icon /tmp/www/.icon
Alias /.settings /tmp/www/settings
ScriptAlias /cgi-bin/ /tmp/www/cgi-bin/
SinglePostLimit 8388608
DirectoryTmp /tmp/ftp/SDdisk
MinMemorySize 512

~/www # ls
PVT               cfg_info.sta      ghttpd_i          settings
PVT.sh            cfg_log           httpd.sh          storage
airsetting_gen    cgi-bin           mime.types        storage_test.sh
airsetting_get    decodeURL         mount_device      thumbnail_jpeg
ap_scan.sh        df_date           pivotroot         udhcpd.conf
at                diskmark          power.conf        udhcpd.leases
auto_bridge.sh    dns               power_conf.sh     udhcpd_conf.sh
auto_copy.sh      flashburn         powerlvl          udprcv
auto_poweroff.sh  ghttpd            repeater          udpsend
bridge            ghttpd.conf       scaletask         upgrade.sh
~/www # ps
  PID USER       VSZ STAT COMMAND
<!DOCTYPE html>^M
<html>^M
        <head>^M
                <meta http-equiv="Content-Type" content="text/html; charset=utf-
                <meta name="viewport" content="width=device-width, initial-scale
                <title>Smartbox</title>^M
                <link href="bootstrap/css/bootstrap-responsive.min.css" rel="sty
                <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" me
                <link href="bootstrap/css/bootstrapSwitch.css" rel="stylesheet"
                <link href="css/style.css" rel="stylesheet" media="screen">^M
        </head>^M
        <body id="body_all">^M
                <div>^M
                        <!-- input admin dialog -->^M
                        <div id="admin-modal" class="modal hide fade" tabindex="
                                <div class="modal-header">^M
                                        <h3>Administrator password</h3>^M
                                </div>^M
                                <div class="modal-body control-group">^M
                                        <p>^M
                                                Please enter a four digit number
                                        </p>^M
                                        <form class="form-horizontal" id="admin-
                                                <input type="password" id="admin
                                                <input type="password" id="real_
                                                <button type="submit" id="admin_
                                        </form>^M
                                </div>^M
                                <div class="modal-footer">^M
                                        <button class="btn" data-dismiss="modal"
                                                Cancel^M
                                        </button>^M
                                        <button class="btn btn-primary" type="bu
                                                Submit^M
                                        </button>^M
                                </div>^M
                        </div>^M
                        <!-- reconnect and count down alert dialog -->^M
                        <div id="count-down-modal" class="modal hide fade" tabin
                                <div class="modal-header">^M
                                        <h3>Processing...</h3>^M
                                </div>^M
                                <div class="modal-body">^M
                                        <p>^M
                                                Please wait 40 seconds, and then
                                        </p>^M
                                        <div class="progress progress-striped ac
                                                <div class="bar" id="count-down-
                                        </div>^M
                                </div>^M
                                <div class="modal-footer">^M
                                        <button class="btn btn-primary" id="btn-
                                                Submit^M
                                        </button>^M
                                </div>^M
                        </div>^M
^M
                        <!-- Bridege Mode Password Dialog Modal -->^M
                        <div class="modal hide fade" id="bridge_mode_pw_modal" d
                                <div class="modal-body">^M
                                        <div class="row-fluid">^M
                                                <div class="span2">^M
                                                        SSID^M
                                                </div>^M
                                                <div id="bridge_mode_pw_modal_ss
                                                        GST-CustomerAP^M
                                                </div>^M
                                        </div>^M
^M
                                        <div class="row-fluid" style="display:no
                                                <div class="span2">^M
~/www/settings #
mchaos
 
Posts: 2
Joined: March 4th, 2014, 3:45 pm

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby noskcajn » March 31st, 2014, 11:44 am

This has been a fun device.

Some useful info:

From /tmp/www/cgi-bin/gota
Updates, ftp://60.251.62.39
u: smartbox
p: newchapter

*.brn files are the firmware files.

Want to play with them, binwalk (https://github.com/devttys0/binwalk‎) works great to peel the files apart. Compilation, etc, for binwalk it definitely outside of the scope of all of this. Google is very useful though.

These files appear to be for different models. In looking at some of them, it appears that they work across models and have mechanism in a startup script (/tmp/www/httpd.sh) that distinguishes between model types by first part of WLAN MAC address (other devices have ethernet ports):

Code: Select all
GSTOUI=C034B4

        if [ "`get_wmac | grep ${GSTOUI}A`" != "" ]; then
                PRODUCT=A63G
                cfg -a IMAGE=a63g
                cfg -a LED_INTERNET=
                cfg -a LED_HUBRESET=23
        elif [ "`get_wmac | grep ${GSTOUI}2`" != "" ]; then
                VNAME=MediaStreamer
                PNAME=MediaStreamer
                PRODUCT=25DE
                CHANGE=1
                cfg -a IMAGE=a25d
        elif [ "`get_wmac | grep ${GSTOUI}3`" != "" ]; then
                VNAME=Pivothead
                PNAME=AirSync
                PRODUCT=25DE
                CHANGE=1
                cfg -a IMAGE=a25p
        else
                cfg -a IMAGE=a4
        fi


Here's something fun (use at your own risk of course):
telnet to media streamer and be sure you are in /www (default for root/root).
wget ftp://smartbox:newchapter@60.251.62.39/<file>

or ftp the file to the media streamer from your computer when you've connected wirelessly to it
ftp 192.168.1.2, username is root and password is root (as mentioned in a previous post).

Once the file is in /tmp run the following:
/tmp/www/flashburn -v /tmp/<file>

This will flash the new .brn file and reboot.
noskcajn
 
Posts: 5
Joined: March 26th, 2014, 10:38 am

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby noskcajn » March 31st, 2014, 12:57 pm

I didn't like how the internet bridge light lit when not bridged (seemed odd). Even with latest versions of software same thing. So modifying the /var/www/netled_set.sh file.

Look for the following lines:
Code: Select all
                if [ "$STA" = "on" ]; then
                        INTERNET_LED=$((INTERNET_LED*4+1))
                else
                        INTERNET_LED=$((INTERNET_LED*4))
                fi

and change to
Code: Select all
                if [ "$STA" = "on" ]; then
                        INTERNET_LED=$((INTERNET_LED*4))
                else
                        INTERNET_LED=$((INTERNET_LED*4+1))
                fi

Of course this isn't permanent and rebooting the media streamer will wipe this out. So I wanted it to be permanent. Well, I wasn't too careful and bricked it...but was able to bring it back. More details on a next post.

This required connecting to the serial console which required popping open the case which was no easy task. I basically used a knife and cut along the seam around the top until i was able to get under the lid and pry the rest off. No permanent damage, yay!

Once I had it open I had to remove the 4 screws (2 silver and 2 black) and pull the main pcb off of the lid. On the top of the pcb is the CPU and described in a previous post. The hope was that there would be test points (TP) on the pcb that I could tap into for serial communication.

After studying the CPU pinouts I found there are UART points for serial communication. One note the serial console is TTL and not RS232. Google to see the difference.

I had a TTL UART cable for Raspberry Pi and thought I'd give it a test run. I connected up the TX and RX to the test points and found a combination that gave me data when powering up the media streamer but the text was all garbled. What the? After thinking about it for a bit I realized that I'd not connected up a ground. Once that was connected at 115200 the console connection was working. (TestPoints.jpg)

So with a little solder magic I was able to connect up a couple of wires for the console UART port (TestPointsConnected.jpg).

I made the mistake of not securing the solder points and accidentally broke off TP3. :o I was able to get a solder point back on the line and hot glued it right away to secure. Yay!
Attachments
BrokenTP3.jpg
I was a bit anxious to do some work and didn't hot glue the solder points for support and accidentally broke TP3 of the PCB. A little trace back on the TP3 line and I was able to reconnect the wire. I hot glued before I even tested to make sure it was working again.
BrokenTP3.jpg (156.88 KiB) Viewed 21428 times
TestPointsConnected.jpg
This image shows the wires soldered onto the PCB at TP2, TP3 and a GND point.
TestPoints.jpg
This image shows where to solder the RX, TX and GND points for the TTL UART for serial communication with the CPU.
noskcajn
 
Posts: 5
Joined: March 26th, 2014, 10:38 am

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby noskcajn » March 31st, 2014, 1:05 pm

I don't see myself using this device for what it was intended so to finish up the UART console port I soldered the wires to a header, modified the case and hot glued the header in place. Also, I didn't seal the case back up because I may want to get back into it.

When using the serial console, 115200 is the port speed.
Attachments
RasPiUARTConnected.jpg
RapPi UART cable all connected.
ConsoleHeader.jpg
All together.
noskcajn
 
Posts: 5
Joined: March 26th, 2014, 10:38 am

Re: Dane-Elec Media Streamer a.k.a. Gigastone Smartbox

Postby noskcajn » March 31st, 2014, 3:05 pm

Here is a breakdown of the flash:
Code: Select all
~ # cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "CONF"
mtd3: 00010000 00010000 "NVRAM"
mtd4: 00140000 00010000 "uImage"
mtd5: 00400000 00010000 "rootfs"
mtd6: 00240000 00010000 "secfs"
mtd7: 00010000 00010000 "ART"


When I bricked it what I'd done was decided to make the internet bridge LED more useable (only light up when it has an internet connection as the default was just the opposite). To do this I needed to write it to flash somehow to make it more permanent.

I stumbled upon the flashcp app on the device, part of busybox:

Code: Select all
~ # flashcp
BusyBox v1.22.0.git (2014-03-27 16:22:49 CST) multi-call binary.

Usage: flashcp -v FILE MTD_DEVICE

Copy an image to MTD device

        -v      Verbose



Hmm, should be able to write specific parts of the flash partitions. binwalk broke down the firmware update files for me and I was able to pull out the secfs part (/dev/mtd6) which I found (can't remember how) had the /tmp/www portion of the file system on it.

binwalk automatically gunzipped the file and so after peeling this out of the firmware I was able to untar it out and modify the netled_set.sh file.

Knowing that the file was tar/gzipped I decided to do that in one step

Code: Select all
tar -zcvf www.tar.gz www


That command tarred and gzipped the www directory right into the www.tar.gz file. I then ftp'd it to the media streamer and was ready to flash it to the mtd6 partition in flash.

Code: Select all
flashcp -v www.tar.gz /dev/mtd6


and off it went. Cool!

After a reboot though the device didn't come back up...not cool!

This prompted the console port work.

Well, once I got console I found that the file I'd saved to flash was corrupted or at least the expanding process on bootup was not successful.

Now that I had console access I had more room to play. I first challenge was getting wireless access back to it. After loading parts of the httpd.sh file to get drivers loaded, messing with an old dd-wrt router and working with iwconfig I was able to get simple access enough to ftp in. Whew, that part was done. Now to figure out what happened with the flash file.

After a little trial and error I found that I could not tar and gzip the file all in the same process. Perhaps the version of tar I was using was broken. Anyway I separated the steps;

Code: Select all
tar -cvf www.tar www

and then

Code: Select all
gzip www.tar


and ended up with a file that I was successfully able to flash to the device and boot with my preferred modifications.
noskcajn
 
Posts: 5
Joined: March 26th, 2014, 10:38 am

Next

Return to The new gadget brainstorm pit

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest