Navigatrix.net - A Voyager's Companion http://navigatrix.net/ |
|
Pactor http://navigatrix.net/viewtopic.php?f=4&t=597 |
Page 4 of 5 |
Author: | Atmo [ 29 Apr 2014, 22:32 ] |
Post subject: | Re: Pactor |
Great, thanx, just managed and got !/bin/bash cd / # assign wine com ports comports rm -f /home/$USER/.wine/dosdevices/com* for line in $(ls /dev/com*); do port=$(echo $line|awk -F'/' '{print $3}') ln -s $line /home/$USER/.wine/dosdevices/$port done # latitude lata=$(cat /etc/nx.lat|awk -F'.' '{print $1}') latc=N if [ $(echo $lata|grep -c -) -eq 1 ]; then latc=S fi lata=$(echo $lata|grep -om1 "[[:digit:]]\{1,3\}") latb=$(printf %.0f $(echo 0.$(cat /etc/nx.lat|awk -F'.' '{print $2}')*60|bc)) lat=$(echo -e "$lata\xb0$latb.00'$latc") # longitude lona=$(cat /etc/nx.lon|awk -F'.' '{print $1}') lonc=E if [ $(echo $lona|grep -c -) -eq 1 ]; then lonc=W fi lona=$(echo $lona|grep -om1 "[[:digit:]]\{1,3\}") lonb=$(printf %.0f $(echo 0.$(cat /etc/nx.lon|awk -F'.' '{print $2}')*60|bc)) lon=$(echo -e "$lona\xb0$lonb.00'$lonc") # airmail.ini setup cfg=/home/$USER/.wine/drive_c/users/Public/Application\ Data/Airmail/Airmail.ini sed -e 's/'"$(cat "$cfg"|grep -i "Current Latitude")"'/Current Latitude='$lat'/g' <"${cfg}" >"${cfg}.new" mv "${cfg}.new" "${cfg}" sed -e 's/'"$(cat "$cfg"|grep -m1 "Latitude")"'/Latitude='$lat'/g' <"${cfg}" >"${cfg}.new" mv "${cfg}.new" "${cfg}" sed -e 's/'"$(cat "$cfg"|grep -i "Current Longitude")"'/Current Longitude='$lon'/g' <"${cfg}" >"${cfg}.new" mv "${cfg}.new" "${cfg}" sed -e 's/'"$(cat "$cfg"|grep -m1 "Longitude")"'/Longitude='$lon'/g' <"${cfg}" >"${cfg}.new" mv "${cfg}.new" "${cfg}" # save attachment watchdog airsave& # start airmail cd $HOME/.wine/dosdevices/c:/Program\\ Files/Airmail/ ln -s $HOME/.wine/drive_c/users/Public/ $HOME/.wine/drive_c/users/$USER env WINEPREFIX="$HOME/.wine" wine $HOME/.wine/drive_c/Program\ Files/Airmail/Airmail3.exe Greetings from Petra too! |
Author: | Atmo [ 29 Apr 2014, 22:40 ] |
Post subject: | Re: Pactor |
I wasn't sure how to save stuff in Terminal, so I just hit the save button. After opening Terminal again and putting the sudo line in Airmail opened automatically and I got: nx@c:~$ !/bin/bash bash: !/bin/bash: event not found nx@c:~$ cd / nx@c:/$ # assign wine com ports nx@c:/$ comports /dev/com1 -> /dev/ttyS0 /dev/com2 -> /dev/ttyS1 nx@c:/$ rm -f /home/$USER/.wine/dosdevices/com* nx@c:/$ for line in $(ls /dev/com*); do > port=$(echo $line|awk -F'/' '{print $3}') > ln -s $line /home/$USER/.wine/dosdevices/$port > done nx@c:/$ nx@c:/$ # latitude nx@c:/$ lata=$(cat /etc/nx.lat|awk -F'.' '{print $1}') nx@c:/$ latc=N nx@c:/$ if [ $(echo $lata|grep -c -) -eq 1 ]; then > latc=S > fi nx@c:/$ lata=$(echo $lata|grep -om1 "[[:digit:]]\{1,3\}") nx@c:/$ latb=$(printf %.0f $(echo 0.$(cat /etc/nx.lat|awk -F'.' '{print $2}')*60|bc)) nx@c:/$ lat=$(echo -e "$lata\xb0$latb.00'$latc") nx@c:/$ nx@c:/$ # longitude nx@c:/$ lona=$(cat /etc/nx.lon|awk -F'.' '{print $1}') nx@c:/$ lonc=E nx@c:/$ if [ $(echo $lona|grep -c -) -eq 1 ]; then > lonc=W > fi nx@c:/$ lona=$(echo $lona|grep -om1 "[[:digit:]]\{1,3\}") nx@c:/$ lonb=$(printf %.0f $(echo 0.$(cat /etc/nx.lon|awk -F'.' '{print $2}')*60|bc)) nx@c:/$ lon=$(echo -e "$lona\xb0$lonb.00'$lonc") nx@c:/$ nx@c:/$ # airmail.ini setup nx@c:/$ cfg=/home/$USER/.wine/drive_c/users/Public/Application\ Data/Airmail/Airmail.ini nx@c:/$ sed -e 's/'"$(cat "$cfg"|grep -i "Current Latitude")"'/Current Latitude='$lat'/g' <"${cfg}" >"${cfg}.new" nx@c:/$ mv "${cfg}.new" "${cfg}" nx@c:/$ sed -e 's/'"$(cat "$cfg"|grep -m1 "Latitude")"'/Latitude='$lat'/g' <"${cfg}" >"${cfg}.new" nx@c:/$ mv "${cfg}.new" "${cfg}" nx@c:/$ sed -e 's/'"$(cat "$cfg"|grep -i "Current Longitude")"'/Current Longitude='$lon'/g' <"${cfg}" >"${cfg}.new" nx@c:/$ mv "${cfg}.new" "${cfg}" nx@c:/$ sed -e 's/'"$(cat "$cfg"|grep -m1 "Longitude")"'/Longitude='$lon'/g' <"${cfg}" >"${cfg}.new" nx@c:/$ mv "${cfg}.new" "${cfg}" nx@c:/$ nx@c:/$ # save attachment watchdog nx@c:/$ airsave& [1] 4713 nx@c:/$ nx@c:/$ # start airmail nx@c:/$ cd $HOME/.wine/dosdevices/c:/Program\\ Files/Airmail/ bash: cd: /home/nx/.wine/dosdevices/c:/Program\: No such file or directory nx@c:/$ ln -s $HOME/.wine/drive_c/users/Public/ $HOME/.wine/drive_c/users/$USER ln: failed to create symbolic link ‘/home/nx/.wine/drive_c/users/nx/Public’: File exists nx@c:/$ env WINEPREFIX="$HOME/.wine" SSH_AGENT_PID=1356 SAL_USE_VCLPLUGIN=gtk TERM=xterm SHELL=/bin/bash XDG_MENU_PREFIX=lxde- XDG_SESSION_COOKIE=a5d2ce55b73bdae6b255eb04532cef29-1398811755.493660-1349087998 GNOME_KEYRING_CONTROL=/run/user/nx/keyring-N6Nz1d USER=nx LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36: XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 SSH_AUTH_SOCK=/run/user/nx/keyring-N6Nz1d/ssh DEFAULTS_PATH=/usr/share/gconf/Navigatrix.default.path XDG_CONFIG_DIRS=/etc/xdg/navigatrix/:/etc/xdg/xdg-Navigatrix:/etc/xdg PATH=/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games DESKTOP_SESSION=Navigatrix PWD=/ GNOME_KEYRING_PID=1373 LANG=en_US.UTF-8 MANDATORY_PATH=/usr/share/gconf/Navigatrix.mandatory.path GDMSESSION=Navigatrix _LXSESSION_PID=1317 SHLVL=1 HOME=/home/nx XDG_CONFIG_HOME=/home/nx/.config LANGUAGE=en LOGNAME=nx XDG_DATA_DIRS=/etc/xdg/navigatrix:/usr/share/Navigatrix:/usr/local/share/:/usr/share/:/usr/share:/usr/share/gdm:/var/lib/menu-xdg DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-SDUPdG7y9e,guid=11a9339baff825520be5bb0953602c6b LESSOPEN=| /usr/bin/lesspipe %s TEXTDOMAIN=im-config XDG_RUNTIME_DIR=/run/user/nx DISPLAY=:0 XDG_CURRENT_DESKTOP=LXDE LESSCLOSE=/usr/bin/lesspipe %s %s TEXTDOMAINDIR=/usr/share/locale/ XAUTHORITY=/home/nx/.Xauthority OLDPWD=/home/nx _=/usr/bin/env WINEPREFIX=/home/nx/.wine nx@c:/$ wine $HOME/.wine/drive_c/Program\ Files/Airmail/Airmail3.exe err:menubuilder:init_xdg error looking up the desktop directory WARNING: gnome-keyring:: couldn't connect to: /run/user/nx/keyring-N6Nz1d/pkcs11: No such file or directory fixme:ole:RemUnknown_QueryInterface No interface for iid {00000019-0000-0000-c000-000000000046} nx@c:/$ I go to Elfrun now and seee if the magic worked! Cheers, A&P |
Author: | Moe [ 29 Apr 2014, 22:58 ] |
Post subject: | Re: Pactor |
For the magic to work you need to flick your wand the other direction. Code: sudo medit /usr/local/bin/airmail opens a text editor (medit) with the file airmail already in it.You would then go to the fourth line of this text file Code: comports and add an -sCode: comports -s Then you save the file and exit the text editor.That it. ...oh, and greetings to Petra. |
Author: | Atmo [ 30 Apr 2014, 01:52 ] |
Post subject: | Re: Pactor |
O.k., there seemed have to be some server maintenance going on....., that's it what I got: (after restarting a few times just to make sure...) #!/bin/bash cd / # assign wine com ports comports -s rm -f /home/$USER/.wine/dosdevices/com* for line in $(ls /dev/com*); do port=$(echo $line|awk -F'/' '{print $3}') ln -s $line /home/$USER/.wine/dosdevices/$port done Still, usb serial attached to 0, airmail can't find a comport. We'll see, will sort out the other stuff you asked me to try weeks ago... thanks, Atmo |
Author: | Moe [ 30 Apr 2014, 02:57 ] |
Post subject: | Re: Pactor |
I think there were two issues going on. 1) this bug in the airmail script. 2) your usb/serial converter is not being recognised, or is being recognised-wrongly. I don't think we have fixed the second problem. (The server issue is with the hosting company. They did some modification a few months ago that made everything fragile. They think the problem is somewhere else and...we are not in charge.) |
Author: | iv3xhr [ 30 Oct 2014, 02:45 ] |
Post subject: | Re: Pactor |
David wrote: Just found a bug in the comport assignment of some navigatrix version... To fix it do the following: sudo medit /usr/local/bin/airmail and then change the line where it says "comports" to "comports -s" Otherwise you may have trouble accessing the comports within airmail. hi I think my problem is this I use the 0.5 version my airmail cannot work with com3 even if a comport -l command shows that on com3 is linked to rfcomm0 (my bluetooth port to pactor ptc) but if in a terminal I say comport -s all works perfectly but if i can try to modify /usr/local/bin/airmail I don't found comport line I found this at the beginning #!/bin/bash # comport links are now created by udevd # latitude udevd ? what can I do now ? |
Author: | David [ 02 Nov 2014, 23:35 ] | ||
Post subject: | Re: Pactor | ||
The latest 0.5 (august) has an updated version of the comports script. Its now all done with udev as soon as you plug in a usb to serial adapter. I hope this works for you. You can use the files from the zip file to update your system with these. Afterward updating the files you need to restart udev with sudo service udev restart
|
Author: | iv3xhr [ 04 Nov 2014, 17:58 ] |
Post subject: | Re: Pactor |
David wrote: The latest 0.5 (august) has an updated version of the comports script. Its now all done with udev as soon as you plug in a usb to serial adapter. I hope this works for you. You can use the files from the zip file to update your system with these. Afterward updating the files you need to restart udev with sudo service udev restart my problem is this: I connect ptc trought a usb-bluetooth converter the ptc has its bluetooth port if I open my airmail and try connection with com3 it says that no ptc there is on com3 if in a terminal window I say to the sistem comports -s immediately after airmail connects the ptc on com3 so to fix it now I've added a line in /usr/local/bin/airmail with the comand comports -s and all works perfectly now is there any other more elegant way to do this ? |
Author: | David [ 04 Nov 2014, 22:25 ] |
Post subject: | Re: Pactor |
more elegant would be to do it using the systems udev service (like done in the comports.zip from the previous post). than comports get updated at all times when you plugin the device.... not only when you start airmail. but if it works, leave it like this for now, indeed the missing parameter for the comports script was an error in a previous version. i did not test blue-tooth since i do not have it, eventually it would be necessary to adapt the udev rule if you like to use the udev method. |
Author: | jens [ 17 Apr 2015, 14:54 ] |
Post subject: | Re: Pactor |
I have a similar problem - my usb port is correctly re-directed to com 3 and recognized by AirMail but for reasons unknown the initialization of the DR7400 pactor modem fails. It doesn't seem to actually be talking to the outside world even though the port is recognized. I have been messing around with this for a few days now but no joy .... any help would be greatly appreciated! Oh, the same hardware under windoze works fine, same settings as well. |
Author: | David [ 17 Apr 2015, 21:32 ] |
Post subject: | Re: Pactor |
Did you use the comports scripts with the udev rules from the previous post ? What is the output when you execute the command "version" ? |
Author: | jens [ 17 Apr 2015, 21:55 ] |
Post subject: | Re: Pactor |
An interesting development ...... after several days messing with things, I somehow managed to connect to the modem via bluetooth ! I have no idea what if anything I did different but magically it works so who am I to argue with that! I have not yet tried to see if I can also connect with a cable connection to the modem now. My version of Navigatrix was downloaded maybe a week ago so it is fairly current version but I did not run any specific scripts. I will hopefully have a chance to verify cabled operation tomorrow afternoon. Thanks for your reply ! |
Author: | jens [ 18 Apr 2015, 19:42 ] |
Post subject: | Re: Pactor |
I had some more time for tests today .... First I opened a terminal window so I could frequently do a comports -l to keep tabs on what the computer thought was attached. I learned that plugging in a USB cable while bluetooth was configured kills the bluetooth connection. This was likely a big issue for me in my early attempts to get things going. If bluetooth is activated, if the bluetooth connection has been established and no serial USB cable is hooked up, everything works. If I turn off bluetooth and connect the serial USB cable, nothing works. I have tried rebooting the modem (sometimes it can lock up the session) and have shut down AirMail and re-started it - no joy I run version 0.5 of NX. comports -s does not make a difference. |
Author: | David [ 18 Apr 2015, 21:40 ] |
Post subject: | Re: Pactor |
Would you like to have a cable connection or a bluetooth connection ? I think we can figure out a solution. Can you give me the output of the command "version" there are different nx0.5 versions....the month tells wich is the latest. |
Author: | jens [ 18 Apr 2015, 23:53 ] |
Post subject: | Re: Pactor |
I will be using bluetooth (which is why I bought the bluetooth enabled modem) but I have a tough time leaving questions unanswered so I would really like to figure out why a straight USB serial cable doesn't work. Especially since it works just fine under windoze. The version 0.5 was from the start up screen. I will run the 'version' command and report on the result next time I am at the boat, probably tomorrow. |
Author: | David [ 19 Apr 2015, 02:01 ] |
Post subject: | Re: Pactor |
This should work: 1. Disconnect from Bluetooth 2. Connect the USB Cable 3. Go to the Terminal and enter command: comports -s 4. You should see the USB to serial on com3 if there is no other com port 5. Now start Airmail and configure it like you do in Windows but use the comport that was printed out on the terminal (most likely com3) There is an older nx 0.5 version which had a bug with the user rights for the com ports. If you have the current Version 0.5 (August 2014) then it should work fine. |
Author: | jens [ 19 Apr 2015, 03:15 ] |
Post subject: | Re: Pactor |
Thanks for the detailed steps David. I will go through that procedure later today but as far as I know, this is exactly what I have done with no joy. In any case, I will get the exact version number and will go through the steps as you laid them out and will report back. |
Author: | jens [ 19 Apr 2015, 12:52 ] |
Post subject: | Re: Pactor |
Ok, my version is 0.5 from 14 August 2014 Following the steps to the letter will give me /dev/com3 => /dev/ttyUSB0 but there is no communication to the DR7400 |
Author: | David [ 19 Apr 2015, 13:15 ] |
Post subject: | Re: Pactor |
After doing all the steps, but before running Airmail enter this command into the terminal and let me know if this helped.... sudo chmod ugo+rw /dev/ttyUSB* |
Author: | jens [ 19 Apr 2015, 13:33 ] |
Post subject: | Re: Pactor |
Unfortunately no change ... btw, I powered the modem down and back up just for the heck of it and did see some gibberish on the screen. It's almost as if the serial parameters somehow are wrong. I am set for 115 k baud, just like in windoze. |
Page 4 of 5 | All times are UTC - 5 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |