Python + PySide for MinXSS_Beacon_Decoder



● (No.947) Python + PySide for MinXSS_Beacon_Decoder (2017年3月27日)
 -------------------------------------------------------------------

Python と PySide に依存する 「MinXSS_Beacon_Decoder」 のインストールを試み
てみました。Python には、Ver2系と Ver3系がありますが、PySide は Ver3系に
は対応していません。従って、Python は最初から Ver2系をインストールすると
よいでしょう。また、Python のインストール後のフォルダも Python 2.7.13 は
 C:\ の直下であるのに対し、Python 3.6.1 では相当に下の階層フォルダにイン
ストールされています。この点からも Python は、Ver2系をインストールすべき
です。また下記の説明の中では、コマンドで Python にパス(Path)を通すように
していますが、Python のインストールの最初に 「Add  Python.exe to Path」 を
有効にしておけば手間が省けます。(改訂実行.exeファイルについては下段参照)


  

  


(Successfully)
Download Python 2.7.13
http://www.python.org/downloads/

Download MinXSS_Beacon_Decoder
http://github.com/jmason86/MinXSS_Beacon_Decoder
Use the "Clone or download" button and select "Download zip".

On command prompt in Windows
C:\.....>cd \
C:\>Path C:\Python27

Example sample.py: print('Hello')
cd /d D:\minxss\MinXSS_Beacon_Decoder-master
D:\minxss\MinXSS_Beacon_Decoder-master>python sample.py
Confirm 'Hello'

Install PySide
cd /d C:\Python27
C:\Python27>python -m pip install -U PySide
Successfully installed PySide-1.2.4

Install serial
C:\Python27>pip install pyserial
Successfully installed pyserial1-3.3

Install socket
C:\Python27>python -m pip install -U socketIO-client
Successfully installed socketIO-client-0.7.2

Run minxss_beacon_decoder.py
cd /d D:\minxss\MinXSS_Beacon_Decoder-master
D:\minxss\MinXSS_Beacon_Decoder-master>python minxss_beacon_decoder.py
(On going)

------------------------------------------------------------------------
(Failure)
Download Python 3.6.1
http://www.python.org/downloads/

Download MinXSS_Beacon_Decoder
http://github.com/jmason86/MinXSS_Beacon_Decoder
Use the "Clone or download" button and select "Download zip"

On command prompt in Windows,
Path C:\Users\Owner\AppData\Local\Programs\Python\Python36-32

Example sample.py: print('Hello')
cd /d D:\minxss\MinXSS_Beacon_Decoder-master
D:\minxss\MinXSS_Beacon_Decoder-master>python sample.py
Confirm 'Hello'

Install PySide
cd /d C:\Users\Owner\AppData\Local\Programs\Python\Python36-32
C:\Users\Owner\AppData\Local\Programs\Python\Python36-32>python -m pip install -U PySide
(Failure)
------------------------------------------------------------------------

そうこうしているうちに、macOS/Windows版対応の 「MinXSS_Beacon_DecoderWin」
が開発されたようです。しかし、自局の Windows7 / 8.1(ともに 32ビット)では
起動しませんでした。明日、Windows 10(64ビット)上で試してみます。このこと
について、作者のコロラド大学 James Mason氏には連絡済みです。

Subject: MinXSS Beacon DecoderWin
From: James Mason
To: Mineo Wakita
Date: Tue, 28 Mar 2017 17:46:50 +0000

Hi Mineo,
Good news!

I've finally figured out how to compile the code into executable files
for macOS and Windows! It looks like you're using Windows, so you can
now just run the file MinXSS_Beacon_DecoderWin.exe from here
http://github.com/jmason86/MinXSS_Beacon_Decoder/tree/master/dist.

Note that it is still in development and I'll be adding improvements as
time goes on, but the basic functionality of real time decoding is there.

Have fun!
-James

Re: MinXSS_Beacon_DecoderWin
From: Mineo Wakita
To: James Mason
Date: Wed, 29 Mar 2017 18:34:51 +0900

Thank you very much for MinXSS_Beacon_DecoderWin.exe.
> http://github.com/jmason86/MinXSS_Beacon_Decoder/tree/master/dist

