Username: Password:

Author Topic: [Guide] Gunbot XT (v8.0.3) using a Raspberry Pi  (Read 36760 times)

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
[Guide] Gunbot XT (v8.0.3) using a Raspberry Pi
« on: October 29, 2017, 07:18:10 PM »
hi

i am running the bot with a raspberry pi.

i will share what i did. maybe this will help someone and others might post feedback to improve things.
the post was updated for Gunbot XT. And i will include all questions asked here step be step.

You need a licence? Contact me and you will get a 10% discount vlom@protonmail.com

Like it guide? thank you: BTC 14xQzDipMf1tzPQaj6bG7vsUXK1jDNjGkV

the pi
if you install raspian (https://www.raspberrypi.org/documentation/installation/installing-images/) you need a screen (a TV via HDMI works) and a keyboard first. you have to enable the SSH access and for that you have to edit raspi-config (https://www.raspberrypi.org/documentation/configuration/raspi-config.md).

1. installing:



download the version you like. you can do this with wget.
for Gunbot XT
Code: [Select]
wget https://github.com/GuntharDeNiro/BTCT/releases/download/803/Gunbot.XT.Edition.-.Arm.package.zip 
unzip it and

Code: [Select]
unzip Gunbot.XT.Edition.-.Arm.package.zip
cd into the folder.

Code: [Select]
cd Gunbot XT Edition - Arm packaget
then you have to make the "apps" executable. you can do with

Code: [Select]
chmod +x gunthy-arm
for the GUI:
Code: [Select]
chmod +x gunthy-gui-arm
if tis does not work for you then try:

Code: [Select]
chmod u+x gunthy-armor
Code: [Select]
chmod u+x gunthy-gui-arm


2. configuration.

without GUI
because i am running the pi headless i connected to the pi with cyberduck (https://cyberduck.io). Connect with SFTP.



After you did this navigate to the gunbot folder. after that you can click on config.js and afterwards on the text wrangler icon.



This will open the config.js in textwrangler.



Edit what have to be edited and save the file. it will be saved on your raspberry. you don't have to download or upload the config.js

with GUI
cd into the folder and start the GUI-app

Code: [Select]
./gunthy-gui-arm
after that open a browser and type:
localhost:5000

If you have an error message during the launch of ./gunthy-gui-arm then check if port 5000 is already in use. you can do this like this:

Code: [Select]
netstat -lptn
If the port is used then try a reboot.

Code: [Select]
sudo reboot



3. running

without GUI
i am running the raspberry pi headless. thats why i connect via terminal now. before you start bot install screen or a similar tool. https://wiki.alpinelinux.org/wiki/Screen_terminal_multiplexer. Otherwise the bots stops when you close the terminal on your machine.

Code: [Select]
sudo apt-get install screen
after you have done that start the bot. cd into the directory where gunthy-arm is. the type this into your terminal:

Code: [Select]
screen ./gunthy-arm
with ^A d (control A d) you can detach from the session. after that you can close the terminal and the bot keeps running.


with GUI

And if you run your pi headless, than you can use the GUI via VNC.

You need an app on your host and the raspi has to be configured for the VNC use.
See here: https://www.raspberrypi.org/documentation/remote-access/vnc/

This is how it can look like when you use VNC:






4. checking

you can reconnect to the session with the bot and check if it is running

Code: [Select]
screen -x (if you have only one screen session)


or use

Code: [Select]
screen -listThere are screens on:
        11151.pts-1.mhlab01     (Attached)
        11131.pts-3.mhlab01     (Attached)
2 Sockets in /var/run/screen/S-root.

Code: [Select]
screen -x 11151 (if this is the session with bot)



if you want to capture the output of the gunbot screen session you can do the following steps.

Create the file .screenrc in your home directory.

Code: [Select]
sudo nano .screenrc
put this into the file:

Quote
# Always show a status line in the window footer
hardstatus on
hardstatus alwayslastline
hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}%+w %=%{..G} %H %{..Y} %m/%d %C%a "

# Autodetach session on hangup instead of
# terminating screen completely
autodetach on

# Turn off the splash screen
startup_message off

# set log on all windows
deflog on

(https://remysharp.com/2015/04/27/screen)

The next time you start the bot with screen ./gunthy-arm there will a file be created (screenlog.0) in which the output is saved.
« Last Edit: January 31, 2018, 06:49:22 PM by vlmm »

Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: Using a raspberry pi 3 and Gunbot Version 5
« Reply #1 on: November 01, 2017, 09:30:22 AM »
Hi, Do you connect your Raspberry PI to a monitor or a computer to run a Gunbot?

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] GunBot Version 5 using a Raspberry P 3
« Reply #2 on: November 01, 2017, 07:23:00 PM »
you don't need a monitor.
1. you can connect via ssh. all you need to know can be found here:
https://www.raspberrypi.org/documentation/remote-access/ssh/

2. or do it via vnc, then you can use the GUI.
https://www.raspberrypi.org/documentation/remote-access/vnc/

in both ways you need to control the bot via terminal. there isn't a GUI, made Gunbot XT will have one.

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] GunBot Version 5 using a Raspberry P 3
« Reply #3 on: November 01, 2017, 07:25:03 PM »
In the .screenrc file you can add this line. termcapinfo xterm* ti@:te@

with that you can scroll through the terminal output. i stopped saving the output because the file gets big rather fast.

Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] GunBot Version 5 using a Raspberry P 3
« Reply #4 on: November 02, 2017, 12:15:04 PM »
In the .screenrc file you can add this line. termcapinfo xterm* ti@:te@

with that you can scroll through the terminal output. i stopped saving the output because the file gets big rather fast.

I'll get a Raspberry PI 3 and then follow the instruction you gave. I'm really interested to do it. Thanks for the awesome information. it's really helpful.

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #5 on: November 06, 2017, 06:15:49 PM »
Gunbot XT is out.

Almost all you need to know you can find here:
https://github.com/GuntharDeNiro/BTCT/wiki/ARM-installation

or in the posts above this one.

I made the first tests. It runs. If you need a GUI then you have one too.

If you have an error message during the launch of ./gunthy-gui-arm then check if port 5000 is already in use. you can do this like this:

Code: [Select]
netstat -lptn
If the port is used then try a reboot.

Code: [Select]
sudo reboot
Start the GUI via terminal. You have to be in the folder of the executable.

Code: [Select]
./gunthy-gui-arm
If you want to able to close the terminal window then use screen again.

Code: [Select]
screen ./gunthy-gui-arm
And if you run your pi headless, than you can use the GUI via VNC.

You need an app on you host and raspi has to be configured for the VNC use.
See here: https://www.raspberrypi.org/documentation/remote-access/vnc/

This is how it can look like when you use VNC:

« Last Edit: November 07, 2017, 05:20:04 PM by vlmm »

Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #6 on: November 07, 2017, 09:30:01 AM »
Hi, I'll use two bots on Raspberry PI. How many pairs can we trade on PI? Should I get SD card 32gb or 16gb? Also will Raspberry PI LCD screen good for VNC use? Thank you very much.
« Last Edit: November 07, 2017, 10:00:26 AM by Calm N Patience »

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #7 on: November 07, 2017, 05:17:27 PM »
at the moment i have 34 pairs.

if you want to use VNC you don't need any screen. thats what it is for. if you really need a GUI.

this is how it will look like when you use VNC:


Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #8 on: November 08, 2017, 01:38:21 AM »
at the moment i have 34 pairs.

if you want to use VNC you don't need any screen. thats what it is for. if you really need a GUI.

this is how it will look like when you use VNC:



