利用raspberrypi安裝EINVTurnkey會遇到的問題排除

在Raspberry pi 安裝Linux版的 EINVTurnkey電子發票整合服務平台時會遇幾個問題

*不支援64bit SWT library

Exception in thread "main" java.lang.UnsatisfiedLinkError: Cannot load 64-bit SWT libraries on 32-bit JVM
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at com.tradevan.gateway.client.view.EnvironmentSetting.main(EnvironmentSetting.java:125)

這部份基本上沒解決,所以改跑 32元位版本來解決這個問題

*在32bit時找不到SWT library位置

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: 
	no swt-gtk-3738 in java.library.path
	no swt-gtk in java.library.path
	/home/pi/.swt/lib/linux/arm/libswt-gtk-3738.so: /home/pi/.swt/lib/linux/arm/libswt-gtk-3738.so: 無法開啟共用目的檔: 沒有此一檔案或目錄 (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
	Can't load library: /home/pi/.swt/lib/linux/arm/libswt-gtk.so

	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.Library.loadLibrary(Unknown Source)
	at org.eclipse.swt.internal.C.<clinit>(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.internal.Converter.wcsToMbcs(Unknown Source)
	at org.eclipse.swt.widgets.Display.<clinit>(Unknown Source)
	at com.tradevan.gateway.client.view.EnvironmentSetting.main(EnvironmentSetting.java:125)
Read More

RaspberryPi -使用Web控制LED亮燈與否

之前有提過RaspberryPi -串聯二個74HC595範例,範例執行時需要執行Java Application,這可以拿來當做shell指令,不過如果想遠端控制呢?

想法是利用Raspberry pi架設wifi ap,或是把pi接入區域網路,再連入tomcat server執行指令。

JSP control GPIO

PI在安裝完tomcat後,因為要使用GOIP,所以得把tomcat執行的權限及群組設成root。

可以參考Controlling the Raspberry Pi’s GPIO pins from a web browser

Read More