軟硬體異常內容詳述

####2021-10-20_中賓停車場入口柵欄機無法放下

柵欄機使用說明
中賓人員來電叫修:入口柵欄機升起後無法放下,發出嗶嗶聲。
狀況分析:到現場後發現柵欄機主板上下定位燈全亮,無法手動下放,研判是定位開關定位異常。
處理過程:關閉柵欄機電源,轉動分離制動器,直到上定位開關未被壓住。反覆推拉上下定位開關,復電後不再發出嗶聲,定位燈正常、測試舉放正常。

####2021-12-14玉雪停車場aps002除錯

>無法列印時我做的檢查:  
1.確認socket 有在動作,且已更新
  git pull 確定沒有需要更新的內容
  tail -f 查看socketServer
  補列印交班結帳、發票、載具
  測試到下午16:00後發現log 列印沒反應,是在更新cline端之後發生問題

2.確認port 是使用中的port
  ls /dev
  cd /project/src/config.js
  cd /socketProject /config.ini
  16:30後檢查config 是否正確
  有重啟機器
  基本上檢查方向是錯誤的,因為是更新頁面後才發生無法列印的問題
  但仍舊有檢查socket的log

3.確認使用中的印表機
  頁面switch 使用中的印表機
  補列印交班結帳、發票、載具
  仍未有列印結果
  但仍舊有檢查socket的log  

4.確認cline送出的資料正確
  再次check data 格式是否正確
  補列印交班結帳、發票、載具
  沒有列印結果,但資料有發現錯誤,之後有更正,但仍舊無法補印發票之類的
  但仍舊有檢查socket的log

5.嘗試一號機換線
  補列印交班結帳、發票、載具
  仍未成功列印
  有重啟機器
  基本上硬體不容易壞,因此這個換線沒有幫助
  只檢查/dev  

6.切換印表機,測試是否正常
  nano config.ini using print = 2
  補列印交班結帳、發票、載具
  17:00後還不知道為什麼就列印成功了
  但仍舊有檢查socket的log
  在切換機器時,才終於成功列印,基本上修改config無意義

結論可能是頁面切換印表機按鈕有問題
要常開log 隨時tail -f 查看log

####2022-02-16因語音問題重建立環境

原本的方式
1.apt update upgrade
2.reboot
3.apt install xorg
4.apt install xubuntu-core^
5.apt remove xfce4-screensaver
6.apt install light-locker
7.reboot
8.login root and create new user cashier
9.nano /etc/asound.conf
  pcm.!default{
    type plug
    slave{
      pcm"hw:0,1"
    }
  }


之後的方式

方式1:
don't update apt
1.apt install xfce4
2.apt install tasksel
3.tasksel install xubuntu-core
4.apt-get remove xfce4-screensaver
5.apt-get install light-locker
6.reboot
7.check select desktop is xubuntu session
8.at /etc/pulse/default.pa
 add the following setting:

 load-module module-alsa-sink device="hw:0,0" sink_name=hdmi_out sink_properties="device.description='HDMI Out' device.icon_name='video-display'"
 load-module module-alsa-sink device="hw:0,1" sink_name=line_out sink_properties="device.description='Audio Jack' device.icon_name='audio-headphones'"
 load-module module-alsa-sink device="hw:0,2" sink_name=spdif_out sink_properties="device.description='SPDIF Out' device.icon_name='audio-speakers'"
9.at /etc/pulse/client.conf
  add   default-sink = line_out
10.reboot 檢查是否成功:依舊無法自動選取Audiojack

方式2:
update apt
1.apt install xubuntu
2.reboot
3.at /etc/pulse/default.pa
  add the following setting:

  load-module module-alsa-sink device="hw:0,0" sink_name=hdmi_out sink_properties="device.description='HDMI Out' device.icon_name='video-display'"
  load-module module-alsa-sink device="hw:0,1" sink_name=line_out sink_properties="device.description='Audio Jack' device.icon_name='audio-headphones'"
  load-module module-alsa-sink device="hw:0,2" sink_name=spdif_out sink_properties="device.description='SPDIF Out' device.icon_name='audio-speakers'"
4.at /etc/pulse/client.conf
  add   default-sink = line_out
10.reboot 檢查是否成功:依舊無法自動選取Audiojack

方式3:
update apt
1.apt install xubuntu-core^
2.apt remove xfce4-screensaver
3.apt install light-locker
4.reboot
5.login root and create new user cashier
6.at /etc/pulse/default.pa
  add the following setting:

  load-module module-alsa-sink device="hw:0,0" sink_name=hdmi_out sink_properties="device.description='HDMI Out' device.icon_name='video-display'"
  load-module module-alsa-sink device="hw:0,1" sink_name=line_out sink_properties="device.description='Audio Jack' device.icon_name='audio-headphones'"
  load-module module-alsa-sink device="hw:0,2" sink_name=spdif_out sink_properties="device.description='SPDIF Out' device.icon_name='audio-speakers'"
7.at /etc/pulse/client.conf
  add   default-sink = line_out
8.nano /etc/asound.conf
  pcm.!default{
    type plug
    slave{
      pcm"hw:0,1"
    }
  }
9.reboot
10.reboot 檢查是否成功:依舊無法自動選取Audiojack  

方式總結:

---/etc/asound.conf
 pcm.!difault{
   type plug
    slave{
     pcm"hw:0,1"
    }

 }




