Thursday, January 17, 2008

Loose Ends

Went back to my php/mysql code today and fixed up a few more problems I was having. So at this stage with the website you can pick which object you lost and it will tell you when you last had it and what items you did have at that time. So far I've just been testing with three items but I can add more easily and it will work the same.

I've started trying to make the hardware more compact and i've managed to fit the circuit inside the gumstix box. Barely! Lorcan mentioned a possible problem with heat coming from the circuits voltage regulator. I checked the gumstix specs and its good in temperatures between 0 and 85 degrees so it will be fine. I've posted a pic of where its at now.

I must bring everyones attention to a cool little windows program im loving at the moment its called tortoiseSVN and it lets you do all your svn updates and checkouts just by right clicking. Well handy!

I think im pretty much done with my demo for the moment so for the rest of the week Im going to do some of my report and continue editing the wiki.







Wednesday, January 16, 2008

More Web stuff

Im officially hating php/mysql at the moment. I spent today working on my website. I have a new section where you select what item you have lost then it will tell you when you last had it. This is grand but i also want it to show what other items you had at this time. It doesnt make sense just comparing by datestamp cos this will compare it exactly by second, so im using a select query which will find items which have the same hour and minute as the lost item. The problem comes with setting the hour and minute as being the same as those in the data entry corresponding to the lost item. Confused? Thats ok my brain is mush so im stopping for the day.
Also started my wiki editing which I'll be working on over the week. Heres the link for those interested https://trac.ucd.ie/wiki/GumstixRFID

Update: I've managed to fix this problem. It was annoying me so much I had to go back and work on it. I realised I could just take the timestamp field gotten from the query which returns the last occurance of lost item, and set it as a variable. Then I could just take characters at certain points in the string and set these as new variables corresponding to hour and minute. I can pass these into the query which selects other objects that the user had at this time. The timestamp is always in the same format so its ok to explicitly state what characters are taken from the string. Probably not the most elegant code but hey it works

Tuesday, January 15, 2008

Webpage

Fixed an annoying problem I was having with mysql today. I now have my php pages setup so that when a tag is read it will check what item the id corresponds to and store that item with the tag id and date/time stamp. I have a basic web page setup, its still very rough, which just shows what you had and at what time. I'll have to add a bit of functionality to it. Instead of just viewing all data it will probably be better to select the item your looking for first. I dont think its necessary to store tag reads continuously so I'll see if i can just have it per minute or something.








Monday, January 14, 2008

Meeting

Just back from todays project meeting. I met with Lorcan and Graeme and gave them a quick demo of the protype so far. We also talked about what I could do next for the discretionary and exceptional project components. This is something I will need to think bout this week. Graeme suggested using two readers in some way. Hmmm. Perhaps a system which has a mobile part and a stationary part. I reader built into a bag or jacket then like a "safe" box left at home. When an item is not at home or in your pocket then it could notify the user that you may have lost something through the lcd screen and maybe with a beep or something? If they have lost something they can log into the website and get some cues. I like this overall idea. I'll give it more thought during the week.

For the rest of this week I will do the following:
  • Finish the webpage that will give the user their cues.
  • Spend some time on my report
  • Get the wiki sorted

Thursday, January 10, 2008

Nearly There!

Lorcan sent me his lecture notes on php so I read these today. They were really helpful and
i now understand completely what is going on with the gumstix code. So armed with this knowledge i've managed to fix it up so that when it reads a tag its sending the id to my database correctly. This code will work perfectly for my demo and i can go back to it at a later date to replace or edit it as needed.

Spent some more time today with mysql, just doing some test queries and really just testing the whole system in general. My next goal will be to create a webpage that offers some basic user functionality and human readable ques generated from whats in the database.

Wednesday, January 9, 2008

Code ugh...

Ok im taking a break from coding to report on my progress. Had another blonde moment today when it turned out hyperterminal is already installed on lab computers. Ooops apologies all round. I spent some time today with mysql and php so i did some editing on my test page, test.php, so it now both inserts into the database and then prints it on screen.

Also started looking at the code for sending the tag reads to my database. Was a bit lost at first but Lorcan explained what was happening and I think im with it now. I've got some of this set up properly I think. The python script runs automatically on the gumstix booting up. When i place a tag next to the reader it runs the test.php page which causes the database insert. Only problem is im not getting the tag ids so im guessing i need to look into get commands. Anyway better get back to it.

Tuesday, January 8, 2008

More fun with networking

Ok so got the gumstix configured properly today to connect to the router with the correct settings and all. Was'nt too hard but i had trouble finding out what the gumstix mac address was, so i could check it was connecting ok. There is nothing on the net about it, however it turns out that its actually written on the gumstix itself quite clearly. Duh. Anyway blonde moments aside the gumstix automatically connects to the router on booting up.

Ok so I've two main things left to do:
  • Get some code going that will send the tag reads to my database properly
  • A web site with some basic human readable ques.

Im hoping to have these both finished by the end of this week.

Saturday, January 5, 2008

Router Fun

Ok was in work all day so only got a little project stuff done this evening. Spent some time looking into setting up the router. Im fairly sure I know what im at now. I gave my laptop a static IP address then configured the router to enable portforwarding to this address. By connecting to the router it should be possible to access the server by typing the IP address into a browser address bar. I'll borrow a second laptop tomorrow and see if it works.

Friday, January 4, 2008

Quick Update

Ok so went back to the circuit this morning because it was wrecking my head and did a new one that works perfectly first time. Cant figure out what was wrong with the other one but who cares it works now. This bout all I'll get done today because im off to work in a while. :-(

Thursday, January 3, 2008

Day 2

Well didnt get as much work as I'd like done today, was a little busy. With some help from Lorcan and after several very minor burns and shocks I have my circuit done again. It definately has power connected ok with lights and such but I will need to test it using kermit to ensure its transmitting tag reads. I tried using a windows version as my laptop doesnt have a serial connection but im not sure how reliable it is and i didnt seem to be getting any results. Hope its just kermit and not the circuit :-( So will wait till comp. sci is open again on monday and use one of their Linux machines. In the meantime I want to get my router sorted. I have it reset and connected to my laptop so I just need to figure out how to configure it for what i want it to do.

Wednesday, January 2, 2008

Back to work!!

Ok so I started working on my project again today. I got my server fixed up after there was a problem with php. I also installed phpMyAdmin which is handy for the database stuff. I had a problem with setting this up aswell but it turned out i needed to edit a config. file to use a mysql user account. So both these problems are sorted and I have the database and server setup with a php page. I put some sample data in the database and have the php page displaying this data just to test its all working together ok. Also took a look over my circuit again. I had thought it was working perfectly but im not so sure now so im going to redo it just to be certain. What I'd like to get done next is setting up the router with my laptop. This is the one thing that I dont understand completely and how its supposed to fit in to everything??? So its gonna be fun. Wish me luck!!!