#avr | Logs for 2012-12-16

Back
[00:00:21] <Casper> something that I find really sad is that there is nothing on the obdII bus to tell "this is a remote starter initiated start, please let the car start, but not move"
[00:01:05] <Casper> what you actually have to do is take your 150$ key, cut it, put it in a box, that connect to the remote starter and loop around the ignition key to transmit the code
[00:02:42] <eadthem> u want moddable dont work on a cars electronics :p
[00:03:00] <eadthem> i have a 2004 grand marquee
[00:03:15] <eadthem> the 2003 i can add a line in to the cd/tape player
[00:03:34] <eadthem> the 2005 i can add a line in to the cd/tape player and it will natively do MP3 if you have a 2006
[00:04:24] <eadthem> the 2004 will not support line in will not do MP3 and is diffrent than any of the others because it dose something funky with the main car computer and ....
[00:04:54] <Casper> have you ever converted an a/c compressor into an air compressor?
[00:05:19] <eadthem> i could replace it with a aftermarket unit but i would loose some of the stuff it handles
[00:05:28] <eadthem> i bet it would work if you had a oil drip
[00:06:03] <Casper> I'm wondering about the oil itself...
[00:06:10] <Casper> what if you put too much
[00:06:16] <Casper> or the wrong type
[00:06:31] <eadthem> if its a newer compressor oil type will be easer
[00:06:36] <eadthem> probably just a mineral oil
[00:06:51] <Casper> it's an old one
[00:07:00] <Casper> but mineral oil is one that is listed
[00:07:49] <eadthem> if the oil is safe to inahle in small quantatys
[00:07:59] <eadthem> ie not carinogenic or toxic or ...
[00:08:01] <eadthem> id just use it
[00:08:16] <Casper> I'm worried about putting too much in
[00:08:34] <eadthem> in reality 99.99% of it will collect in the tank or intercooler you shuld have on the output
[00:08:48] <Casper> it's a 2 tank one
[00:08:55] <Casper> the compressor feed into the lower one
[00:09:00] <Casper> the output is on the top one
[00:09:14] <eadthem> id recommend a decent intercooler and a small stainless tank for water anyway then connect to the big tank, blead both regualrly and you can seperate off the oil and recycle it back true
[00:09:20] <eadthem> hwo big is the piston volume
[00:09:33] <Casper> no idea
[00:09:42] <Casper> it's a 6000btu compressor for R22
[00:10:00] <Casper> I'm a bit deceived on the air flow, but it will do the job
[00:10:12] <eadthem> id say a 2 drip a second would be desireable
[00:10:25] <eadthem> maby 1 drip a second
[00:10:30] <Casper> it do not output "any" oil
[00:10:58] <eadthem> dont drip right in to intake drip to the side of a tube feeding the intake that way it sorta forms a slow trickle in
[00:11:18] <Casper> what would happen if you overfill the oil?
[00:11:21] <eadthem> if you drip in the middle of the intake the whoel drop may be sucked in 1 single cycle shuldnt hurt but probably wont be as effective
[00:11:54] <eadthem> my understanding is that there are several ounces of oil that free flow thrue the system during normal use
[00:12:17] <Casper> that is what I also hear
[00:12:26] <eadthem> iirc myn is like 26 ounces of coolent and 9 ounces of oil
[00:12:32] <Casper> but I let the compressor run for a few minute, and not a single drop came out
[00:12:54] <eadthem> the lack of comperssion might of prevented it
[00:14:53] <Casper> is mineral oil foaming?
[00:17:36] <eadthem> now that i dont know
[00:18:09] * eadthem says a prayer and then puts the odd pages in the front feeder and hits print on the even pages
[00:18:13] <eadthem> in reverse order
[00:18:42] <eadthem> http://www.refrigeration-engineer.com/
[00:18:44] <eadthem> you need this site
[00:20:00] <eadthem> page 110 and 109 same page diffrent sides sugsess
[01:06:57] * eadthem now has the first 110 pages of the tiny25/45/85 datasheet
[09:49:41] <amee2woof> 16:36 < canthus13> amee2woof: You might find this interesting... http://www.reddit.com/r/WTF/comments/14xrqm/if_you_run_the_song_equation_by_aphex_twin/
[11:42:17] <nataly> hi
[12:28:11] <slidercrank> dammit. I ran across of a problem when I try to read an array but I get only zeroes.
[12:31:06] <slidercrank> http://www.fpaste.org/QOyw/ could you have a look at this sample code?
[12:31:23] <slidercrank> It looks like I have to play with the PROGMEM directive.
[12:34:11] <eadthem> what is the proto for lcd_send_cmd
[12:35:15] <slidercrank> void lcd_init();
[12:35:23] <eadthem> no
[12:35:30] <slidercrank> void lcd_send_cmd(unsigned char cmd);
[12:35:52] <eadthem> try makeing your arry an unsigned char
[12:36:11] <eadthem> not sure why it dosent work
[12:36:23] <slidercrank> unsigned char init_data[]={ ....
[12:36:25] <slidercrank> it's unsigned
[12:36:36] <eadthem> char a[]={1,2,3};
[12:36:47] <slidercrank> that was an example code. To make things clear
[12:37:01] <eadthem> paste the non example code
[12:37:16] <eadthem> you may of added more bugs to the example or fixed the bug in the transposition
[12:38:45] <slidercrank> http://www.fpaste.org/pqOM/
[12:39:55] <slidercrank> it once stopped working. when? hard to say. when I flashed my avr the code that used to work, stopped working. And the LCD would not turn on. So now this behaviour is in every function where I use arrays. Maybe it has something to do with the code size
[12:40:04] <eadthem> hang on reformatting so its readable
[12:41:28] <slidercrank> dammit. bad paste. don't reformat.
[12:41:38] <slidercrank> eadthem, I'll better send the source files
[12:41:42] <eadthem> k
[12:41:52] <eadthem> do you have a server or do you need to post
[12:45:17] <slidercrank> eadthem, I'll post it somewhere. is tar.gz ok? or zip?
[12:46:53] <slidercrank> http://rghost.net/42295144 here
[12:47:27] <slidercrank> the function lcd_init is in lcd.c.
[12:53:08] <slidercrank> eadthem, could you have a look? reuploaded here: http://rghost.net/42295316
[12:55:35] <eadthem> count is not efficant code
[12:55:46] <eadthem> it might stop at the first 0 byte
[12:55:55] <eadthem> as well as has to count thrue every element
[12:57:08] <slidercrank> why? it always worked me.
[12:57:41] <slidercrank> it calculates size of an array irrespective of its type (int, char, double and so on)
[12:57:51] <eadthem> count implys its counting and implys it must stop at a 0 byte ie null termination
[12:58:02] <eadthem> sizeof is compile time and will get the literal size of
[12:58:09] <eadthem> irrgardless of contents
[12:58:24] <slidercrank> it gives number of elements
[12:58:29] <slidercrank> not its size in bytes
[12:59:10] <slidercrank> and the problem is somewhere else. The code does read all the elements. It's just that they all are zeroes
[13:00:09] <eadthem> and if you force send a non zero byte to lcd_send_cmd right after or before the for loop ?
[13:00:59] <slidercrank> if I hardcode sending any byte directly (lcd_send_com(any byte) it will work! at any place of the code
[13:01:16] <slidercrank> but lcd_send_com(array[index]) fails
[13:01:23] <slidercrank> a zero byte is read
[13:02:02] <slidercrank> I think it has something to do with memory allocation
[13:02:15] <eadthem> are you using any new or malloc
[13:02:34] <slidercrank> I googled about this problem and found references to PROGMEM. That I should specify directly where and how to store memory content
[13:02:43] <slidercrank> no, I don't use new or malloc
[13:02:59] <eadthem> you can change the type to const static unsigned character
[13:03:08] <eadthem> that might resolve a memory issue
[13:03:13] <slidercrank> it won't work according to what I've read
[13:03:32] <eadthem> i think you need to be more willing to guess and check
[13:03:49] <slidercrank> Using the "const" modifier on your string variables is a natural solution - but a wrong one. A "const" variable can only not be modified by the program code, but it does not explicitly prevent the variable value from being copied out to the AVRs RAM on startup. Some compilers implicitly do this for you, but GCC needs to be explicitly told that the contents must live in program memory for the entire duration of the program's execution.
[13:03:57] <eadthem> wht device?
[13:04:01] <slidercrank> atmega8
[13:05:03] <eadthem> i know on the varables i have set to const static character strings included the asm showed them being read from program memory
[13:05:04] <slidercrank> so I think the problem is that avr-gcc put my array to flash (not copied to ram). and therefore I read zero bytes
[13:05:46] <slidercrank> well, I'll try to specify them at static const. let's see
[13:06:01] <eadthem> starting as6
[13:07:28] <eadthem> mega8 mega8a mega8u2 ?
[13:07:56] <slidercrank> atmega8a-pu
[13:08:11] <slidercrank> adding static const didn't change anything
[13:10:22] <eadthem> missmatched brace error for loop
[13:10:40] <eadthem> brace is closed but never opend
[13:11:01] <eadthem> found by avr studio
[13:11:43] <eadthem> executing
[13:12:10] <eadthem> VS shows data in init_data in the for loop
[13:12:50] <slidercrank> yes, I deleted debugging stuff before posting
[13:13:10] <slidercrank> that } must be deleted
[13:14:17] <eadthem> its working in my simuator
[13:14:25] <slidercrank> it works in a simulator only :(
[13:14:46] <slidercrank> eadthem, I added a check. If a zero byte is read from the array, I blink with a led. so it blinks a lot
[13:15:14] <slidercrank> all bytes are zero in the array. When run on the actual hardware
[13:15:15] <eadthem> so it simulates ok but fails on device ?
[13:15:51] <slidercrank> I didn't try the simulator. But you say it works there. I tried on a real hardware
[13:16:20] <eadthem> http://final.servegame.com/clock.hex
[13:16:25] <eadthem> load that in your chip
[13:17:33] <eadthem> the .elf is posted as well same place same root name
[13:17:39] <eadthem> incase you had eeprom data
[13:17:40] <slidercrank> works
[13:17:44] <eadthem> that works
[13:17:52] <eadthem> ?
[13:18:01] <slidercrank> looks so
[13:21:07] <slidercrank> I'll run a simulator on my computer to see what's happening
[13:21:45] <eadthem> http://final.servegame.com/test.hex
[13:21:48] <eadthem> load that
[13:21:59] <eadthem> if that dosent work then i found the problem
[13:22:05] <eadthem> if it dose then dont know
[13:22:50] <slidercrank> nothing changed
[13:23:01] <eadthem> ok first was compiled as a c++ project
[13:23:07] <eadthem> g++ was invoked at the very end
[13:23:19] <eadthem> test was done as a c project and g++ was never invoked
[13:23:58] <eadthem> i also fixed your tabbing on the orignal build
[13:24:05] <slidercrank> eadthem, could you make two hex files. one with vertical screen flip and one without it? To make sure the changes in the array really work.
[13:24:06] <slidercrank> / 0xC0, // normal mode (POR) Scan from COM 0 to COM [N –1]
[13:24:06] <slidercrank> 0xC8, // X3=1: remapped mode. Scan from COM [N-1] to COM 0
[13:24:23] <slidercrank> 0xC0 disables flip. 0xC8 enables it
[13:24:32] <slidercrank> one of them should be commented
[13:25:10] <slidercrank> my tab step is 4 spaces
[13:25:14] <eadthem> by fixing tabbing i mean converted it to allman style
[13:25:35] <eadthem> you had braces at the ends of lines thats well makes me want to shoot someone :p
[13:26:05] <RikusW> http://www.bunniestudios.com/blog/?p=2686
[13:26:08] <RikusW> open laptop
[13:26:18] <OndraSter_> yay
[13:26:20] <slidercrank> eadthem, tastes differ. there are lots of coding styles
[13:26:22] <eadthem> 0xc8 is uncommented
[13:26:22] <OndraSter_> I found EPROMs from ST and Microchip
[13:26:25] <OndraSter_> from '88
[13:26:27] <eadthem> was alredy
[13:26:47] <slidercrank> eadthem, so can you make another build with 0xC8 commented and C0 uncommented?
[13:27:53] <lidenbrock> how hard it is to interface avr microcontrollers with android devices/
[13:28:33] <eadthem> http://final.servegame.com/public/clock
[13:28:52] <eadthem> slidercrank thats autosyncronised grab your hex files as you need
[13:29:13] <eadthem> one sec
[13:29:58] <eadthem> slidercrank there ya go you want /PROJECTNAME/debug/PROJECTNAME.hex
[13:30:00] <eadthem> both are built
[13:31:17] <eadthem> btw slidercrank what kind of lcd is this?
[13:31:20] <eadthem> color graphic?
[13:31:51] * OndraSter_ found '85 EPROM with copyright of '79... but made in 33th week in 85
[13:33:08] <eadthem> not that suprising
[13:33:14] <eadthem> probably took them taht long to bring it to market
[13:33:18] <slidercrank> eadthem, so your two different clock.hex's work! the screen is flipped! It means your build reads non-zero values
[13:33:33] <eadthem> well all the files are posted
[13:33:39] <slidercrank> eadthem, http://i.pixs.ru/storage/0/8/3/2012121512_9279880_6570083.jpg this is my screen
[13:33:55] <slidercrank> it's a yellow OLED display
[13:34:15] <slidercrank> monochrome. colour mode exists but it's limited. So nobody uses it
[13:34:28] <eadthem> avr toolchain 8 bit 3.4.1.830 gcc 4.6.2 on atmel studio 6.0.1996 SP2
[13:34:52] <RikusW> OndraSter_: those chips are probably older than you are ?
[13:34:56] <OndraSter_> by far :)
[13:35:04] <slidercrank> eadthem, thank you for sharing your time. I'll try to understand what is wrong with my setup. I use avr-gcc. And I'm coding in Linux
[13:35:06] <OndraSter_> I found even some 6402 chip from '82
[13:35:06] <eadthem> older than me by about a year
[13:35:13] <OndraSter_> (probably 6402, it is hard to read)
[13:35:27] <RikusW> 6502 ?
[13:35:40] <RikusW> that was the apple cpu iirc
[13:35:47] <OndraSter_> no
[13:35:54] <OndraSter_> M03-6402-9
[13:35:55] <OndraSter_> 8223
[13:35:57] <OndraSter_> all the markings
[13:36:06] <RikusW> I do have a few 6502 ics around found in scrap
[13:36:13] <OndraSter_> I do too
[13:36:25] <RikusW> stil in plastic bags
[13:36:40] <OndraSter_> oh
[13:36:40] <OndraSter_> nice
[13:36:52] <OndraSter_> I have got also Z80 PIO from '82
[13:36:59] <RikusW> not too sure I want to invest time and effort into getting it to work though
[13:37:21] <RikusW> I have a few 8255 PIO chips
[13:37:33] <OndraSter_> I have got also two DACs from '85
[13:37:37] <OndraSter_> conversion time 300ns
[13:37:41] <RikusW> programming them is harder than to program AVR ports....
[13:37:45] <megal0maniac> Bit the bullet and ordered an saleae logic
[13:37:45] <OndraSter_> +-15V even :)
[13:37:48] <RikusW> and its less flexible
[13:37:49] <OndraSter_> 12bit
[13:37:50] <OndraSter_> wow megal0maniac
[13:38:14] <RikusW> megal0maniac: seems you like buying stuff ?
[13:38:22] <OndraSter_> spending money yayyyyy
[13:38:26] <megal0maniac> It's my only Christmas present :P
[13:38:31] <RikusW> (not that I mind, I sold a U2s to you :) )
[13:38:52] <eadthem> slidercrank i beleve the appropriate build logs are in that folder to
[13:39:00] <eadthem> they will list the commands as6 used
[13:39:22] <lidenbrock> any idea on how to interface android with avr microcontrollers?
[13:39:22] <megal0maniac> RikusW: I'm 20 and studying next year, so most of my income is "disposable" (after paying off car, insurance, petrol etc) :)
[13:39:40] <eadthem> lidenbrock host mode or OTG usb from the phone
[13:39:45] <eadthem> or bluetooth
[13:40:01] <eadthem> bluetooth has the advantage of not preventing the phone from chargeing
[13:40:32] <RikusW> megal0maniac: what are you going to do with the analyzer ?
[13:41:08] <RikusW> reverse engineer or debug ?
[13:42:27] * RikusW is considering building a laptop :-P http://www.bunniestudios.com/blog/?p=2686
[13:44:07] <megal0maniac> RikusW: Both. It's more of a learning tool. Want to use it together with the dragon, which if all goes well, I'll get early next year. Then I shall be poor but happy :P
[13:44:39] <RikusW> RS offers it for R500 now
[13:44:55] <RikusW> iirc I paid R600 a few years back
[13:50:53] <megal0maniac> Now you have to pay R75 for shipping as well :/
[13:51:03] <megal0maniac> But its better than the $60 from Atmel :P
[13:55:12] <soul-d> looks cool RikusW that computer thingy not quite that far yet here :P
[13:55:43] <RikusW> soul-d: its not my project ;)
[13:56:06] <RikusW> but its a very interesting idea with some cool extras
[13:56:36] <RikusW> like the builting fpga :)
[13:56:49] <OndraSter_> the JTAGICE3 is $99
[13:56:50] <RikusW> and 3 logic level uarts
[13:56:56] <OndraSter_> the Dragon is... well, it has ISP but zero protection
[13:57:10] <soul-d> it survived me
[13:57:14] <RikusW> the 3a3 xplain is $29 :-P
[13:57:22] <soul-d> the dragon i mean
[13:57:24] <RikusW> lest build a jti3 :-P
[13:57:36] <OndraSter_> jti3 has got avr32 inside :)
[13:57:47] <RikusW> the 3a3 yes
[13:57:55] <RikusW> same as on the xplain board
[13:58:00] <OndraSter_> RikusW, have you reverse engineered PDI debug yet? :P
[13:58:22] <RikusW> OndraSter_: thats why I use my U2S boards for SPI instead of the dragon
[13:58:31] <RikusW> not messed around with PDI yet
[13:58:39] <RikusW> thinking about doing that sometime
[13:59:00] <soul-d> lol mmm should stay with cooking but im at least sure these eggs are hard boiled afther half an hour
[13:59:19] <soul-d> i knew i was forgetting something
[13:59:36] <RikusW> overcooking will result in blue eggs ;)
[13:59:49] <OndraSter_> mm BLUE EGGS
[14:01:22] <RikusW> will have a blue layer on the yolk...
[14:02:15] <soul-d> heh ah wel plenty of Mayonnaise and it will be ok :P but yeah ill have that
[14:02:55] <soul-d> can't wait planted buth jolokia today
[14:03:06] <soul-d> bhut *
[14:10:22] <RikusW> whats that ?
[14:10:46] <soul-d> 1mln scovile of heat
[14:10:52] <soul-d> hot pepers
[14:11:05] <soul-d> 6mln = peperspray :P
[14:11:36] <soul-d> http://en.wikipedia.org/wiki/Naga_Bhut_Jolokia
[14:11:52] <soul-d> although low en says 300k so should be fine
[14:14:18] <soul-d> got 2 plants of http://en.wikipedia.org/wiki/Chile_tepin and have no problem with them in food but one pepper is just enough for one dish
[14:14:58] <soul-d> so upping the ante ;) maybe order the scorpion peper to
[14:16:37] * RikusW shoots a pepper paintball in soul-d's direction :-P
[14:17:13] * soul-d holds egg sandwich up
[14:17:56] <RikusW> from what I hear a whole room will become inhabitable from a single pepper ball.....
[14:18:52] <RikusW> its used for crowd control. ;)
[14:21:58] <RikusW> seems its almost 1 Euro per pepper ball... military spec...
[14:22:22] <soul-d> donno
[14:22:46] * RikusW got some, don't want to test it just yet :-P
[14:23:05] <soul-d> as long you dont get it in eyes nose or mouth you should be fine
[14:23:10] <soul-d> also don't breath
[14:23:20] <RikusW> thats the problem...
[14:23:27] <RikusW> you have to
[14:23:37] <soul-d> got a respirator :P
[14:24:34] <RikusW> seems there is practice, civilian and military spec pepperr balls..
[14:25:51] <soul-d> all o know is that military or police pperspray should be around 6mln scovile much higher is imposible before going to pure capsine
[14:26:34] <RikusW> capsaicin ?
[14:26:41] <soul-d> yeah
[14:27:20] <RikusW> how does your peppers compare to habanero ?
[14:27:52] <soul-d> never had those yet i could buy few to try but tiny :D since their only about paintball size
[14:28:29] <soul-d> advantage is there is littel or no peper taste
[14:28:42] * RikusW loads a habanero into a paintball gun :0D
[14:29:10] <RikusW> don't be mistaken because they are tiny..
[14:34:57] <soul-d> meh took a while to find pic but donno if you will get the size from this :P the white is a usefull tool used with herbs :P
[14:34:58] <soul-d> http://i.imgur.com/YAMuR.jpg
[14:36:20] <RikusW> habanero is like 2cm in diameter or so
[14:37:17] <soul-d> probably should visit the "toko" kinda asian type shop selling herbs and stuff since im running out of these
[14:37:58] <soul-d> thats why grow realy hot big peppers so i can put some in oil and have enough to last a bit
[14:55:36] <eadthem> is it possable to make timer counter 0 on a tiny45 or mega164 stop counting when it his 255
[14:55:57] <eadthem> rather than overflowing back to 0
[15:00:35] <specing> yes
[15:00:48] <eadthem> how do you do that
[15:01:34] <specing> magic.
[15:16:31] <megal0maniac> Lies.
[15:17:12] <megal0maniac> Disable/stop the counter in software when flag is detected?
[15:17:25] <eadthem> was trying to avoid interups
[15:17:40] <megal0maniac> specing doesn't know :)
[15:17:54] <eadthem> and ya that could work but just letting it roll over is more elegent than starting and stopping for this
[15:18:02] <eadthem> ya i got that much
[15:18:03] <eadthem> :p
[15:20:21] <Tom_itx> it's probably less code to let it roll over
[15:20:32] <eadthem> yep
[15:21:12] <Tom_itx> why are you avoiding interrupts?
[15:21:26] <eadthem> small program time critical sections
[15:21:50] <Tom_itx> less time spent there than if you did it the other way in code
[15:21:53] <eadthem> when im doing hard math i dont care about time when im waiting on io bussy loops work fine
[15:22:21] <eadthem> im doing time width modulation
[15:22:29] <eadthem> for IR
[15:25:04] <eadthem> 38khz carrer
[15:25:25] <eadthem> 10 cycles of carrer or no carrer = 0
[15:25:33] <eadthem> 20 cycles of carrer or no carrer = 1
[15:26:33] <eadthem> 50 cycles of carrer or no carrer = start (repeate 4 times 50 on, 50 off, 50 on, 50 off)
[15:26:59] <eadthem> all with +- 20%
[15:27:41] <slidercrank> eadthem, I think I've found the source of the problem. I'm still trying to investigate it. It's preliminary conclusion. I don't have enough RAM. When I link a 1kb image, it's placed to the .data section. So obviously the whole RAM is dedicated to it. And thus, the content of arrays is left is flash and when I try to access arrays, I read zeroes instead of actual data
[15:28:03] <slidercrank> *left in flash
[15:31:02] <eadthem> bit scary
[15:31:19] <eadthem> im doing sha256 for this if im not careful i could run out of ram
[15:31:51] <eadthem> of course that shuld only consume 16 bytes of ram for the values
[15:32:01] <eadthem> err 32
[15:32:54] <eadthem> well fortunatly the tiny45 only has to sha a receved 128bits with a static 128bits from eeprom and send that
[15:33:02] <eadthem> other 1/2 has to do a bit more
[15:34:16] <eadthem> http://final.servegame.com/public/fob/TWM/TWM.h see comment section toward the bottom
[15:35:15] <eadthem> slidercrank might try turning on all optimisation favorign size
[15:40:02] <slidercrank> eadthem, void receve(void); you have 'receive' misspelt
[15:40:14] <eadthem> :p not suprised
[15:40:30] <slidercrank> and 'length' too:)
[15:40:30] <eadthem> i best not change it as ile probably misspell it the same every time
[15:41:51] <slidercrank> eadthem, what's the purpose of the project? According to comments, I think it has something to do with motion detection. But what does sha256 to do with it?
[15:42:04] <slidercrank> *have to do with it
[15:42:05] <eadthem> it is a electronic deadbolt
[15:42:27] <eadthem> there is a motion detector to turn on the porch light
[15:42:45] <eadthem> if its tripped the door generates a challange and starts sending it out.
[15:42:47] <slidercrank> interesting. does it work?
[15:43:01] <eadthem> still writing the TWM object
[15:43:14] <eadthem> after that i have to test it and then i can combine it with the sha class and test that
[15:43:48] <eadthem> then i can combine mersane twister for the door side with the code and then i have that portion
[15:43:56] <slidercrank> and how do you use hash functions here? what for?
[15:45:34] <eadthem> well see the reason why a rfid card is insecure in all cases
[15:45:45] <eadthem> is the data is sent unencrypted everytime same data over and over
[15:46:05] <eadthem> anyone with 50$ and a radioshack can read and mimic a card and such a setup would be smaller than a wallet
[15:46:17] <eadthem> This system is encrypted via the hash
[15:46:46] <eadthem> the access card has a 128bit randomly generated string that never changes the door knows this string and the cards ID
[15:47:12] <eadthem> upon getting enough light for the solar cell + receving a challange + passing crc16 check on the data receved
[15:47:31] <eadthem> the card combines the randomly generated 128bit challange with the pre shared 128bit key
[15:48:02] <eadthem> and then sends the cards 32bit ID + 256bit response + 16bit message CRC back
[15:48:38] <eadthem> the door receves the id dose sha256 with teh challange it sent combined with the preshared key it has a copy of, if the result matches what it receved then it unlocks
[15:49:58] <eadthem> the id and pre shared key have no corrlation, all cards start with a blank id and pre shared key, the door generates that and loads it on the new card when it is set to allow the card.
[15:52:23] <slidercrank> eadthem, oh, so you use an electronic card to open a door. that's interesting
[15:52:33] <slidercrank> then it makes sense
[15:52:37] <eadthem> its also IR based
[15:52:47] <eadthem> so it works from about 5 to 15 feet away
[15:52:51] <eadthem> door can be open by the time you get to it
[15:52:59] <eadthem> without holding the card up to the door
[15:53:04] <slidercrank> do you want to use it for you home?
[15:53:09] <eadthem> planning to
[15:53:22] <OndraSter_> :o
[15:53:28] <OndraSter_> arduino's ICSP header is a male!
[15:55:38] <slidercrank> eadthem, the project is interesting. good luck with it:)
[15:56:15] <eadthem> card has no batterys just a supercap and solar cell
[15:56:25] <eadthem> about 5cm by 5cm
[15:56:35] <eadthem> 8mm thick
[15:57:07] <eadthem> and the supercap is more so high current pulses can be sent to the IR led
[16:29:58] <OndraSter_> hmm
[16:30:02] <OndraSter_> is my FT232RL dead or what
[16:30:15] <OndraSter_> I am getting zero data on the tx..
[16:30:22] <OndraSter_> but the LED is flashing.
[16:35:31] <slidercrank> eadthem, everything works fine now. By default avr-objcopy moves data to the .data section. That lead to out of RAM. I specified --rename-section .data=.text,readonly,code,contents. And I access the array with lcd_send_dat(pgm_read_byte(p++));
[16:36:01] <slidercrank> so that reading zero was causes by having not enough of RAM
[16:36:05] <slidercrank> *caused
[16:36:14] <slidercrank> *enough RAM
[17:03:15] <OndraSter_> OMG IDIOT ME
[17:03:31] <OndraSter_> it took me like.. 30 minutes to realize that the UART isn't working because I was running on 2MHz
[17:03:33] <OndraSter_> rather 32MHz
[17:03:34] <OndraSter_> ..
[18:14:47] <OndraSter_> damnit
[18:14:57] <OndraSter_> the SD card replies with A9 02 A9 02 A9 02..
[18:15:02] <OndraSter_> after 80 bytes sent :/
[18:15:09] <OndraSter_> but I have to do the burst
[18:16:03] <Tom_itx> so?
[18:16:09] <Tom_itx> is that invalid data?
[18:16:12] <slidercrank> OndraSter_, about the UART. How did you find it out? Did you use an oscilloscope?
[18:16:29] <Tom_itx> he was counting the clock cycles in his head
[18:17:10] <OndraSter_> slidercrank, well I was receiving junk when I looked at the data with my SuperTerm
[18:17:17] <OndraSter_> (all 00s)
[18:17:27] <OndraSter_> which looked a lot like wrong baudrate
[18:17:31] <OndraSter_> then it hit me.
[18:17:43] <OndraSter_> Tom_itx, I don't know what it is
[18:18:01] <OndraSter_> the weird thing is that CS line has got no affect on it :/
[18:18:18] <soul-d> wich side dide the 80 byte sending the card or you ?
[18:18:58] <Tom_itx> is cs floating?
[18:19:04] <OndraSter_> cs is not floating
[18:19:19] <OndraSter_> soul-d, ... on SPI SD card I am always the master
[18:19:30] <OndraSter_> > ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
[18:19:30] <OndraSter_> < 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9 02 A9
[18:19:40] <OndraSter_> no matter if CS is low or high
[18:19:42] <Tom_itx> woah@
[18:20:06] <OndraSter_> I built small UART-SPI bridge :P
[18:20:13] <OndraSter_> > = me, < = reply
[18:20:16] <Tom_itx> you should have a saleae
[18:20:20] <OndraSter_> yeah :(
[18:20:24] <Tom_itx> i used it the other day on spi
[18:20:26] <OndraSter_> but it is not like I would be able to probe there anyway
[18:20:33] <OndraSter_> too close to other stuff
[18:20:35] <Tom_itx> worked rather well to show the data bytes
[18:21:55] <Tom_itx> 0xA9 02 is garbage
[18:22:05] <OndraSter_> it actually changed when I fixed CPOL
[18:22:08] <Tom_itx> or so it would appear
[18:22:35] <Tom_itx> yeah you gotta have the phase and polarity right
[18:25:20] <soul-d> meh not that i have a real clue since i still need to rewrite the stolen sd code for fpga http://stevenmerrifield.com/tools/sd.vhd but you might extract some info from it im doing reading writing at 62.5khz so it's visable on hex display
[18:25:23] <OndraSter_> HAA
[18:25:27] <OndraSter_> isn't it open collector?
[18:25:42] <Tom_itx> well i did mention pullups
[18:25:51] <OndraSter_> well
[18:26:01] <OndraSter_> now it went from 00000000 A9 02 A9 02
[18:26:02] <OndraSter_> into
[18:26:07] <OndraSter_> FF 000000 FFFFFFFF AB 02 AB 02
[18:26:18] <Tom_itx> still garbate
[18:26:21] <Tom_itx> ge
[18:26:28] <OndraSter_> :(
[18:26:42] <Tom_itx> what are you sending?
[18:26:50] <OndraSter_> all FFs
[18:26:50] <Tom_itx> and what's it supposed to reply?
[18:26:56] <OndraSter_> it is supposed to reply with FFs
[18:27:00] <Tom_itx> for the init?
[18:27:05] <Tom_itx> or are you past that
[18:27:05] <OndraSter_> for the pre-init
[18:27:10] <OndraSter_> I wish I was past that
[18:27:11] <Tom_itx> what card is it?
[18:27:19] <Tom_itx> there are 3 different init sequences
[18:27:21] <Tom_itx> for sd
[18:27:30] <Tom_itx> maybe 4 by now
[18:27:30] <OndraSter_> microsdhc I think
[18:27:54] <Tom_itx> my solution was to test for mmc first
[18:28:01] <Tom_itx> then if that failed test for regular sd
[18:28:14] <Tom_itx> then if that failed test for sdhc
[18:28:24] <Tom_itx> 3 different init sequences
[18:28:48] <Tom_itx> but i think i had hardware problems looking back on it
[18:28:53] <OndraSter_> hmm
[18:29:03] <Tom_itx> i think the translator chip i was using was causing me grief
[18:29:05] <soul-d> http://i.imgur.com/0VsN7.png
[18:29:11] <OndraSter_> lucky me, using native 3v3
[18:29:22] <soul-d> if you want me to try capture init process
[18:29:29] <Tom_itx> do you have all the docs on it?
[18:29:30] <OndraSter_> thanks
[18:29:34] <OndraSter_> I do
[18:29:38] <OndraSter_> and I should have been asleep for 1 hour
[18:29:42] <soul-d> but wont be until tomorow then
[18:30:05] <OndraSter_> meh, will try it tomorrow after I write the exam on which I should have been learning if not sleeping.
[18:30:09] <OndraSter_> thanks
[18:30:11] <OndraSter_> for the help
[18:30:37] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/pdf/mmc/
[18:30:45] <Tom_itx> there's everything i collected for it
[18:30:49] <Tom_itx> i think
[18:31:41] <soul-d> you got the highspeed specification ?
[18:31:58] <Tom_itx> i'm not sure but i doubt it
[18:32:15] <soul-d> wel the 2.2 is new to me i thought only 1.2 was available
[18:32:26] <soul-d> spec sheet
[18:33:50] <OndraSter_> well maybe part of my problem is that I am using USART in SPI mode... but I think I wired it up correctly
[18:33:56] <OndraSter_> (I can not change it, it is on a board already)
[18:34:05] <soul-d> it does contain all the info for 4 wire buss it seems
[18:34:09] <OndraSter_> and since I am getting something on Rx line it must be wired good
[18:34:56] <Tom_itx> soul-d, i think it covers that area at 2G that some are HC and some are not
[18:35:23] <Tom_itx> it was a period of spec change during that time of hardware vs spec
[18:36:59] <Tom_itx> i haven't messed with it for quite some time now
[18:37:12] <soul-d> saved it in anycase since it looks more detailed then i found last week with google im reading writing @ 62,5 khz
[18:37:27] <soul-d> lol part sentence left there :P
[18:37:47] <Tom_itx> i was using a max chip as a level translator and i think it was messin me up
[18:38:05] <Tom_itx> these nxp chips i've been using on my programmers are much better
[18:39:03] <Tom_itx> i'm doing a board layout for SD right now using one
[18:39:04] <soul-d> since i use it on fpga it's already wired but got a bunch of sd connectors in stock to :)
[18:39:33] <Tom_itx> i think i have about 3 different style sockets
[18:40:00] <soul-d> still have some 200 lvx4245 level converters i bought ages ago
[18:40:09] <soul-d> so im set for that
[18:40:43] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/boards/atmega32_sd_1.jpg
[18:40:49] <Tom_itx> that kinda tells ya how long it's been
[18:42:06] <soul-d> :) should try to make a board again took my light box inside again hope it still works and some iron on uv material or somthing i never used yet ( so if it still works )
[18:42:41] <Tom_itx> that blue stuff?
[18:42:44] <soul-d> yes
[18:42:45] <Tom_itx> i hated that stuff
[18:42:50] <Tom_itx> i still got a whole pack
[18:43:04] <Tom_itx> the plastic would stretch
[18:43:38] <slidercrank> how can I specify to avr-gcc what memory map I have? It doesn't warn me that I ran out of memory.
[18:43:58] <soul-d> i tried to use toner transfer on gazillion paper types but never working for me :(
[18:44:07] <Tom_itx> trial and error
[18:44:15] <soul-d> thats what i get for trowing 2 laser printers out that did work
[18:44:17] <Tom_itx> but i've gotten several different ones to work
[18:44:30] <soul-d> with 14k pages black toner
[18:45:03] <soul-d> "they are old etc etc etc "
[18:45:27] <soul-d> and got them for free but still regreted trowing them out
[18:45:50] <soul-d> wel slowly moving them out since they weighed like 30kg
[18:46:18] <Tom_itx> i had an original series ii laserjet as my first one
[18:46:36] <Tom_itx> it made good transfers
[18:46:44] <soul-d> ibm page printer
[18:47:01] <soul-d> or lexmark optra r the same
[18:47:18] <soul-d> now do own a color lexmark so it might influnced me :P
[18:47:37] <soul-d> maybe should try a colored toner as transfer maybe more luck then black
[18:51:11] <soul-d> but probably mostly impatience i guess with prototyping
[18:51:39] <soul-d> otherwise id probably use a cheap service like seeedstudio and the like
[18:52:51] <soul-d> but then i still want to make a prototype myself first wich then defeats that purpose since i usually don't need 5 - 10 boards
[19:05:10] <slidercrank> does .data section denote RAM?
[19:05:47] <slidercrank> for some reason, for atmega8 avr-gcc thinks I have almost 64kB of RAM: avr4.x: data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0
[19:06:11] <slidercrank> why 0xffa0 and not 0x3FF?
[19:34:01] <Tom_itx> what is ramend defined as?
[19:43:07] <Tom_itx> 0x45F
[19:43:10] <Tom_itx> on the mega8
[19:43:52] <Tom_itx> check your iom8.h file
[19:49:58] <timemage> slidercrank, dunno why it does that. i noticed that 0x60+0xFFA0 == 0x10000. it looks like they're just generating a bogus length to pad out the full address space.
[19:50:16] <slidercrank> Tom_itx, yes, it's 0x45F. It's weird. I exceeded my RAM and got not complaints from the linker
[19:50:42] <Tom_itx> however ram and flash are not the same
[19:52:13] <inflex> ah fun, time to now design my temperature controller for my chest-freezer
[19:52:19] <slidercrank> Tom_itx, the problem I had was the following. I linked a 1kb binary file (it was placed to .data). So I could not use my arrays (when I tried to access them I would get zeroes). Atmega8 has 1kb of RAM. Then I moved the binary file to the .text section and it started working fine.
[19:52:28] * inflex ponders just using the same design as his reflow oven
[19:53:27] <slidercrank> Tom_itx, so I expected avr-gcc to warn me about the problems I might face
[19:57:16] <soul-d> just figures the ramend of brain ~ 0x1312D00 * 0x32000 byte
[19:57:31] <slidercrank> Tom_itx, also I noticed in the map file the references to: /usr/lib/gcc/avr/4.6.2/../../../../avr/lib/avr4/crtm8.o and /usr/avr/lib/ldscripts/avr4.x describes data (rw!x) : ORIGIN = 0x800060, LENGTH = 0xffa0
[19:58:00] <soul-d> thats probably hell to do memory mapping for :P
[20:01:14] <Grievre> inflex: chest-freezer?
[20:16:26] <Tom_itx> inflex what are you working on now?
[20:21:12] <inflex> to make a cooler box that holds at about 10~15'C
[20:21:22] <inflex> so that butter, bread, veges and fruit last a lot longer
[20:22:50] <Tom_itx> you don't have a frig?
[20:38:07] <inflex> Fridges want to be at 1~5'C
[20:38:35] <inflex> I'm doing this for items that you don't want to be so cold, and more frequently used. Being a chest freezer it's also vastly more economical to run
[20:44:43] <Tom_itx> how much current do SD cards draw?
[20:48:28] <Tom_itx> mmm sry i'll take my reg over yours. 2.07 vs .56 ea
[20:48:43] <Tom_itx> both .5a 3.3v
[21:00:57] <soul-d> no clue about the current draw but that can't be much
[21:15:48] <soul-d> Tom_itx, only found somthing vague on page 99 Physical Layer Simplified Specification Version 3.01 or 81 in 2,0 all the same -> http://goo.gl/dEXyY one "appnote" mentions 100ma typical
[21:16:31] <soul-d> wich means im gonna build my breadboard with seperate powersupply maybe thats why my ethernetchip fails
[21:16:46] <soul-d> fpga boards already draw to max
[21:17:05] <Tom_itx> i used a 200ma on my last project
[21:17:15] <Tom_itx> i've got those and some 500ma regs
[21:17:52] <soul-d> im lazy computer powe supply and tap that 3,3 rail :P
[21:18:04] <Tom_itx> this is standalone
[21:18:16] <soul-d> or ill put a reg on the 5,5 line wich is what i usaly do for testing purposuses
[21:22:11] <soul-d> well 200ma total might then be a bit short depending on circuit but thats just guessing depends on speeds to i guess although it seems you could use really low current if you wished
[21:24:12] <soul-d> it's late starting to talk weird need some sleep :)
[21:24:17] <soul-d> nite
[21:24:37] <Tom_itx> i'll stick with the original 500ma plan
[21:24:41] <Tom_itx> gnite