• 車種別
  • パーツ
  • 整備手帳
  • ブログ
  • みんカラ+

ytak01のブログ一覧

2017年01月10日 イイね!

GIMX USB Adapter(Arduino)への書き込みに失敗する

ArduinoへのGIMX firmware書き込み時のハマりどころです。

良くArduinoBuilderを使ったArduinoへの書き込みに失敗すると言う書き込みを見ますが、恐らく
・ArduinoBuilder-0.9.1を使う
・ArduinoへACアダプタを使う
の2つを行えばすんなりと書き込み出来るようになると思います。

特にACは重要で、ArduinoBuilderで書き込み中にUSBがリセットされたような感じになります。
USBで電源を取っているとこの時にArduino自体もリセットされるようで、次のStepに進まなくなりエラーとなっているようです。

私もこの症状に陥り暫く途方に暮れましたが、DCジャックにACアダプタを接続したところ問題無く書き込めるようになりました。

まあ、このACアダプタが意外と問題でたった一度の書き込みの為に購入するのも面倒だし勿体ないしで普通はUSBケーブルから電源を取って済ませたくなりますよね・・・

ArduinoBuilderの書き込みボタンとArduinoのリセットボタンのタイミングでたまに書き込み出来るので根気よく繰り返すのも有りだと思います。

ですが、そのタイミングによってPC上でUSBが認識されない状態に陥ってしまうこともあります。
(私もなりました)

その場合はBootloaderが飛んでいるのでArduino純正のアプリで適当なソースをコンパイル&書き込みを行えば純正のBootloaderがまた書き込まれます。
(この時もタイミングがあります)

完全文鎮化はしないようなのですが、意外と大変なので初心者の方は素直にACアダプタを使う方が早いと思います。

ちなみに書いたファームはこれです。
firmwares-5.8\EMUG29PS4\atmega32u4.hex
Posted at 2017/01/10 16:11:14 | コメント(0) | トラックバック(0) | gimx | 趣味
2017年01月10日 イイね!

neGT-USBをGIMXにつなぐ為のconfig設定

現在私の環境では

ゼロテック <-> RaspberryPi3(+DS4) <-> Arduino <-> PS4

と、なっていますが、結構大変なので

ゼロテック <-> neGT-USB <-> RaspberryPi3(+DS4) <-> Arduino <-> PS4

として使う場合のGIMXのconfig設定を載せておきます。

neGT-USBはGT Force互換のUSBをエミュレートしているのですが、日本名でGT Forceは海外では「WingMan Formula Force GP」と言う名前らしく、GIMXの設定ファイルは"LogitechFormulaForceGP_G29.xml"と言うのを下地に使いました。


そのままでは動作しません。
キーポイントはnameパラメータです。
<device type="joystick" id="0" name="Logitech Inc. WingMan Formula Force GP"/>
と言う部分があるのですが、ここがデフォルトでは「Logitech Inc. WingMan Formula Force GP」になっています。
これを全て「HID 046d:c293」に変更します。

このnameに置き換える文言はlsusb,dmesg等で確認できるのでneGT-USB3等でもnameを変えれば使えるようになると思います。

私の設定を載せておきます。

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <controller id="1" dpi="0" type="G29 PS4">
    <configuration id="1">
      <trigger type="" id="" name="" button_id="" switch_back="no" delay="0"/>
      <mouse_options_list/>
      <intensity_list/>
      <button_map>
        <button id="abs_axis_10" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="0"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="1"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="2"/>
        </button>
        <button id="abs_axis_7" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="3"/>
        </button>
        <button id="abs_axis_11" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="4"/>
        </button>
        <button id="abs_axis_12" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="5"/>
        </button>
        <button id="abs_axis_0" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="8"/>
        </button>
        <button id="abs_axis_1" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="9"/>
        </button>
        <button id="abs_axis_15" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="10"/>
        </button>
        <button id="abs_axis_16" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="11"/>
        </button>
        <button id="abs_axis_2" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="12"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="14"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="15"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="16"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="17"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="button" id="3"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="button" id="2"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="button" id="0"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="button" id="1"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="button" id="5"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="button" id="4"/>
        </button>
      </button_map>
      <axis_map>
        <axis id="abs_axis_17" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="axis" id="1" dead_zone="0" multiplier="-0.008" exponent="1.00" shape=""/>
        </axis>
        <axis id="abs_axis_18" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="axis" id="1" dead_zone="0" multiplier="0.008" exponent="1.00" shape=""/>
        </axis>
        <axis id="rel_axis_0" label="">
          <device type="joystick" id="0" name="HID 046d:c293"/>
          <event type="axis" id="0" dead_zone="0" multiplier="0.0039" exponent="1.00" shape=""/>
        </axis>
      </axis_map>
      <joystick_corrections_list/>
    </configuration>
  </controller>
</root>