But I don't start it on Windows 7 and 8.1 (both 32 bit).
I will test to run it on Windows 10 (64 bit) tommorow.

JE9PEL, Mineo Wakita


Re^2: MinXSS_Beacon_DecoderWin
From: Mineo Wakita
To: James Mason
Date: Wed, 29 Mar 2017 23:38:16 +0900

改訂実行.exeファイル「MinXSS_Beacon_DecoderWin.exe」 が、Windows8.1(64bit)
の PC上で起動できました。この DecoderWin.exe は、64ビット用のソフトです。

  


Re^3: MinXSS_Beacon_DecoderWin
From: James Mason
To: Mineo Wakita
Date: Wed, 29 Mar 2017 14:48:08 +0000

Ah yes, I can believe that. The tool I use to compile the code into
an executable (pyinstaller) is not a "cross-compiler", so I need to
compile the code on each operating system in order to get it to work
on that one. I don't have access to any 32 bit windows machines,
so it'll be up to someone else to compile the code for 32 bit if
there's demand for it. I compiled the Windows one on Windows 10
64 bit, and it looks like it works in 8.1 as well, which is good.


Re^4: MinXSS_Beacon_DecoderWin
From: Mineo Wakita
To: James Mason
Date: 30 Mar 2017 07:04:00 +0900

次図は、LINUX上で実際に運用している様子です。
MinXSS衛星は一ヶ月半後に大気圏再突入が予想されていますが、今回の Decoder
の開発・技術は、続いて制作予定の MinXSS-2衛星に引き継がれることでしょう。

> MinXSS-1 0517utc 38 degrees pass, both Win & Linux @minxsscubesat
> decoders working better with every update! http://git.io/vS3Iq.

  


Re^5: MinXSS_Beacon_DecoderWin
From: JE9PEL/1
To: JA0CAW
Date: Date: Sat, 1 Apr 2017 19:40:56 +0900

その後の PE0SAT, JA0CAW, JE1CVL 各局の実験の様子をみると、そのポイントは
次図にあるようです。この図は自局 JE9PEL/1 による設定をスクリーンショット
したもので、Decoder は文字通りデコード直前の状態にあります。

  


[Reference]

http://twitter.com/minxsscubesat/
http://blog.goo.ne.jp/je1cvl/d/20170331
http://blog.goo.ne.jp/ja0caw-je0mzi/d/20170331
http://github.com/jmason86/MinXSS_Beacon_Decoder/releases


[Addition]

来たる MinXSS-2 の打ち上げに備えて(My_No.965)、「MinXSS-1 beacon decoder」
の再インストールを試みている。Decoder は、このサイトから、初期のものから
最近のものまで、「MinXSS_Beacon_DecoderWin.exe」 として 全てのバージョンの
ものが得られる。 この Decoder は、基本的に Windows 10 (64bit) の PC 上で
動作することが確認できており、以前、自局PCでも起動の確認ができた。今回、
改めて再インストールしてみて、 「Fatal Error …」 というメッセージの後に、
どうしても起動できない。Windows 10 Home (64bit) が原因かもしれないと考え
Windows 10 Pro (64bit) の PC にインストールしてみると、こちらは難なく起動
する(下図)。本当に Home と Pro の違いだけで、起動する/しないということが
あるのだろうか? Windows 10 のバージョンにも関係しているのかもしれない。
なお、初期の 「MinXSS_Beacon_Decoder.exe」 は、Python2.7等のインストールが
必要であったが、最近の 「…Win.exe」 では必要ない。input_properties.cfg は
編集後、C:\users\(username)\MinXSS_Beacon_Decoder に保存する。(4 Aug.2017)

再度、"MinXSS beacon decoder" の起動実験を行ってみたところ、もう一台の
Windows 10 Home, ver 1607, 64 bit, with AMD Radeon R2 のPCでは起動した。
なぜ、Windows 10 Home, ver 1703, 64 bit, with Intel Celeron のPCで起動
しないのか、その理由がますますわからなくなった。             (11 Aug.2017)

※ 解決した! 最下段参照。

  

  


