Download Latest Version myFP2-UserGuide-336-05.pdf (11.4 MB)
Email in envelope

Get an email when there's a new version of Arduino ASCOM Focuser Pro2 DIY

Home / LINUX
Name Modified Size InfoDownloads / Week
Parent folder
myFP2-Linux-0011.zip 2023-09-19 2.8 MB
myfp2lusb-0011-userguide.pdf 2023-09-19 539.9 kB
other-linux-systems.txt 2023-09-19 397 Bytes
myfp2lusb-change-log.txt 2023-09-19 1.8 kB
myfp2lusb-install-readme.txt 2023-09-19 5.4 kB
raspberry-pi.zip 2023-05-20 3.8 MB
myFP2LUSB-Install-Readme.txt 2021-09-18 5.5 kB
Totals: 7 Items   7.2 MB 1
==================================================================================
myFP2L LINUX USB SERIAL APPLICATION FOR myFP2 and myFP2ESP CONTROLLERS
(c) Robert Brown 2019-2021. All rights reserved.
==================================================================================

==================================================================================
USING myFP2ESP and myFocuserPro2 CONTROLLERS WITH LINUX
==================================================================================
There are a number of ways you can use a myFP2 Focus Controller with Linux systems.

1. This Linux application 
2. Use the myFocuserPro2 INDI driver

For Raspberry Pi, Ekos etc, the existing myFocuserPro2 INDI driver will communicate with a myFP2ESP Focus Controller.

When using a myFP2ESP focuser controller with a Linux system using the INDI driver, the INDI option on Pg3 of the Management server needs to be enabled.


myFP2L-LINUX USB APPLICATION
The provided LINUX application was developed and tested on UBUNTU with the MATE desktop environment, and supports  Serial USB connections to a myFP2ESP or myFP2 focus controller.

After recompiling the source code, copy the myfp2lusb  AND myfp2lusb.ini files to a user folder on your Linux system (like a folder under the desktop)


myfp2lusb.ini SETTINGS FILE
This file is used to save and restore the application settings.

[SETTINGS]
serialport=/dev/ttyS0
serialspeed=0
serialreadtimeout=5
delayonconnecttime=2
sendtempmode=1
sendmaxsteps=1
sendreversedirection=1
sendcoilpower=1
sendbacklash=1
sendmotorspeed=1
sendstepmode=1
sendstepsize=1
lcdenable=0
tempmode=0
stepsize=33.29
stepsizeenabled=1
blinenabled=1
bloutenabled=1
backlashinsteps=12
backlashoutsteps=23
reversedirection=0
coilpower=0
stepmode=1
motorspeed=0
tempcoefficient=0
tempcompdir=1
tempoffset=-0.25
refreshtempinterval=10000
refreshposinterval=5000
maxsteps=12000
pageoption=111
pagetime=10000
errorlogging=0
logfilepath=



CHANGE PORT SETTINGS IN THE myFP2L.INI FILE
The INI file will need changing. There is a string for the variable comport which looks like

serialport=/dev/ttyS0

You will need to change the serial port string to what is used for your system. For Raspberry PI it is more likely that string will look like

serialport=/dev/ttyUSB0


CHANGE LOG FILE LOCATION SETTINGS IN THE myfp2lusb.ini FILE
The INI file will need changing. There is a string for the variable logfilepath which looks like

logfilepath=

You will need to specify the path where your log files will be stored. The path below points to user bob’s home folder, and there is a folder on bob’s desktop called myLogFiles

logfilepath=/home/bob/Desktop/myLogFiles

After making the required changes to the myfp2lusb.ini file, save the file.

Alternatively, when the application runs the first time, it will detect that the logfile path has not been specified in the INI file and ask you to specify the folder where the log files can be saved. Once this is specified, then the log path is saved for future use.


REQUIRED GROUP PERMISSION
You must be a member of the group tty (Ubuntu-Mate) (others are the dialout group)
Use menu, administration, users and groups, manage groups, tty, properties
and ensure that your name is checked, then click OK


FLAG APPLICATION AS EXECUTABLE
Run a terminal window (as root) in the folder and change permissions of file

chmod +x myfp2lusb

or you can right mouse click the file, properties, permissions and check allow executing file as program.


I had to right mouse click file and chose run as adminstrator. It seems it cannot connect to tty0 device without admin privilege.



OTHER LINUX SYSTEMS
You will need to recompile the source code using Lazarus Pascal, in order to run the application on a different Linux system (or Raspberry Pi). The code was generated on a 32bit Intel based CPU.


INSTALL THE ARDUINO IDE
To install the Arduino IDE so you can program the controller, open a terminal window and type the following commands

sudo apt-get update
sudo apt-get install Arduino


INSTALL LAZARUS
If you need to recompile the source code, you will need to install Lazarus

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install fpc
sudo apt-get install Lazarus


RE-COMPILING THE SOURCE
To recompile the source, download the source files and extract the zip file into a folder. In that folder, open the myfp2lusbpi.lpi file in Lazarus and then from the menu bar select Run-Compile. Once the program is built, the myfp2lusb file can be executed.

When the program is first executed, and you did not specify where the log files are to saved, the application will first ask where to save the log files. After selecting a folder location, the application will save the log file path and continue.


HOW TO FIND SERIAL PORT
Connect controller to USB port
Start Arduino IDE
Look at menu Tools - it should say something like Port: "/dev/ttyUSB0"


ISSUE WITH SERIAL PORT BEING BUSY/LOCKED
Goto /var/
Delete the file LCK..ttyUSB0
(Hint it might be LCK..ttyS0)
Then run the program again


https://tldp.org/HOWTO/Serial-HOWTO-13.html


PLEASE READ THE DOCUMENTS FOR MORE INFORMATION
The documents are located in the Zip file under the Documents folder. 
















Source: myfp2lusb-install-readme.txt, updated 2023-09-19