2018年8月24日 星期五

Ros韌體停在5.x版請更新韌體

採用ROS的朋友,若韌體停在5.x版
最好更新一下
有學校被攻擊 還被偷開最高帳號
自己檢查一下 system > users 有無新增其他帳號
若有刪掉其他帳號 admin要換一下密碼
另外 system > script 要檢查有無被值入程序


ROS6.40版後的DHCP服務




2018年8月23日 星期四

虛擬機ova檔匯入proxmox

將ova檔傳到伺服器

解開ova檔

tar -xvf  xxx.ova



轉檔

qemu-img convert -f vmdk ros-disk1.vmdk -O qcow2 ros.qcow2

2018年8月1日 星期三

pppoe撥接一台電腦只允許一個連入



PPPoE(point to point protocal over Ethernet)
乙太網上的對等協定,是將對等協定(PPP)封裝在乙太網(Ethernet)框架中的一種網路隧道協定。

ppp
常用在兩節點間建立直接的連線,並可以提供連線認證、傳輸加密以及壓縮。

由於協定中整合PPP協定,所以實現出傳統乙太網不能提供的身分驗證、加密以及壓縮等功能,也可用於纜線數據機(cable modem)和數位用戶線路路(DSL)等以乙太網協定向用戶提供接入服務的協定體系。

本質上,它是一個允許在乙太網 廣播域中的兩個乙太網介面間建立對等隧道的協定。

PPPoE不使用ARP協議,不會產生ARP資訊,可以杜絕ARP攻擊。

位址解析協定 (ARP) 是通過解析網路層位址來找尋資料鏈路層位址的一個在網路協定包中極其重要的網路傳輸協定。
ARP是通過網路位址(例:IPv4)來定位MAC位址 (也稱為乙太位址)。 ARP已經在很多網路層和資料連結層之間得以實現。



PPPoE不會改變原來的局域網拓撲結構,可減輕網管人員工作量。



2018年5月19日 星期六

a01--RouterOs內部架站的轉址設定




有些時候,我們喜歡利用虛擬IP架設網站,但又想要外面也可以訪問得到這台伺服器。
這時,就需要利用Nat轉址。Ros內建轉址功能。
範例:
對外公開的網址 163.23.55.66
內部真正的伺服器網址192.168.2.156





2018年5月17日 星期四

RouterOs啟用代理伺服器proxy---方便管理電腦教室

電腦教室的網路管理是資訊組龐大的業務之一
如果您有使用RouterOs,建議可以啟用代理
伺服器proxy---方便管理電腦教室
以下介紹簡單啟用步驟





設定網頁瀏覽規則
範例:國內教育性質的網站,都允許  *.edu.tw
Ros的代理伺服器規則,最大好處是host名稱,接受*萬用字元
*意思是全部



放置一些允許的規則後
最後面加一條 全部禁止的規則
這樣,只有教師允許的優良網站,學生才能瀏覽

往後要新增允許的網站,就放在這一條前面即可


教師機不用受管制
所以上面新增一條,教師機完全通過的規則


2018年5月16日 星期三

新版Rb450g與Rb850x2沒有master port

網卡master port 

以前只要勾選此項目,就能串連不同port
例如 你port2 和port3要串連起來,讓他們互通
你可以在port3勾選port2的網卡即可



新版Rb450g與Rb850x2沒有master port 了(我找不到)
你得透過橋接的方式



將要串接的port都放入同一個 Bridge


2018年5月14日 星期一

Microbit control html5 game :Flying sailfish ---3


□open html5 game
As we extract the flying sailfish game. (windows system)
In
C:\testgame2 folder , you can find index.html file.


mouse right click index.html,then select Firefox or Microsoft Edge browser to open it.

When the menu start, it counts 5 seconds, then auto log in the main game.

□How to play
Just shake the Microbit , and you will fire a sailfish

When sailfish collide with bubble, you get three scores.On the contrary,if sailfish collide with jellyfish, you lose one score.

Here is the example movie.


□More
You can 
replace the images in the game.That's interesting.
The images folder is in C:\testgame2\images
The sounds folder is in C:\testgame2\media



Joy !

Any feedback ,pls mail hnps@hnps.chc.edu.tw

yauger

thank you !


Microbit control html5 game :Flying sailfish ---2


□download and install   mbedWinSerial_16466
We need mbed driver to let the Microbit show as a Serial port in pc.So we download the  mbedWinSerial_16466 and install it.
http://developer.mbed.org/media/downloads/drivers/mbedWinSerial_16466.exe





□The code for microbit   Go to the  official python site 
http://python.microbit.org/v/1

Key the example code:
---------------------------------------------------
from microbit import *  