Posted at 2017/01/10 12:31:47 | コメント(0) | トラックバック(0) | gimx | 趣味
2017年01月10日 イイね!

gamecon_gpio_rpiへのパッチのあてかた

自分用の備忘録として書いておきます。

neGT-USBを使わずにRPiにダイレクトにネジコンをつなぐ(Part4)
でgamecon_gpio_rpi.cの変更点を書いたのですが、gamecon_gpio_rpiはGitHubに見つからず、パッケージファイルしかありません。
(もしかしたらGitHubにあるかもしれませんが探しきれませんでした。)

実際にインストールする時は
https://www.niksula.hut.fi/~mhiienka/Rpi/
から
gamecon-gpio-rpi-dkms_1.2_all.deb
を取得してインストールしているので、これを修正します。

以前、RetroPieを下地にしていると書きましたがRetroPieでいろいろやっていたらかなり不安定で検討中に何度かkernel panicを起こしたのでRetroPieは使わずにRaspbianを使う事にしました。
Raspbianのインストールなどは検索して下さい。いろいろ出てきます。

私のVersionは
Linux rpi-gimx 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
です。

1,ラズパイにログインする
2,適当なディレクトリを作る
mkdir src
cd src
3,パッケージファイル取得
wget https://www.niksula.hut.fi/~mhiienka/Rpi/gamecon-gpio-rpi-dkms_1.2_all.deb
4,いろいろ解凍
sudo ar x gamecon-gpio-rpi-dkms_1.2_all.deb
mkdir tmp
cd tmp/
cp ../data.tar.xz ./
xz -dv data.tar.xz
tar -xvf data.tar
rm data.tar
これでtmpディレクトリにusr/が作られるのでその中のソースを編集する
5,ソース変更
sudo vi usr/src/gamecon_gpio_rpi-1.2/gamecon_gpio_rpi.c
変更点自体は
https://minkara.carview.co.jp/userid/1799061/blog/39218859/
を参照
6,data.tar.gz作成
始めから入っているdata.tar.xzは解凍が面倒なのでこれを機にtar.gzへ変更します
sudo tar -czf ../data.tar.gz *
cd ../
sudo ar r gamecon-gpio-rpi-dkms_1.2_all.deb data.tar.gz
sudo ar d gamecon-gpio-rpi-dkms_1.2_all.deb data.tar.xz
sudo ar t gamecon-gpio-rpi-dkms_1.2_all.deb
で変更されていることを確認
7,インストール
sudo dpkg -i gamecon_gpio_rpi-dkms_1.2_all.deb
8,モジュール読み込み
sudo modprobe -r gamecon_gpio_rpi
sudo modprobe gamecon_gpio_rpi map=0,0,7,0,0,0 psx_delay=25
9,再起動時の為のモジュールパラメータの設定
sudo vi /etc/modprobe.d/gamecon.conf
options gamecon_gpio_rpi map=0,0,7,0,0,0 psx_delay=25
の一文を書く

dkmsは便利なコマンドで今後のkernelアップデート時にも自動でビルドからやってくれそうな感じです。
sudo apt-get install dkms
でインストール出来ます。
https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/
が修正される限りkernelのアップデートも可能かと思います。
まあ、不安な場合はkernelアップデート(rpi-update含む)は控えた方が良いと思います。
kernel-headersのインストール方法は
uname -r
を実行し出てきたVersionに対応するkernel-headersを取得&インストールします。
私の場合
4.4.38-v7+
だったので
wget https://www.niksula.hut.fi/~mhiienka/Rpi/linux-headers-rpi/linux-headers-4.4.38-v7+_4.4.38-v7+-2_armhf.deb
sudo dpkg -i linux-headers-4.4.38-v7+_4.4.38-v7+-2_armhf.deb
でインストール後に上記gamecon-gpio-rpiをインストールします。

これから皮膚科です。
2時間待ち・・・orz

Posted at 2017/01/10 09:08:07 | コメント(0) | トラックバック(0) | gimx | 趣味
2017年01月10日 イイね!

neGT-USBを使わずにRPiにダイレクトにネジコンをつなぐ(Part5)

次はネジコンのキャリブレーションとGIMXのconfig設定です。

ネジコンを接続しただけではアナログ(axis)のキャリブレーションがされていない状態で、ハンドルを切っても思うように曲がりません。

キャリブレーションはjstestとjscalを使います。
jstest-gtkと言うGUIアプリを使いました。
(jstest-gtkの使い方はググって下さい)
しかし、このままではラズパイ再起動時にキャリブレーション設定が元に戻ってしまいます。

jstest-gtkでキャリブレーションをすませたあと、jstestを使って現在の設定を書き出します。

jscal -p /dev/input/js0 > jscal.sh

としてjscal.shに設定を書き出します。
ラズパイ起動時にこのjscal.shを実行させればキャリブレーションが復元されます。
私はGIMXのサービススクリプトで実行させるようにしました。

