how to send commands from the shell

2,978 views
Skip to first unread message

orioni

unread,
Sep 2, 2013, 1:23:27 PM9/2/13
to stalker-m...@googlegroups.com
hi to all 
is possible to send command to the STB via the ssh shell ?

i.e how to change the channel via the ssh cli  or how to increase the  volume or decrease it ?

thanks 

orioni

unread,
Sep 2, 2013, 2:02:19 PM9/2/13
to stalker-m...@googlegroups.com
..... another way that i may use  is that i can execute the lirc with the commands .

having a look at the /etc/lirc/lircrc.wk.2 i can see the commands i.e for VOL UP but executing them from shell doesnt affect the volume 

i.e 

/usr/share/qt-4.6.0/sendqtevent Key KP_Add Web     for VOL-UP;

but i dont see the volume change 

i also tried to send the command as i see it on the IRW for the VOLUP key  ( 0000000000001392 00 vol+ TT )
but its the same 

thanks 

Aleksey Zhurbitsky

unread,
Sep 3, 2013, 4:01:30 AM9/3/13
to stalker-m...@googlegroups.com
This command should looks like

down - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000015 -ks 0x28
up - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000013 -ks 0x26

left - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000012 -ks 0x25
right - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000014 -ks 0x27
Message has been deleted

orioni

unread,
Sep 3, 2013, 1:43:13 PM9/3/13
to stalker-m...@googlegroups.com
Thanks it worked great .

where can i find a full list for the mappings of the keys on remote controller  with the codes i need to send to sendqtevent



On Monday, September 2, 2013 7:23:27 PM UTC+2, orioni wrote:

Aleksey Zhurbitsky

unread,
Sep 4, 2013, 3:46:43 AM9/4/13
to stalker-m...@googlegroups.com
Unfortunately I don't have all commands

ok - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000005 -ks 0xd
exit - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000000 -ks 0x1b
menu - /usr/share/qt-4.6.0/sendqtevent -c -kqt 0x0100003a -ks 0x7a

down - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000015 -ks 0x28
up - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000013 -ks 0x26
left - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000012 -ks 0x25
right - /usr/share/qt-4.6.0/sendqtevent -kqt 0x01000014 -ks 0x27
red - /usr/share/qt-4.6.0/sendqtevent -c -kqt 0x01000030 -ks 0x70
green - /usr/share/qt-4.6.0/sendqtevent -c -kqt 0x01000031 -ks 0x71
yellow - /usr/share/qt-4.6.0/sendqtevent -c -kqt 0x01000032 -ks 0x72
blue - /usr/share/qt-4.6.0/sendqtevent -c -kqt 0x01000033 -ks 0x73
frame - /usr/share/qt-4.6.0/sendqtevent -c -kqt 0x01000035 -ks 0x75

orioni

unread,
Sep 4, 2013, 8:46:49 AM9/4/13
to stalker-m...@googlegroups.com
thanks for those 
where should i ask for those ? any email address ?

thanks 

Aleksey Zhurbitsky

unread,
Sep 4, 2013, 9:43:33 AM9/4/13
to stalker-m...@googlegroups.com
This in not documented feature, but you can try to ask here - sup...@infomir.eu

orioni

unread,
Sep 4, 2013, 10:36:41 AM9/4/13
to stalker-m...@googlegroups.com
just asked and got this response 

In STB rootfs there is utility sendqtevent (in /usr/share/qt-4.6.0/).
With the help of this utility you can emulate
pressing buttons

Format for call utility:
sendqtevent [-c] [-a] [-s] [-ks <code>] [-kqt <qt_code>]
-c  - CTRL key modifier
-a  - ALT key modifier
-s  - SHIFT key modifier
<code> - KeySym code (default: 0x20)
<qt_code> - code for Qt symbol (e.i. Qt::Enter)

code - matches codes KeySym:<code> in settings LIRC /etc/lirc/lircrc
qt_code - matches code button from Qt::Key
In current firmware versions there is a
restriction - call of virtual keyboard and Settings menu can't be emulate through this utility.



Protocol RC5 38KHz Code page - 14 (0xE)
Check the attachment.


