Presentation is loading. Please wait.

Presentation is loading. Please wait.

CCN CCN Central Control Network Final presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex.

Similar presentations


Presentation on theme: "CCN CCN Central Control Network Final presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex."— Presentation transcript:

1 CCN CCN Central Control Network Final presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex

2 CCN CCN - motivation Many systems around the world use central computer for security devices (such as entrance and security cameras). Most of the devices are low resource requires and so many could be connected to one computer. We would like to take advantage of the USB port speed and availability, and implement multiple area network (a separate bus for each area) connected to it.

3 3 CCN - functional Devices Data base Internet Users

4 CCN CCN – block diagram view CAN to USB & Can Master אלמנט תקשורת ושליטה USB HUB תור FIFO עם זכרון CAN BUS Nice for a future project Next Generation Internet

5 CCN CCN – main idea Each device uses bus interface to connect a CAN bus. Each level/area have it’s own bus. All buses controlled by a master device, which also convert the CAN protocol into USB protocol. All the Can Masters outputs (USB) are connected to a USB Hub (which is power supplied, so the net will keep working when communication to the computer N/A). The hub connected to a memory unit for keeping the data in a FIFO line if the computer is down.

6 6 CCN – main idea (cont) The data from the devices is inserted to a Database on the computer side. The users connect to the computer and login. Each user have links to is devices. The user can look on the data received from his device and configure them, according to his permissions. As a conclusion : The project is a very interconnected with other devices, both networked (CAN/TCP/USB) and both functionality (door opener/cameras and etc.)

7 7 CCN - Interfaces There are 3 main interfaces on this project: 1) devices interface with the network bus using CAN protocol (ISO/IS 11898-2 ) 2) buses interface with the PC using USB protocol. 3) users interface with the PC and data using TCP/IP protocol.

8 8 CNN – spec Since CAN bus can support 1024 devices, and it’s throughput is 125MB/sec. And Since USB 1.1 (slow) can support 12MB/sec. And Since there is no limit to hub usage. We could support up to about 100 full buses (or more if it’s not full). TCP/IP rates are network based (since each user could be connected in a different speed).

9 9 CCN - Software התוכנה הבסיסית כוללת 2 תהליכונים: אחד הוא הראשי והמאתחל, השני הוא המאזין על ה USB. האפליקציה מממשת מודל 3 שכבות : Can (physical), CanOpen, Application. כל אחד מוגדר כפרוייקט בפני עצמו לסביבת פיתוח, וניתן לשנות כל שכבה בנפרד. עבור כל הודעה שמתקבלת נפתח תהליכון חדש, לטיפול בהודעה הזו. אותו תהליך בודק את המידע שהתקבל ומבצע את הפעולות שהוגדרו עבור קבלת המידע ע"י אותו רכיב (ע"י קריאה ממסד הנתונים). בנוסף קיים תהליך Web (של השרת עצמו) אשר פועל בהתאם להגדרות WWW, כך שכל בקשה לשרת פותחת תהליך מטפל.

10 10 CCN – Devices 1.Input : CAN packet p (this will be done one thread for 1 packet) 2.IF p.data.cont then 3. Act recording to the data(add/remove). 4.ELSE 5. db.(p.dev).data(time) = p.data 6. if(irreg(db.(p.dev))) do db.(p.dev).irlist 7. else if(ok(db.(p.dev))) do db.(p.dev).oklist 8. else do db.(p.dev).failist 9.End if 10.return

11 11 CCN – Devices database Database for device contains the following data for each: 1.device name 2.Device type 3.configures (i.e. good time, legal users list) 4.list of devices for irregularities. 5.list of devices for legal operations 6.list of devices for illegal operations. 7.What data is considered good.

12 12 CCN – log Database Each line at the log has: Device ID Device name Time Irregularly flag OK flag

13 13 CCN – Users login 1.Check if user in the DB 2.Make MD5 on his password (with salt) 3.Compare to the MD5 password on the DB 4.If correct : 1.If root show root main page 2.Else show normal main page 5.Else place a message “Incorrect username/Password” on the screen.

14 14 CCN – implementation notes The computer OS: windows 2000 I’m using C# and ASP.NET to implement the software, and Microsoft SQL Server for the database. I use the SQL server to also log the operation made by the users for the administration side. NOTE : there is special user “root” which has a different kind of page, and can control all users and devices. He is the manager of the system.

15 15 CCN – course of development First I had to verify that the master device works properly. It took some time to understand it’s demo program. Then developing the software on C# was needed, and this was problematic. Connected the bus with the SQL. Wrote a program for simulating 2 clients on the bus. Connected a PIC device to the bus and check working with it. Developing CANopen layer for the program. This is done with Konstantin. Add a web page for the users.

16 16 CCN – Test Spec The project was checked using a know working devices. One CAN bus was used. 2 devicesIt had 2 devices connected to the bus. Data was received and translated correctly. The data received from the package, is causing a correct data fetch for the device who sent it, and followed by a correct sequence (O.K / Fail / Irregularity)

17 17 CCN – Software checks I’ve checked my software as follow: 1)Devices work : checked that I get the messages on the bus from a debugger connected to the bus. 2)Database insertion work: checked that when a device message receive, it’s inserted to the right place on the database. 3)Data decision work : checking correct time, check if the data correct. I’ve checked 2 different devices, with all the possibility groups (OK / Fail / Irregularity)

18 18 CCN – Software checks (cont.) 4) Check CANopen protocol correctness using PIC device 5) Checked Web server : logins, adding types/devices/users/groups. Assigning new devices to group, removing users, devices, changing data...

19 19 מה למדתי ראשית למדתי להשתמש ב C# ובסביבת פיתוח.Net למדתי להמיר קוד משפת C++ לשפת C#. למדתי כיצד עובד קישור ספריה דינמית עבור פונקציות להעתקת classes או זיכרון. למדתי כיצד לכתוב שאילתות ב SQL, כיצד להגדיר ולשנות הגדרות של טבלה. למדתי ליישם את החומר הנלמד לגבי transactions ו concurrency. השתמשתי בחומר התאורטי לצורך יישום וחשיבה על פרוטוקול התקשורת על ה bus (פרוטוקול דמוי PCI לעומת פרוטוקול CANopen וכו).


Download ppt "CCN CCN Central Control Network Final presentation Winter & Spring 2002/03 Student : Kormas Tal Guide : Gerber Alex."

Similar presentations


Ads by Google