---/etc/pulse/default.pa
 #!/usr/bin/pulseaudio -nF
 #
 # This file is part of PulseAudio.
 #
 # PulseAudio is free software; you can redistribute it and/or modify it
 # under the terms of the GNU Lesser General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
 #
 # PulseAudio is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 # General Public License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
 # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

 # This startup script is used only if PulseAudio is started per-user
 # (i.e. not in system mode)

 .fail

 ### Automatically restore the volume of streams and devices
 load-module module-device-restore
 load-module module-stream-restore
 load-module module-card-restore

 ### Automatically augment property information from .desktop files
 ### stored in /usr/share/application
 load-module module-augment-properties

 ### Should be after module-*-restore but before module-*-detect
 load-module module-switch-on-port-available

 ### Use hot-plugged devices like Bluetooth or USB automatically (LP: #1702794)
 .ifexists module-switch-on-connect.so
 load-module module-switch-on-connect
 .endif

 ### Load audio drivers statically
 ### (it's probably better to not load these drivers manually, but instead
 ### use module-udev-detect -- see below -- for doing this automatically)
 #load-module module-alsa-sink
 #load-module module-alsa-source device=hw:1,0
 #load-module module-oss device="/dev/dsp" sink_name=output source_name=input
 #load-module module-oss-mmap device="/dev/dsp" sink_name=output source_name=input
 #load-module module-null-sink
 #load-module module-pipe-sink

 ### Automatically load driver modules depending on the hardware available
 .ifexists module-udev-detect.so
 load-module module-udev-detect
 .else
 ### Use the static hardware detection module (for systems that lack udev support)
 load-module module-detect
 .endif

 ### Automatically connect sink and source if JACK server is present
 .ifexists module-jackdbus-detect.so
 .nofail
 load-module module-jackdbus-detect channels=2
 .fail
 .endif

 ### Automatically load driver modules for Bluetooth hardware
 .ifexists module-bluetooth-policy.so
 load-module module-bluetooth-policy
 .endif

 .ifexists module-bluetooth-discover.so
 load-module module-bluetooth-discover
 .endif

 ### Load several protocols
 .ifexists module-esound-protocol-unix.so
 load-module module-esound-protocol-unix
 .endif
 load-module module-native-protocol-unix

 ### Network access (may be configured with paprefs, so leave this commented
 ### here if you plan to use paprefs)
 #load-module module-esound-protocol-tcp
 #load-module module-native-protocol-tcp
 #load-module module-zeroconf-publish

 ### Load the RTP receiver module (also configured via paprefs, see above)
 #load-module module-rtp-recv

 ### Load the RTP sender module (also configured via paprefs, see above)
 #load-module module-null-sink sink_name=rtp format=s16be channels=2 rate=44100 sink_properties="device.description='RTP Multicast Sink'"
 #load-module module-rtp-send source=rtp.monitor

 ### Load additional modules from GSettings. This can be configured with the paprefs tool.
 ### Please keep in mind that the modules configured by paprefs might conflict with manually
 ### loaded modules.
 .ifexists module-gsettings.so
 .nofail
 load-module module-gsettings
 .fail
 .endif


 ### Automatically restore the default sink/source when changed by the user
 ### during runtime
 ### NOTE: This should be loaded as early as possible so that subsequent modules
 ### that look up the default sink/source get the right value
 load-module module-default-device-restore

 ### Make sure we always have a sink around, even if it is a null sink.
 load-module module-always-sink

 ### Honour intended role device property
 load-module module-intended-roles

 ### Automatically suspend sinks/sources that become idle for too long
 load-module module-suspend-on-idle

 ### If autoexit on idle is enabled we want to make sure we only quit
 ### when no local session needs us anymore.
 .ifexists module-console-kit.so
 load-module module-console-kit
 .endif
 .ifexists module-systemd-login.so
 load-module module-systemd-login
 .endif

 ### Enable positioned event sounds
 load-module module-position-event-sounds

 ### Cork music/video streams when a phone stream is active
 load-module module-role-cork

 ### Block audio recording for snap confined packages unless they have
 ### the "pulseaudio" or "audio-record" interfaces plugged.
 .ifexists module-snap-policy.so
 load-module module-snap-policy
 .endif

 ### Modules to allow autoloading of filters (such as echo cancellation)
 ### on demand. module-filter-heuristics tries to determine what filters
 ### make sense, and module-filter-apply does the heavy-lifting of
 ### loading modules and rerouting streams.
 load-module module-filter-heuristics
 load-module module-filter-apply

 ### Make some devices default
 #set-default-sink output
 set-default-sink 2
 #set-default-source input


 load-module module-alsa-sink device="hw:0,0" sink_name=hdmi_out sink_properties="device.description='HDMI Out' device.icon_name='video-display'"
 load-module module-alsa-sink device="hw:0,1" sink_name=line_out sink_properties="device.description='Audio Jack' device.icon_name='audio-headphones'"
 load-module module-alsa-sink device="hw:0,2" sink_name=spdif_out sink_properties="device.description='SPDIF Out' device.icon_name='audio-speakers'"


---/etc/pulse/client.conf
 # This file is part of PulseAudio.
 #
 # PulseAudio is free software; you can redistribute it and/or modify
 # it under the terms of the GNU Lesser General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
 # (at your option) any later version.
 #
 # PulseAudio is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 # General Public License for more details.
 #
 # You should have received a copy of the GNU Lesser General Public License
 # along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.

 ## Configuration file for PulseAudio clients. See pulse-client.conf(5) for
 ## more information. Default values are commented out.  Use either ; or # for
 ## commenting.

 ; default-sink = line_out
 ; default-source =
 ; default-server =
 ; default-dbus-server =

 ; autospawn = yes
 ; daemon-binary = /usr/bin/pulseaudio
 ; extra-arguments = --log-target=syslog

 ; cookie-file =

 ; enable-shm = yes
 ; shm-size-bytes = 0 # setting this 0 will use the system-default, usually 64 MiB

 ; auto-connect-localhost = no
 ; auto-connect-display = no

Return to Top