- OmnitechDragon SlayerI've been wanting to do some poking around and troubleshooting on my Z10 beyond what I can do via the UI tools or commonly available apps, and now see there is a native tool (originally written for the Playbook) that provides access to the BB10 QNX console or command-line called "BGShellPlus", written by Evgeny Yurchenko.
Actually it comes in 2 variations, one is listed in Blackberry World as BGShell, the other one is listed as BG SSH-SCP-SFTP free, though it's colloquially referred-to as "BGShellPlus" and includes some network utilities as well.
Problem is, they are both free apps with virtually no documentation, described by the author as "alpha" and "as-is", and while he says comments are welcome (indeed, posts 2 email addresses right in his app descriptions: [email protected] and [email protected]), rather than spam him with a bunch of inane questions, I thought I'd create a thread here where some of us can discuss our tips/tricks.
The first problem I'm having is I can't seem to get the "break" or "CTRL-C" command to work. There are some buttons that appear above the console including one labeled "Ctrl+" which I assume allows entry of control-characters, but I've repeatedly tried either simultaneously or sequentially pressing this in combination with "C" and it doesn't do anything.
Second issue I'm having is despite the fact that QNX includes many common POSIX/Unix/Linux tools/commands, I can't get basic things to work like piping output, for example through a pager utility. (ie "cat filename |less")
QNX appears to have a "quirky" implementation of many common tools, and unsurprisingly since BB10 isn't designed for users to play around with at a command-prompt, it doesn't seem to have any manpages or even rudimentary command syntax help. Luckily I found a good publicly-available command reference from QNX here:
Help - Eclipse SDK
I also found some forums pertaining to QNX, I'm not yet sure what OpenQNX is or whether it is officially sanctioned by QNX or not (the "official" QNX support forums seem to be locked-down to QNX customers):
Index page | www.openqnx.com
Lastly, for the sake of expediency, some common filesystem shortcuts:
/sdcard2 The external/removable user-accessible memory card filesystem
/sdcard The internal user-accessible memory card filesystem05-19-13 05:21 PMLike 0 -
- OmnitechDragon Slayer
Ah, the "use" command is very helpful in addition to those things you told me earlier. Like a simple 'man' command. Thanks. (Strange thing is pidin supports the "-h" argument, which acts the same as the "use pidin" mechanism. None of the other tools I've tried do.)
Right now trying to figure out how to get limited output out of pidin and hogs. Hogs appears to run continuously with no option for single-screen snapshot. If I redirect it to a file it keeps adding continuously and since CTRL-C doesn't work, I have to kill the console to get out. Same thing with pidin.05-19-13 07:47 PMLike 0 - OmnitechDragon SlayerThanks but the bigger problem right now is to get control commands and pipes to work.
If I can do that, then I can start building a script to log the things I want to log.
Pity BGShell/Plus doesn't seem to work in landscape mode though. All the output of those commands wraps for days in portrait mode...05-19-13 10:48 PMLike 0 - OmnitechDragon Slayer
What do you mean by "doesn't work"? Because the characters I type using the Sym key certainly echo back to me when I type them, and seem to work in other contexts, ie "hogs -% 2" definitely trims the list of processes to ones with only 2% or higher CPU utilization.05-20-13 01:23 AMLike 0 - OmnitechDragon SlayerFWIW, I can ping the device but cannot SSH to it. I assume there's something I need to do to enable the daemon or open the firewall or something?
(Edit: I'm seeing some docs that refer to needing a debug token that needs to be generated by a development tool, then connecting via BB Link and the dev tools etc.. if that's really the case then it sounds like we're back to Shaosoft's suggestion in the other thread about just ssh'ing from the dev environment, which I was hoping to avoid.. )Last edited by Omnitech; 05-20-13 at 01:44 AM.
05-20-13 01:27 AMLike 0 - Oh the Sym key works for you? It's not working on my Q10, in BGShellPlus.
Yeah you need to run blackberry-connect to enable SSH.
If you have a Playbook or something, you can SSH to your Z10 from there.
I have reverse-engineered blackberry-connect so I can make an app that runs it for anything (including Playbook).05-20-13 04:36 AMLike 0 - OmnitechDragon Slayer
Yep. And I don't know about BGShellPlus, maybe this thing called "BG SSH-SCP-SFTP free" is not really BGShellPlus, but something else? Because there is no "BGShellPlus" in Blackberry World that I could find.
Even the developer mentions in the app descriptions on both versions to turn off all the text prediction features because it would cause problems entering commands (sounds reasonable), but actually I find that the dev must have figured out how to programmatically disable those features because when I use "BG SSH-SCP-SFTP free", the keyboard predictions seem to be disabled just for that app. If I go into some other pseudo-shell app like "System Information" by mappau OG, I see that the keyboard predictions are back on again. (Which is great, actually, because it means I don't have to keep globally disabling that just to make the console app usable.) I'm also using a Z10, so maybe that's a factor.
Yes I heard about your projects, hopefully I will have a 'scratch' device someday I don't mind playing with, I'd love to play around with alternative OS's on something I don't have to depend on so much.
Interesting idea re: the Playbook. Might make it almost worthwhile to get one on craigslist or something just for that. I just don't want to have to install some big development environment on a machine or VM here just to ssh to the Z10.05-20-13 05:26 AMLike 0 - Is BGShell the only working Terminal/CLI? It's the only one I could find, at least.
I'm missing the normal GNU tools, like diff! And actually I don't even seem to have vi nor elvis on my device (10.1, does that matter?)
Is there a collection of tools already ported over somewhere? If not, that's a repository worth making! The fact that I had trouble finding any information on it of this on the internet (and on here possibly, haven't finished searching), makes me wonder if I've come to a platform devoid of the *nix people always playing around that I'm accustomed to..
(Having used Palm webOS and Android before this, and Linux on the desktop, I'm pretty much used to having any tools I'm looking for easily available, in Preware or the app catalog resp (for webOS/Android))
Speaking of preware, an alternate app store, if only for this stuff (and yes even though it couldn't install to root) would be awesome!
Posted via CB1005-25-13 09:54 PMLike 0 - OmnitechDragon SlayerIs BGShell the only working Terminal/CLI? It's the only one I could find, at least.
I'm missing the normal GNU tools, like diff! And actually I don't even seem to have vi nor elvis on my device (10.1, does that matter?)
Is there a collection of tools already ported over somewhere? If not, that's a repository worth making! The fact that I had trouble finding any information on it of this on the internet (and on here possibly, haven't finished searching), makes me wonder if I've come to a platform devoid of the *nix people always playing around that I'm accustomed to..
(Having used Palm webOS and Android before this, and Linux on the desktop, I'm pretty much used to having any tools I'm looking for easily available, in Preware or the app catalog resp (for webOS/Android))
Speaking of preware, an alternate app store, if only for this stuff (and yes even though it couldn't install to root) would be awesome!
Embedded devices rarely have all the tools and functions an end-user OS has because A) they don't need them, B) they take up too much space, and C) it makes it easier for users to shoot themselves in the foot.
Right now, I'd settle for control-characters and pipes to work through that one on-device console tool.05-25-13 10:52 PMLike 0 - It looks like this thread died, but having recently discovered BGShellPlus, I have to say the app is cool. No help file since the authors assumes you know QNX. A lot of linux commands work. You can certainly poke around the device file structure.
The obvious intent was for the user to enter sftp or similar for file transfer. The fact you get a terminal prompt for hacking is just a bonus.06-14-13 02:20 AMLike 0 - Has anyone actually got it to work? I can't ping anything - it says command not found, and I can't get ssh to work to any of my networked servers - i get a can't assign requested address message?08-23-13 03:05 PMLike 0
- OmnitechDragon Slayer
It's not Linux and many utilities you may be used to on a full Linux installation are not there. See the earlier posts in this thread.
It's a POSIX compliant OS but that doesn't dictate things like whether it has a "ping" or "traceroute" executable included.
QNX documentation is publicly available on the web, in fact I posted links to some of it in the OP.
Lastly - user sessions are sandboxed/chrooted/jailed by default for security purposes and you don't have root access, so many commands that might otherwise show systemwide info are not going to work the way you expect.08-26-13 09:50 AMLike 0 - It's not Linux and many utilities you may be used to on a full Linux installation are not there. See the earlier posts in this thread.
It's a POSIX compliant OS but that doesn't dictate things like whether it has a "ping" or "traceroute" executable included.
QNX documentation is publicly available on the web, in fact I posted links to some of it in the OP.
Lastly - user sessions are sandboxed/chrooted/jailed by default for security purposes and you don't have root access, so many commands that might otherwise show systemwide info are not going to work the way you expect.08-26-13 05:03 PMLike 0 - OmnitechDragon Slayer
No, the SSH function should work.
Just tested it now - there is a public ssh server at sdf.org that you can use to test, ie "ssh sdf.org". When I tried it just now, it gave the expected unknown RSA key fingerprint warning that you get prior to connecting to a new host.08-26-13 06:03 PMLike 0 - that's all I want it for to be honest. Trying to ping something was my first step in diagnosis, as I thought maybe i had a network connectivity issue. Connecting to sdf.org fails, as does conenction to my internal network's servers, although this time it fails with a slightly different error - no address associated with hostname - previously the failure claimed 'can't assign requested address'.
ssh to his address works fine from any laptop on the same network.08-26-13 06:19 PMLike 0 - OmnitechDragon Slayerthat's all I want it for to be honest. Trying to ping something was my first step in diagnosis, as I thought maybe i had a network connectivity issue. Connecting to sdf.org fails, as does conenction to my internal network's servers, although this time it fails with a slightly different error - no address associated with hostname - previously the failure claimed 'can't assign requested address'.
ssh to his address works fine from any laptop on the same network.
You've either got some sort of general networking error/incompatibility on your device (VPN? Incompatible proxy?), or perhaps one of the older OS's with a crappy Android runtime or whatever toolset that that app was written in.08-27-13 01:22 AMLike 0 -
-
- that's all I want it for to be honest. Trying to ping something was my first step in diagnosis, as I thought maybe i had a network connectivity issue. Connecting to sdf.org fails, as does conenction to my internal network's servers, although this time it fails with a slightly different error - no address associated with hostname - previously the failure claimed 'can't assign requested address'.
You can actually ping though if you use your own app.
Pretty silly.08-27-13 09:42 AMLike 0
- Forum
- BlackBerry 10 Phones & OS
- BlackBerry 10 OS
BB10 console fun with BGShellPlus
LINK TO POST COPIED TO CLIPBOARD