but i dont have the file /etc/lirc/lircrc and also seems the command you gave me ( that works OK ) doesnt correspond with the attachment 
Layout_IRDA_4807_not_programmable.png

orioni

unread,
Sep 4, 2013, 10:54:32 AM9/4/13
to stalker-m...@googlegroups.com

Looking at this page 

i see the Qt::Key_Left 0x01000012 

also looking at the file /var/www/stalker/c/keydown.keycodes.js  i see LEFT  : 37

so as i see the full command to send the LEFT via the shell , the -ks is the hex value of 37  ( 0x25  )  and the kqt is the value from the QT manual page 

regards 

ViVerraXX

unread,
Sep 5, 2013, 3:28:36 AM9/5/13
to stalker-m...@googlegroups.com
Oh mine God!! It's realy work!!!
And enough to send only qt_code like  /usr/share/qt-4.6.0/sendqtevent -kqt 0x32
Any other combinations from keydown.js work too. I tested /usr/share/qt-4.6.0/sendqtevent -a -kqt 0x55 - and STB Powered ON and OFF

It's realy nice!!! Thank you!


среда, 4 сентября 2013 г., 17:54:32 UTC+3 пользователь orioni написал:

ViVerraXX

unread,
Sep 13, 2013, 9:59:13 AM9/13/13
to stalker-m...@googlegroups.com
А код кнопки Keyboard не подскажете, а то никак не могу нащупать :-(

среда, 4 сентября 2013 г., 10:46:43 UTC+3 пользователь Aleksey Zhurbitsky написал:

Aleksey Zhurbitsky

unread,
Sep 13, 2013, 10:05:36 AM9/13/13
to stalker-m...@googlegroups.com
Вообще Alt+L (в сталкере код 2076)

ViVerraXX

unread,
Sep 13, 2013, 10:13:04 AM9/13/13
to stalker-m...@googlegroups.com
Пробовал /usr/share/qt-4.6.0/sendqtevent -a -kqt_0x4C, не срабатывает :-(
Хотя Info(Alt+Y) /usr/share/qt-4.6.0/sendqtevent -a -kqt_0x59 - нормально
Придется все подряд перебирать...

пятница, 13 сентября 2013 г., 17:05:36 UTC+3 пользователь Aleksey Zhurbitsky написал:

Aleksey Zhurbitsky

unread,
Sep 13, 2013, 10:14:28 AM9/13/13
to stalker-m...@googlegroups.com
Все может оказаться немного сложнее потому как данное нажатие по особому обрабатывается браузером (в javascript обработчик не поступает).

frenchs...@gmail.com

unread,
Aug 14, 2014, 2:16:47 PM8/14/14
to stalker-m...@googlegroups.com
Does sombody know the way to send those command to mag-250:

-mute
-volume down
-volume up
-app
-keyboard
-back
-info
-stop
-play/pause

Thnaks in advance

George Sat

unread,
Aug 31, 2014, 1:54:38 AM8/31/14
to stalker-m...@googlegroups.com
orioni
how i can conect to stb with Putty for i will send that comands?

cjapi

unread,
Oct 15, 2014, 11:07:45 AM10/15/14
to stalker-m...@googlegroups.com
hi George
yo connect via SSH to STB. 
the username is root and the default password is 930920

On Sunday, August 31, 2014 7:54:38 AM UTC + 2, George Sat wrote:
orioni
How can I Conect to stb with Putty for I will send That comands?

Vincèn Pujol

unread,
May 10, 2016, 5:34:02 AM5/10/16
to Stalker Middleware
Hi

What syntax did you use to send commands in SSH ?

Thanks

Michael Westen

unread,
Sep 26, 2016, 12:57:31 PM9/26/16
to Stalker Middleware

Youssef Mofki

unread,
May 25, 2017, 5:26:19 PM5/25/17
to Stalker Middleware
I want change player user-agent for mag250 , how i can do it and the way please dude?

Mikros

unread,
Feb 22, 2018, 4:07:15 PM2/22/18
to Stalker Middleware
Hi,

Have you found any way (for example curl) to send bash commands from the Stalker server to a specific MAG  ? 

Best,
Mikros
Reply all
Reply to author
Forward
0 new messages