while True:  
    if accelerometer.was_gesture('shake'):
        print('a')
    sleep(10)
------------------------------------------------------------------------------------

We send a word by using the Micro:Bit accelerometer to detect a "shake" .

After writing the code,you must press the  Download image to download the code.

You can download this code here.


 □plug your microbit  and import the code







Take notice:
The usb label is MICROBIT
 □Check your microbit is which serial port
Open the pc  control center , in device manager,find  COM and LTP item.Remember  your device port (for example,my port is COM3).
Take notice:You must plug the microbit in pc  usb port.  

And remember your device baud  rate.







□Download the   Flying sailfish html5 game
Click this link Flying sailfish

It is a Self-extracting file.If you duble click it.The game will extract  to C:\testgame2





□open python  programing tool
We chose IDLE(Python GUI) and open the   file   get.py  in   c:\testgame2






Take notice:
You must  modify the port and baud with your device data.
□Run get.py code

Shake  Microbit  and  see   if   pc   get  the data

When you shake Microbit and see Got:a,
it means ...........  you success.


Next , we will shake   Microbit  to control the game-Flying sailfish 



Microbit control html5 game :Flying sailfish ---1


shake microbit to control game game rule By shaking microbit , the sailfish will fly straight  ahead.
If sailfish collide with bubble, you get three scores.
On the contrary , if sailfish collide with jellyfish, you lose one score.
One game,you have 180 seconds to get scores ,if there is no time the hero ranks will appear .   



download and install python27
This course,yauger will install python27 in windows for example
First, let we download python27
https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi

If the link disappear, you can search it in the internet.

Install   python27





take notice

add python.exe to path








download and install Pyserial

PySerial is a library which provides support for serial connections  over a variety of different devices.
We use it to  connect microbit and personal computer.

Microbit send any data , personal computer can get the data by  PySerial.

You can download it in this site
https://zh-tw.osdn.net/projects/sfnet_pyserial/downloads/pyserial/2.7/pyserial-2.7.win32.exe/

Take noticce:
I install pyserial-2.7.win32.exe. Pyserial has newer vesion, but this example,i use 2.7win32 version.

If the link disappear, you can search it in the internet.







2018年5月6日 星期日

泡泡高手1使用microbit控制遊戲

泡泡高手1
使用microbit控制遊戲

1.按一下按鈕A,遊戲主角就會一直吹泡泡,不必一直按。
2.
按一下按鈕B就能停止吹泡泡。
遊戲規則:泡泡碰到笑臉就加分,碰到哭臉扣分。每局遊戲3分鐘,時間到會自動判斷分數有無進入前10名。


安裝使用說明


範例影片



遊戲檔案下載







2018年3月4日 星期日

google新版協作平台與google suite基本服務


講義下載

在winXP系統安裝scratch2

scratch是中小學最夯的程式設計軟體,讓學生利用拖拉積木方式,學會
程式的概念。
舊的winXP系統比較輕巧,但現在有許多應用程式都無法安裝了。

阿堯老師,在winXP系統上面可以正常安裝scratch1.4版,但是scratch2以後的
版本就無法安裝了,安裝成功後,只要一打開scratch2主程式,螢幕就藍屏。
然後,自動重新開機。嘗試了非常多的方法都失敗,最後找出一種解決之道。

在此分享出來:

1.在網路上下載scratch2免安裝版(或叫 離線版)2.在win7(含以後版本,例如win10)環境安裝scratch2
建立一個空白sb2文件,複製到隨身碟
3.在winXP電腦安裝adobe air
4.將scratch2免安裝版解開到winXP電腦(例如c :\scratch2目錄)
5.將隨身碟的空白sb2文件複製到winXP電腦
6.以後在winXP電腦不要直接開啟scratch2主程式,而是開啟此
sb2空白文件,如此scratch2就能正常使用,不會當機。


注意:

1.不能更新 adobe air 否則 scratch2會無法執行
2.winXP不想出現 adobe air 更新提示
到以下的路徑刪除或改名先到C:\Program Files\Common Files\Adobe
然後ARM\1.0 (版本會不同)
找尋AdobeUpdater.exe 接著刪除或改檔名
3.控制台、系統與安全性、選flash player、
 點選「進階」、 選擇永遠不檢查更新

2018年2月1日 星期四

carbon函式庫


carbon函式庫,非常好用的函式庫,直接可以時間比較,不用做一堆換算


require 'Carbon.php';
use Carbon\Carbon;

$day1 = Carbon::create(2018, 2, 2, 13);

$isnow = Carbon::now( 'Asia/Taipei' )->format('Y-m-d H');

if ( $isnow >$day1) {
echo "超過時間";
}
else
{
echo "沒超過時間";
}