New MinXSS beacon decoder compiling #1

"MinXSS_Beacon_DecoderWin.exe" が、一台の Windows 10 Home PC上でどうして
も起動しないので、作者から教示されたとおりに次の手順で、Python Installer
を使って、minxss_beacon_decoder.py から強制的にコンパイルしてみた。結果、
新しく "MinXSS_Beacon_DecoderWinHome.exe" は何とか生成し、あともう少しで
それが起動できそうなところまで到達した。

実は、この一台のPCのみ "MinXSS_Beacon_DecoderWin.exe" が起動しない理由に
心当たりがある。この PCは、元々は Windows 8.1, 64bitマシンで、それを以前
Windows 8.1 から Windows 10 に後からアップデートしたPCなので、恐らく何か
重要なWindowsファイルが引き継がれていないのではないかと思う。(13 Aug.2017)


1. Download the source code (zip) from here:
   http://github.com/jmason86/MinXSS_Beacon_Decoder/releases/tag/1.2.0
2. Install Python27:
   http://www.python.org/downloads/
3. Open MS command prompt.
4. Install: PySide, serial, socket as follows.
   Type, python -m pip install -U PySide
   Type, pip install pyserial
   Type, python -m pip install -U socketIO-client
5. Install pyinstaller:
   Type, pip install pyinstaller
6. Unzip the MinXSS_Beacon_Decoder-1.2.0.zip in the newly folder.
7. Set the access permissions in properties of the newly unzipped folder.
8. CD (Change Directory) to the newly unzipped folder.
9. Type, pyinstaller minxss_beacon_decoder.py --onefile -n MinXSS_Beacon_DecoderWinHome --clean --windowed --noconfirm


New MinXSS beacon decoder compiling #2

さらに進展したコンパイルを実行し、ようやく "MinXSS beacon decoder" を起動
することができた。途中で、"No module named numpy" という警告表示が出たが
"pip install numpy" とコマンドを打ち込んで対処した。最後に Python により
"python minxss_beacon_decoder.py" として完成した。 なお、初期の Decoder 
でも考慮した "input_properties.cfg" を、MinXSSフォルダから次のフォルダに
編集後、保存する必要があった。C:\users\(username)\MinXSS_Beacon_Decoder
                                                             (15 Aug.2017)

> From: James Mason
> Sorry for the slow response.
> I'm out in Alaska helping to install our second UHF ground station.
> Glad to see the progress! I think it is very close.
> A couple of things to try:

*  Make sure you have the folder C:\users\(username)\MinXSS_Beacon_Decoder
   and the file input_properties.cfg in it.

   This is a known issue
   http://github.com/jmason86/MinXSS_Beacon_Decoder/issues/9
   with the program.

     [input_properties.cfg]
     serialport = 3
     baudrate = 19200
     ipaddress = 127.0.0.1
     port = 8100
     decodeKiss = True
     forwardData = True
     latitude = 35.3841
     longitude = 139.6101

*  I want to automatically generate that folder and file but
   have to figure out how to deal with write permissions.
*  If that doesn't work, try the steps below:
*  Open MS Command Prompt
*  CD to the directory where you have the MinXSS beacon decoder python code
   that you downloaded
*  Type: pip install numpy
*  Type: python minxss_beacon_decoder.py


   

   


[Solved]

先日、C:\Users\... をレジストリで変更して PC起動に大変なトラブルを起こし
てしまったが、この件、発想の転換で見事に解決した! こんな危険な作業をせず
とも、半角アルファベットの新たなローカルアカウント名を作成し、このUser名
でアカウント切り替えをしてサインインし直せば、今まで漢字User名に起因して
起動しなかったすべての外国ソフトが、正常に起動することを確認した。(次図)
漢字User名でも動作する外国ソフトは多いが、C:\Users\...を参照するソフトは
英語版Windowsにおいては漢字User名は極力避けるべきであることを再認識した。
MinXSS_Decoder が起動しなかった件も、一年越しで解決した。     (4 Jun.2018)

  


 トップ へ戻る.
 前のページ へ戻る.
 次のページ へ移る.
 ホームページ(目次) へ戻る.