Thanks for all these information. I'm going to get Raspberry PI first. There is still a lot of things need to learn to put everything in place.

Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #9 on: November 13, 2017, 10:09:51 AM »
Finally I received  Raspberry PI 3 today ;D. I'm goint to setup the pi now. I want to use it like you do with VNC on headless PI. For using VNC on headless PI, do we have to setup the PI headlessly or actually we can set it up on monitor then just install the VNC to the PI? Thanks.

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #10 on: November 13, 2017, 07:21:46 PM »
if you install raspian (https://www.raspberrypi.org/documentation/installation/installing-images/) you need a screen (a TV via HDMI works) and a keyboard first. you have to enable the SSH access and for that you have to edit raspi-config (https://www.raspberrypi.org/documentation/configuration/raspi-config.md).




Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #11 on: November 15, 2017, 12:17:39 PM »
Hi,

Finally I've done all the setup and installed gunbot on pi.  I followed all the instruction from you and typed on the console, after I hit the screen ./gunbot-arm it came out (screen is terminating), then i tried without the screen I typed ./gunbot-arm and it came out with (bash: ./ProfitTrailer.cmd: Permission denied)

I'm not sure what went wrong? Maybe I've another gunbot file on my laptop as I used the laptop ran the bot before I got this PI. What do you think might went wrong?

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #12 on: November 15, 2017, 07:28:26 PM »
you did a:
Code: [Select]
chmod +x gunthy-arm
what you can try is:
Code: [Select]
chmod u+x gunthy-arm

Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #13 on: November 16, 2017, 06:08:42 AM »
Hi, Thanks for these instructions, my bot is running now, and I use screen on terminal, it really helps from keeping the bot running while the terminal is off. But how can I turn the bot off? There isn't any instruction on how to turn off the screen and the bot.

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #14 on: November 17, 2017, 03:20:17 PM »
the instructions for screen can be found here:
https://wiki.alpinelinux.org/wiki/Screen_terminal_multiplexer
the most import is:

Code: [Select]
screen -listshow all running sessions

Code: [Select]
screen -x NUMBERconnect to a session.

Code: [Select]
^A dDetach from a session

Code: [Select]
^A kkill a session



if you want to stop gunbot then connect to the gunbot screen session and
Code: [Select]
^C

Offline Calm N Patience

  • Rookie
  • *
  • Posts: 8
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #15 on: November 17, 2017, 09:18:56 PM »
the instructions for screen can be found here:
https://wiki.alpinelinux.org/wiki/Screen_terminal_multiplexer
the most import is:

Code: [Select]
screen -listshow all running sessions

Code: [Select]
screen -x NUMBERconnect to a session.

Code: [Select]
^A dDetach from a session

Code: [Select]
^A kkill a session



if you want to stop gunbot then connect to the gunbot screen session and
Code: [Select]
^C

Thanks man. You're the master.

Offline vlmm

  • Rookie
  • *
  • Posts: 22
    • View Profile
Re: [Guide] Gunbot XT using a Raspberry Pi
« Reply #16 on: November 18, 2017, 04:03:47 PM »
thank you, feel free to use my donation BTC address with some of your profits.

Offline MagicDude4Eva

  • Rookie
  • *
  • Posts: 13
    • View Profile
Re: [Guide] Gunbot XT (v7) using a Raspberry Pi
« Reply #17 on: December 31, 2017, 03:23:33 PM »
I created an alias in .bashrc which will re-attach to the same screen if it exists:

Code: [Select]
alias gbs="cd /home/pi/gunbot/GunbotArm; screen -S "GunBot" -d -R /home/pi/gunbot/GunbotArm/gunthy-arm"

Offline Robsteady

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: [Guide] Gunbot XT and GunBot Version 5 using a Raspberry P 3
« Reply #18 on: January 01, 2018, 08:22:17 PM »
at the moment i have 34 pairs.

if you want to use VNC you don't need any screen. thats what it is for. if you really need a GUI.

this is how it will look like when you use VNC:



Another option is to just visit [RaspberryPi's IP address]:5000 from the browser on another computer on the network. I just find it a slightly more "elegant" way of interacting with the bot once it's running.

Offline kalintri

  • Rookie
  • *
  • Posts: 6
    • View Profile
Re: [Guide] Gunbot XT (v7) using a Raspberry Pi
« Reply #19 on: January 10, 2018, 03:12:45 PM »
Hi All,

I am trying to install GB XT (7.0.2) on Raspberry Pi 3B.
I have copied the folder and changed the permissions, but when I try to start it I am getting a "Segmentation fault". I am attaching a screenshot. The Pi is running Raspbian Stretch with GUI, which has been updated and upgraded and other software is running on it just fine without such fault.
I have tried running it both with and without "sudo", but the result is the same.

Any ideas and help how I might resolve that will be much appreciated.