#qi-hardware IRC log for Friday, 2011-09-23

kristianpaulBtw who, was.. i forgot, there was a plan to get rfm12b in linux main stream some how?? bad memory...02:18
wolfspraulthere's so many things we need to get mainline. scary...02:22
wolfspraulI don't think anybody is on this one now, and it's far from the top of my priorities now.02:23
wolfspraultoo many good and worthwhile things to do :-)02:23
wolfspraulthis is a neat service I think http://www.gazelle.com/03:28
wpwrakkinda like ebay ?03:34
wpwrakah, with technical service03:35
erikkugelsorry, Just saw Gazelle being mentioned, they are great (and the prices they list are usually higher than what one might get on eBay), but they are only accepting packages from the US... :(05:35
wolfsprauloh he already left05:51
virichave you read about this? http://www.winrumors.com/microsoft-clears-up-linux-confusion-over-windows-8-secure-boot-feature/?utm_campaign=twitterwp&utm_medium=twitter&utm_source=twitter08:53
viricmaybe RMS has some words to say about those practices :)08:53
tuxbrainwpwrak: you there?10:06
tuxbrainI'm unable to make the arduino recieve the values I want to send, it's receives somthing  but for its behaviour seems that I'm only sending one value (0) and when de 3 bytes bufer is full (executing spio four times) the buffer is full and then reads it, but is full of 0 values, I have modified spio to have two params one the order , at this time is only one (0x01) and the second param a value , in this case it must make the led blink "value" times bu10:11
tuxbraint as I said it doesn't work. here is my mofidication of the spiio http://pastebin.com/STqPNWP310:11
tuxbrainI also modified the assignation to MOSI MISO etc to make it coincide with this https://www.tuxbrain.net/shop/images/UBB_ICSP_wiring_schema.jpg10:13
tuxbrainan the fact is that is arduino is recieving but seems that spiio is not sending the trhee bytes, (or maybe arduino not  reiciving them10:15
tuxbrainalso this doesn't work directly in main:10:36
tuxbrainspi_begin();10:36
tuxbrainspi_send(atoi(argv[1]));10:36
tuxbrainspi_send(atoi(argv[2]));10:36
tuxbrainspi_send(0x00);10:36
tuxbrainspi_end();10:36
tuxbrainargh why for God shake  it's only sending a 0x00 each four time I execute the spiio!!!!?11:10
wpwrakgood morning :)11:24
wolfspraulgood morning11:26
wpwrakafter-boot checklist: clean nose: check, anti-hayfever pill: check, LD200 of caffeine: ... getting it ...11:26
wpwrakcaffein being administered. now to the backlog ...11:29
tuxbrainhahahahah, I was like you 3 days ago, happy flu wpwrak11:29
wpwraktuxbrain: you had hay fever in late summer ? that's pretty unusual11:31
wpwraki hope to be rid of the flus for this year. two different ones in as many months were quite sufficient. now it's just the pollen and then i can look forward to a beautiful untroubled summer :)11:33
tuxbrainyes all in shorts and I shivering and sweeting wonderfull11:33
wpwrakhmm, that sounds like a regular flu then. they suck too, of course. just differently :)11:33
wpwraktuxbrain: first of all, do you still only get zeroes ? second, in which SPI mode is your arduino ? there are four of them, all mutually incompatible11:35
tuxbrainspi mode:setup_spi(SPI_MODE_1, SPI_MSB, SPI_INTERRUPT, SPI_SLAVE);11:36
wpwraklet's see what sp mode 1 does ...11:37
tuxbrainyes only 0 and arduino react only at fouth execution11:37
tuxbrainafter a lot of desperate changes heres is my actual spiio app http://pastebin.com/qMSugvjp11:39
tuxbrainI have checked the arduino variables printing them on serial, 11:40
wpwrakhmm, where's your SPI library again ? can't find the URL :-(11:42
wpwrakah, found it. caffeine is slowly kicking in :)11:45
wpwrakso you use CPOL=0 CPHA=1 ... let's see what i have ...11:47
tuxbrainI use what?11:48
wpwrakSPI_MODE_1 -> line 48 of spi.h of rocketnumbernine11:49
wpwrakyeah that's not the mode i use. SPI_MODE_0 should work better11:52
wpwrakbut there may be more problems11:52
wpwrakmaybe the Ben is too fast. you could add a few usleep()s between calls. especially after the spi_begin11:58
tuxbrainSPI_MODE_0 same behaviour 11:58
tuxbraintrying usleep()11:58
tuxbrainusleep(1)?11:59
wpwrakhmm, start with usleep(100). avrs are slow :)12:00
wpwraknot that it should matter. i think any non-zero value will wait for at least a jiffie, so that would be typically 1 ms or longer12:00
tuxbrainusleep(100) same behaviour12:01
wpwrakgrmbl12:02
wpwrakput the spi_begin ... spi_end in a loop and add a  char foo; read(0, &foo, 1);  at the beginning of the loop12:03
wpwrakthen you can trigger the transmissions by pressing Enter12:03
wpwraksee if things get better after the 1st cycle12:04
tuxbraincan you put this in a format I can c&p I'm doing four things at time right now :P12:04
wpwrakbefore spi_begin: while (1) { char foo; read(0, &foo, 1);12:05
wpwrak(that is, after the CALL to spi_begin)12:05
wpwrakerr, before i mean12:05
wpwrakafter the call to spi_end: }12:05
tuxbrainok now it reacts each fouth enter _P12:10
tuxbrain:P12:10
wpwrakheh, progress  ;-)12:13
wpwrakat what clock speed does your AVR run ?12:13
tuxbrain16MHz?12:14
tuxbrainAruduino UNO12:14
tuxbrainyes 16 MHz12:15
wpwrakthat should be sufficient .. checking ...12:15
wpwrakhmm, maybe not. apparently, the SPI can only do up to 5-6 MHz, which may be just a bit too slow12:17
wpwrakmore delays: in spi_send, put a usleep(10) at the following places:12:17
wpwrak- before PDDATS = SCLK;12:17
wpwrak- between PDDATS = SCLK; and PDDATC = SCLK;12:17
wpwrak- after PDDATC = SCLK;12:18
tuxbrainsame 12:22
wpwrakstrange12:24
wpwrakmaybe check the signals. you can also make a little loop that toggles them individually, so you can check the levels with a voltmeter12:26
tuxbrainok i wiil do dat in a hour or so12:26
wpwraki.e., int on = 1; while (1) { char foo; read(0, &foo, 1); if (on) PDDATS = signal; else PDDATC = signal; on = !on; }12:26
wpwrak(replace "signal" with MOSI, MISO, SCLK, or nSEL)12:27
wpwrakand you should really get yourself a scope :)12:27
Artyomhi kristianpaul :)13:27
kristianpaulwhat a great picture, and lovelly have the video-in is just over the keyboard http://en.qi-hardware.com/wiki/File%3AMasecki_Warsaw_Concert_M1.jpg13:27
kristianpaulhello Artyom !13:27
kristianpaulI saw your blog post13:27
kristianpaulno letters from russian arrived yet btw, i'm getting to worry ...13:28
Artyommay be you will be interested in: http://code.google.com/p/gnsssdr/source/browse/#svn%2Ftrunk13:28
ArtyomYes, that is strange about letters :(13:29
kristianpauloh, its yoru repo?13:29
kristianpaulArtyom: if you have a trackign number i can try to rech postal office13:29
ArtyomYeh, I try to study svn. This is my attempt to use it for my projects.13:30
kristianpaul:-)13:30
kristianpauli noticed, this tracking is offiline or scilab is just there for plot the results coming from namuru on the board?13:32
ArtyomWell, it's difficult with tracking number. I think I'v lost it. I\ll try to find it but I'm not sure :( May be it was saved in browser cache when I used it...13:33
Artyomscilab is only for plotting results13:33
kristianpaul6 correlators = 2 full  namuru tracking channels ?13:35
kristianpauli also noticed negative values in the chart is this a know offset  to apply or?13:35
Artyom6 correlators (or may be better to say 6 summators) = 1 tracking channel (early, prompt, late for in-phase and quadrature channels)13:37
ArtyomWhat do you mean by negative values?13:38
kristianpaulin the plot13:38
kristianpauly goes from -4000 to 400013:39
kristianpaulArtyom: on my side i got logginf correlators now, but just missing plot, wich i will use gnuplot i guess13:41
kristianpaulme not very good with scilab as i wish :)13:41
ArtyomThis is output from accumulators. No additional procesing in scilab was made. For example the similar graph is plotted here: http://gnss-sdr.ru/index.php?itemid=17 (upper right graph on the first figure)13:43
kristianpaulosgps, really looks different, i see lots of folders now13:43
Artyommany folders are specific for lpc247813:44
Artyommain code is in isr-folder13:44
Artyominitialization code is in correlator.c13:45
kristianpaulyeah, checking correlator_init right now13:45
ArtyomThe code is far from ideal, but I hope it can be useful13:47
kristianpaulsure it is13:48
tuxbrainwpwrak: are you there? How I modify the Makefile to compile testMISO.c testMOSI.c .. etc? just additg its name to "all:"? separated by space or coma?13:59
tuxbrainkristianpaul maybe you also know this :P13:59
kristianpaulwhere is the original makefile?14:00
tuxbrainhere is the actual Makefile http://pastebin.com/3zYZqNYi14:00
kristianpaulyes i guess adding tha names will work14:03
kristianpaulArtyom: wow #define ACQ_THRESH 160014:03
ArtyomEhm... you don't like value? or anything else? ;)14:05
kristianpauli havent get the max in values in my side but i can notice value from ~400 to ~60000 right now14:05
kristianpauls/in/min14:05
ArtyomAnd what about negetive numbers?????14:07
kristianpaulgood question :)14:08
Artyomwhat data type do you use?14:09
Artyommay be you use unsigned?14:10
ArtyomThen 60000 is about -500?14:10
kristianpaulyes for now14:10
ArtyomI think this is wrong. Signed number should be used. Otherwise phase/frequency/delay discriminators will not work IMHO14:11
kristianpaulyes14:23
wolfspraulkristianpaul: hah you were faster with the spam - thanks!14:24
kristianpaulha, i just wake up a hr ago and read some news :)14:26
wolfspraulI've had a few cases some days ago14:27
wolfspraulChinese spam, so easy because it's in my timezone :-)14:27
wolfspraulthis one seems from elsewhere...14:27
kristianpaulArtyom: i must leave for hour and a half, but is great you realeased the code !!14:29
kristianpaulNow i'm behind :)14:29
kristianpaulTime to speed up 14:30
kristianpaulArtyom: if you got that tracking # will be great, at least to know what happened with the letter, may be i need to go visit customs and explain what is a PCB ;)14:31
kristianpaulhope not14:31
ArtyomI will also leave after half an hour. Yes, I'll try to find tracking#14:32
kristianpaulwolfspraul: may want to know a Artyom got to track a satellite, wich is great ! 14:33
kristianpaulok, see you soon14:33
wolfspraulwow nice14:34
tuxbrainyes yes yes yes yes yes yes and fucking yes15:24
tuxbrainI have communication SPI with arduino!!!!! yes yes yes15:25
Action: tuxbrain dancing the happy geek dance arround the floor15:26
tuxbrainat last one way NN->arduino15:26
tuxbrainjust two values but good.....  it feels soooo good15:27
wpwrak;-)))15:28
wpwrakwhere was the problem ?15:28
tuxbrainehem ... mainly that I use the ICSP header that instead of nSEL has Rested (:shame)15:30
wpwrak;-)))15:30
tuxbrainwpwrak: only usleep(1) is needed to achieve comm between spi_begin() , spi_send(), etc, no need inside de spi_send fuction15:37
tuxbrainwpwrak: I have talked to quick, after a few test seems that some pause on spi_send function is needed but even putting usleep(1) makes the comm really slow about half a second or so pair of bytes (well really tree) there is any pause more quick than usleep?16:17
qi-botThe build was successfull, see images here: http://fidelio.qi-hardware.com/~xiangfu/compile-log/openwrt-xburst.full_system-09222011-1249/16:57
wpwraktuxbrain: you can adds a small delay by just duplicating a setting. e.g., PDDATS = x; PDDATS = x; will add a small delay after rising "x".17:37
tuxbrainok I will try17:38
tuxbrainok the quickest I have achieved is as you said just repeating the PDDATS = x, and usleep(1) between calling fuctions , using serial at 115200bps it doesn loose any value for almost 5 mins so I give it as OK :)18:31
tuxbrainwpwrak: I have a couriose bug to catch now18:46
tuxbrainon the arduino side18:46
tuxbrainwhen I call the function flash_led() on the setup() fuction it respect the delay(whatever) I put in the for, but when I call it passing the parameter I put in the NN, it piss off on the delay, and goes as fast as it can18:49
tuxbrainI have put debug message to the serial output, and it does what it has too, it iterates the for the amount I said on NN, but...  it doen't respect the delay18:50
wpwrakwhere's the delay - on the arduino or on the ben ?18:54
tuxbrainon arduino18:54
tuxbrainben does it's work, it pass the value and ends 18:55
wpwrakdo you use the delay function with delay(n*CONSTANT); or with for (i = 0; i != n; i++) delay(CONSTANT); ?18:55
tuxbrainvoid flash_led(int count)18:56
tuxbrain{18:56
tuxbrain  Serial.println("entro en la funcion flash_led");18:56
tuxbrain  Serial.print("count vale ");18:56
tuxbrain  Serial.println (count);18:56
tuxbrain  for (int i=0; i<count; i++) {18:56
tuxbrain    Serial.print("i vale ");18:56
tuxbrain    Serial.println (i);18:56
tuxbrain    digitalWrite(LED_PIN, HIGH);18:57
tuxbrain    delay(75);18:57
tuxbrain    digitalWrite(LED_PIN, LOW);18:57
tuxbrain    delay(75);18:57
tuxbrain  }18:57
tuxbrain}18:57
tuxbrainups I should use pastebin18:57
wpwraklooks reasonable. and yes, you should ;-)18:57
wpwrakmaybe the delay is too short ?18:57
tuxbrainthe function flash_led() works when I call it on the setup() function , with a fixed value flash_led(4), to know is ready to accept nn instructions18:58
tuxbrainbut totally ignores the delay  when I call it after the SPI comm18:58
wpwrakfunny :)18:59
wpwrakthis is converted by some pre-compiler into C, no ? then maybe check the C code for what it really does.19:01
tuxbrainyess really, the log in the serial looks just fine , it does al the iterations but the led blinks so quick it seems is just on for a instant , bigeer values make it bright longer it just ignore the delay19:02
wpwrakah, wait a minute ... when you do, say, flash_led(10);, that works, right ? then you add SPI comm and do flash_led(received_byte); and it doesn't19:02
tuxbrainyes that's it19:03
wpwraknow, what happens if you do the SPI comm and follow it with flash_led(10); (i.e., hard-coded)19:03
tuxbrainsame behaviour, it doesn't respect the delay but does the fixed iterations, (I have already tried)19:04
wpwrakhmm. so it appears tht the digitalWrite(LED_PIN, LOW); is being ignored ?19:04
tuxbrainno is the delay(75) due if it was the digitalWrite(LED_PIN, LOW) the led will should maintain bright after the iterations but it stays off19:05
wpwrakokay. check the generated code then. that looks like a translation bug.19:05
wpwrakor better, write it in regular C :)19:06
tuxbrainbut there is no precompilation!, it just add the C headers and the calls to arduino libs is just text , there is not tranlation at all19:07
wpwrakhmm, okay.19:07
wpwrakso just rewrite it in regular C then :) http://www.nongnu.org/avr-libc/user-manual/group__util__delay.html is your friend (assuming they use avr-libc)19:08
tuxbrainmmm well , tomorrow I will talk directly to David Cuartielles (Arduino Founder) and will expose that dilema19:08
wpwrakhehe, good ;-)19:08
wpwrakor maybe find a forum. this looks quite basic19:08
tuxbrainyes, is matter of lack of time before I meet David :P will be quicker also I have some meeting with Arduino Gurus, so we will find out, the NN part is ok (at least the NN->arduino) I have no more time to test Arduino ->NN or NN<->Arduino, I'm quite happy with the results, big big big thanks dude , I goonna make this Ardu loosers desire a NN as it was the fucking Sauron's Ring19:12
wpwrakvery good. let's rule them ! ;-)))19:12
erikkugellmao...19:13
Action: tuxbrain moving servo with a Nanonote :) even cooler than the led20:48
wpwrak;-))20:58
wpwrakwhen will you release the skynet 0.1-alpha package ? :)20:58
tuxbrainDon't know but my version will not have the Connor bug :P, and of course will be realeased under GPL21:00
wpwrakaha ! under a viral license, so it spreads faster21:02
tuxbrainfirst release will be a lovely tuxbrain penguin able to build the next gen.... an even more lovely tuxbrain penguin, and thanks to this recursion as first law, I will not destroy humanity is a waste of brain and muscle, after some iterations, they will be so lovely that you will obey sayin , "I hate what I'm doing but they are sooooo cuuteee" BWAHAHAHAHAHAH21:07
tuxbraintime to sleep, I can move a servo with a Nanonote without need to solder anything to it... tired to do the happy geek dance but I'm going to bed humming the happy geek song21:10
wpwrak;-))21:11
tuxbrainthree hours of sleep and  run to catch the fligh. 21:11
tuxbrainsee ya!21:12
tuxbrainwhatever contact me by email21:13
ArtyomHi Kristianpaul :)21:52
kristianpaulArtyom: hello !21:54
ArtyomI've found this number: RA112415246RU21:54
kristianpaulnice, i'll call postal company21:55
kristianpaulthey said is not in the country yet21:58
kristianpaulArtyom: it was by postal/airmail right?21:58
ArtyomI checked the state of the sending through this web-site: http://www.russianpost.ru/resp_engine.aspx?Path=rp/servise/ru/home/postuslug/trackingpo21:59
ArtyomIt is written that 14.08.2011 it was exported21:59
kristianpaulyup22:00
kristianpaulwell, know is in a unknow state until reach colombia22:01
kristianpaulbut now i have # tracking number so i can verify with 4-72.com.co22:01
ArtyomI don't know how it was sent. I know only that this type of sending was called "small package".22:03
kristianpauldelay is okay, i had ordered from india some seeds and took like two months to arrive22:03
kristianpaulArtyom: btw, about this tracking process, i'm little confused, let said i just want a namuru solution that provides telemtry, but then it will asume that i have to constantly feedback prn codes and no more?22:04
kristianpaulI mean for tracking do i need to know satellite ephemeris?22:05
ArtyomI have the same experience with India ;) I sent letters from India to Russia and the delay was couple of months. (So Russia is like India ;) )22:05
kristianpaulor in theory just with and early, pront late correlator i can track a satelly over all sky?22:05
ArtyomEhm... let's go step by step about tracking.22:08
kristianpaulsure ;-)22:10
ArtyomFirst of all: for acquisition and tracking you don't have to know anything about ephemeris or almanac.22:10
kristianpaulyes22:10
ArtyomEvery receiver has a "cold" mode. In this mode it has no information about ephemeris or almanac.22:10
ArtyomSo in this case you have to pass through all combination of delay/doppler_shift for each satellite22:11
kristianpaulyup22:13
ArtyomWhen acquisition success for some combination delay/doppler_shift for some PRN (or some satellite in other words) then confirmation starts. If confirmation is also success then tracking starts to work22:13
ArtyomDuring tracking you can take output from in-phase_promt correlator arm22:14
Artyomthis I_prompt output is your navigation data (telemetry as you call it)22:15
ArtyomThe only thing that you must remember is that each bit lasts 20 ms or 20 I_prompt outputs22:15
Artyomso you have to make some additional steps to synchronize with 20ms-bits edges22:16
kristianpaulslew?22:17
ArtyomYou want to ask what to do with slew? Should we control it? Do I understand you right?22:18
kristianpaulyes22:19
kristianpaulI tought code slew was part of this bit synchronization, is it right?22:19
Artyomno ;)22:19
Artyomslew control is done only during acquisition22:19
kristianpaulouch22:19
Artyomwhen tracking starts there is no need in additional slew control22:20
ArtyomEverything is done by Delay Lock Loop which control chip-rate22:21
ArtyomAnd the change in chip rate is equivalent to slew-control. But chip rate control is much more precious then slew control22:22
kristianpaulHow do you change chip rate? is not suposed to be constant?22:23
ArtyomNo it's not constant ;)22:24
kristianpaulbecause doppler?22:24
Artyomi think - yes 22:25
kristianpauland then thats when the tracking loop plays its role?22:25
Artyomsorry... please explain this question...22:26
kristianpauli mean,22:27
kristianpaulsynchronize with 20ms-bits edges =  change in chip rate ?22:28
kristianpauland both are related _just_ with doppler?22:28
Artyomsorry once again :( Synchronize with 20ms bit edges != change in chip rate.22:30
kristianpaulhum ..22:31
kristianpaulnot so i'm confused22:31
ArtyomLet's forget for some time about data-bits... You can forget about them. Let's speak only about tracking.22:32
ArtyomTracking consists of two parts22:32
ArtyomFor simple receivers (like ours) these parts are independent22:33
ArtyomOne part of tracking is to follow carrier22:33
ArtyomThis is done by adjasting carrier_NCO_frequency22:33
ArtyomWe take output from correlator (two PROMPT outputs) and calculate the difference in frequency (or also phase) between our local NCO_carrier and the received signal22:35
ArtyomAccording to this difference we calculate new frequency for carrier_nco22:36
ArtyomDo you agree with this?22:36
kristianpaulyes, i think :)22:37
ArtyomSo this is how carrier tracking is working.22:38
ArtyomWe always have to control carrier because satellite is always moving with some acceleration so there is always some change in doppler22:39
ArtyomAnd now the same explanation about code-tracking22:39
ArtyomWe have to track code because of the same reason: satellite is always moving!22:40
ArtyomBecause the change in chip rate due to doppler is very little for code-frequency (but it exists!) we have to control code position very preciously22:42
ArtyomThis precious control can not be done by slew rate (because slew allows us only to shit for half a chip - too much for our task)22:42
kristianpaulthe code position is the same or related the edge of the bit you commented before?22:43
kristianpaulindeed half chip is too much22:43
Artyomyou should not split "bit edges' and "chip rate"22:44
Artyombits length depends on the current chip rate22:45
Artyomthe idea of code tracking is absolutely the same as for carrier tracking22:50
Artyomthe only difference is how to calculate difference between localy generated signal and satellite signal22:51
kristianpaulthat difference is calculate by osgps right?22:52
kristianpaulif is true, is it fast enought?22:52
Artyomyes the difference is calculated by osgps22:52
Artyomyes it's fast22:53
kristianpauli had seen your code mod_osgps a bit. at least is more clear than reading osgps with no folders ;)22:55
Artyomoh, thanks...22:56
ArtyomI also changed many things. I tryied to make them simple and effective22:56
Artyomit's time to sleep for me...22:59
Artyomgn ;)23:00
kristianpaulbye !23:00
kristianpaulThanks a lor for your support !23:00
--- Sat Sep 24 201100:00

Generated by irclog2html.py 2.9.2 by Marius Gedminas - find it at mg.pov.lt!