私のjscal.shの内容を載せておきます。

jscal -s 6,1,0,127,127,4227201,4194176,1,0,127,127,4227201,4194176,1,0,128,128,9941750,10129330,1,0,127,127,4227201,4194176,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0

で、GIMXのconfigですがgimx-configと言うGUIアプリを使って設定しました。

これも載せておきます。

<?xml version="1.0" encoding="UTF-8"?>
<root>
  <controller id="1" dpi="0" type="G29 PS4">
    <configuration id="1">
      <trigger type="" id="" name="" button_id="" switch_back="no" delay="0"/>
      <mouse_options_list/>
      <intensity_list/>
      <button_map>
        <button id="abs_axis_10" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="0"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="1"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="2"/>
        </button>
        <button id="abs_axis_7" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="3"/>
        </button>
        <button id="abs_axis_11" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="4"/>
        </button>
        <button id="abs_axis_12" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="5"/>
        </button>
        <button id="abs_axis_0" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="8"/>
        </button>
        <button id="abs_axis_1" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="9"/>
        </button>
        <button id="abs_axis_15" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="10"/>
        </button>
        <button id="abs_axis_16" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="11"/>
        </button>
        <button id="abs_axis_2" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="12"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="14"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="15"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="16"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="joystick" id="0" name="Sony Computer Entertainment Wireless Controller"/>
          <event type="button" id="17"/>
        </button>
        <button id="abs_axis_8" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="0"/>
        </button>
        <button id="abs_axis_9" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="2"/>
        </button>
        <button id="abs_axis_3" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="12"/>
        </button>
        <button id="abs_axis_5" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="14"/>
        </button>
        <button id="abs_axis_2" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="9"/>
        </button>
        <button id="abs_axis_7" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="5"/>
        </button>
        <button id="abs_axis_6" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="15"/>
        </button>
        <button id="abs_axis_4" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="button" id="13"/>
        </button>
        <button id="abs_axis_10" label="">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="axis down" id="1" threshold="-10"/>
        </button>
      </button_map>
      <axis_map>
        <axis id="rel_axis_0" label="wheel">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="axis" id="2" dead_zone="0" multiplier="0.0039" exponent="1.00" shape=""/>
        </axis>
        <axis id="abs_axis_17" label="gas">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="axis" id="3" dead_zone="0" multiplier="0.008" exponent="1.00" shape=""/>
        </axis>
        <axis id="abs_axis_18" label="brake">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="axis" id="0" dead_zone="0" multiplier="0.008" exponent="1.00" shape=""/>
        </axis>
      </axis_map>
      <joystick_corrections_list>
        <correction low_value="-32767" low_coef="0" high_value="-32767" high_coef="8192">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="axis" id="0"/>
        </correction>
        <correction low_value="-32767" low_coef="0" high_value="-32767" high_coef="8192">
          <device type="joystick" id="0" name="PSX controller"/>
          <event type="axis" id="3"/>
        </correction>
      </joystick_corrections_list>
    </configuration>
  </controller>
</root>
Posted at 2017/01/10 01:23:09 | コメント(0) | トラックバック(0) | gimx | 趣味

プロフィール

「GIMXがPS5で動いた~~~!!! http://cvw.jp/b/1799061/45524956/
何シテル?   10/08 22:18
ytak01と言う者です。 貧乏な車好きのおっさんです。 この度86購入しました。 よろしくお願いします。
みんカラ新規会員登録

ユーザー内検索

<< 2017/1 >>

123456 7
8 9 1011121314
1516 1718192021
22 23 2425262728
293031    

ブログカテゴリー

リンク・クリップ

[トヨタ 86]スバル(純正) E型用 パワーステアリング コンピュータASSY 
カテゴリ:その他(カテゴリ未設定)
2022/06/13 15:24:19
実験君(ヘッドライト編 パート2) 
カテゴリ:その他(カテゴリ未設定)
2019/02/21 18:27:48
ブルーエリア / ネッツトヨタ東埼玉 リアスタビブラケット 
カテゴリ:その他(カテゴリ未設定)
2018/08/01 07:36:34

愛車一覧

トヨタ 86 トヨタ 86
5月M納車です
トヨタ シエンタハイブリッド トヨタ シエンタハイブリッド
4月納車です
トヨタ MR2 トヨタ MR2
MR2に乗っていました。
日産 シルビア 日産 シルビア
シルビアに乗っていました。

過去のブログ

2020年
01月02月03月04月05月06月
07月08月09月10月11月12月
2018年
01月02月03月04月05月06月
07月08月09月10月11月12月
2017年
01月02月03月04月05月06月
07月08月09月10月11月12月
2016年
01月02月03月04月05月06月
07月08月09月10月11月12月
2013年
01月02月03月04月05月06月
07月08月09月10月11月12月
ヘルプ利用規約サイトマップ
© LY Corporation