<stefan_schmidt>
wpwrak: reset should be ok now (can't verify) and I'm now working on the actual SPI transfers
<qi-bot>
[commit] Werner Almesberger: spi_atben: correct interrupt cleanup order when removing the driver (ben-wpan) http://qi-hw.com/p/qi-kernel/d8bd10a
<wpwrak>
(spi xfers) great
<wpwrak>
maybe unbinding the driver before rmmod helps:
<wpwrak>
cd /sys/bus/spi/drivers/at86rf230
<wpwrak>
echo spi*.0 >unbind
<wpwrak>
at least with this, i get only one spi master and one reset after re-insmodding
<stefan_schmidt>
wpwrak: cool, let me try
<wpwrak>
the platform device is still around, though. hmm.
<stefan_schmidt>
nope, does not help
<stefan_schmidt>
back to good old reboot here.
<stefan_schmidt>
At least I'm able to test stuff that way :)
<stefan_schmidt>
talking about it.... reboot time :)
<kristianpaul>
(tempest) interesting concept, i wonder if a 1 bit ADC/DAC can implemented using a UBB and some glue logic
<wpwrak>
kristianpaul: why stop at 1 bit if you have 4 of them ? ;-)
<kristianpaul>
ya, but that will require a ADC chip, for the one bit i was thinking in a flip-flop
<wpwrak>
how many DAC chips do you see on ubb-vga ? ;-)
<wpwrak>
ADC would be admittedly trickier
<kristianpaul>
i never said ADC chip :)
<kristianpaul>
well glue logic plus glue resistors :p
<wpwrak>
no glue needed. just the Rs ;-)
<kristianpaul>
lol
<rjeffries>
the only (slight) bummer is one must choose to EITHER do VGA OR 802.15.4 OR AM radio transmitter.
<kristianpaul>
for now i have UBB's so the choice is already set ;)
<kristianpaul>
ah, there is 433Mhz too using rfm12b modules rjeffries
<kristianpaul>
i really enjoy my off line nanonote, be disconnected is good from time to time
<wpwrak>
rjeffries: in the 1970ies, the avantgarde were the DJs. 20 years later, the VJs. 20 years later again, the UBB-Jockeys ;-)
<rjeffries>
kristianpaul you are correct. wonder wht happened with the Hope RF module project
<rjeffries>
if there is ever a next Nanonote, in addition to 802.15.4 being built-in, I'd vote to also have VGA (prolly using a chip rather that wpwrak's magic
<kristianpaul>
wpwrak:Â Â you wizard !! :)
<kristianpaul>
i knew it xD
<zear>
rjeffries, the hardware would then need to support running programs at a decent framerate in higher res
<rjeffries>
maybe. but the use case for me is simply a larger screen. not watching videos.
<zear>
rjeffries, well, sdl apps will also be very laggy
<rjeffries>
any follow-on to Ben will use a considerably faster cpu. amd will support much better memory bandwidth
<zear>
rjeffries, unless you don't mind running 320x240 on a TV screen
<zear>
then phisically you have a larger screen, but the same resolution
<kristianpaul>
rjeffries: i gues you aware of last 4770 ingenic chip ;)
<kristianpaul>
man i want a laptop with that chip for sure :D
<rjeffries>
I tried to gey data sheet on 4770 but ingenic site seemed to time out
<stefan_schmidt>
wpwrak: your spi classifier works here now. Time for me to get the spi read and write functions running
<rjeffries>
zear i expect a nanonote 2.0 will support somewhat greater resolution on the lcd, but probably nothing radically better
<kristianpaul>
wpwrak: you have some guide or code sniped about implementing a NCO in C? :-)
<zear>
rjeffries, 2x the current res would make a lot of X11 apps usable
<rjeffries>
has 4770 been seen in the wild? we know there are tablets based on 4760
<kristianpaul>
i dont think so, seems kinda new
<rjeffries>
oh 64x480 would be sweet yes
<zear>
rjeffries, then just add a touchscreen and you have tons of software perfect for the nanonote
<rjeffries>
640x480
<rjeffries>
capacitive touch screen technolgy is a commodity now
<wpwrak>
rjeffries: you shuold be able to have VGA with the ben already. just make an 8 bit analog RGB mixer and program the LCD controller accordingly
<kristianpaul>
wpwrak: (flip flop) some resistors and transitors, and thats it the, 1 bit ADC
<rjeffries>
wpwrak pardon my ignorance, but what would be used as i/o with ben?
<wpwrak>
stefan_schmidt: (read 1) nice :)
<rjeffries>
seen tuxbrain
<wpwrak>
kristianpaul: while (1) { int n; for (n = 0; n != period; n++); asm(""); }Â Â ? ;-)
<kristianpaul>
wpwrak: okay,but the asm part what for?
<kristianpaul>
i mean asm? is not all about C and pointers?
<wpwrak>
rjeffries: the ben's SoC can do up to 800x600. considering that ubb-vga manages 1024x768 with semi-reasonable timing, i don't think 800x600 would be too difficult to get right.
<rjeffries>
that will be some VERY compact machine code;(
<wpwrak>
kristianpaul: gcc -O9 -S whatever.c  ;-)
<wpwrak>
kristianpaul: or what exactly was your question ?
<zear>
wpwrak, do the -O* past 3 have any actual effect?
<wpwrak>
zear: wrong question :) the right question would be "do i read all the gcc release notes" ?
<zear>
wpwrak, no i don't, but i remember reading somewhere that 3 is the limit ;)
<wpwrak>
kristianpaul: (1 bit adc) hmm, what's the flip-flop doing ?
<wpwrak>
rjeffries: (vga i/o) you'd have to either solder to the test points under the battery, or make an FPC and connect instead of the LCM.
<wpwrak>
rjeffries: if you want a fancy solution, make a PCB with pogo pins that touches the test points.
<kristianpaul>
but actually seems more esier for 1 bit using digital logic..
<wpwrak>
kristianpaul: (adc) at looks more like a 16 bit adc :)
<kristianpaul>
wpwrak: no no, there is no 16 bits anywhere
<wpwrak>
kristianpaul: (demodulator in c) you should visit your friends at the university. they ought to have some fun books in the EE section. books that go well beyond my head ;-)
<kristianpaul>
hehe
<wpwrak>
kristianpaul: (16 bit) "integrator (counter)" and "16 bits/millisecond"
<kristianpaul>
wpwrak: true, but not the adc !
<wpwrak>
ah ! you mean the "SAMPLER" "D-FF" bit
<kristianpaul>
since 10 minutes ago, yes
<kristianpaul>
still need to improve comunication skills
<wpwrak>
concept looks a bit odd. it may be more a synchronizer. you don't need that if you just want to sample analog data to memory
<wpwrak>
stefan_schmidt: maybe this helps. the sequence would be: insmod ....; unbind the at86rf230; rmmod spi_atben
<wpwrak>
stefan_schmidt: if you don't unbind, the rmmod will still succeed, with disastrous effects
<stefan_schmidt>
wpwrak: ok, thanks
<stefan_schmidt>
wpwrak: its already past 3am here. Will work on this more tomorrow.
<stefan_schmidt>
wpwrak: At least I'm some good steps forward now. SPI read and write should work tomorrow
<stefan_schmidt>
After that there is only IRQ left
<wpwrak>
kewl. you'll be bored most of the week then ;-)
<stefan_schmidt>
wpwrak: heh
<stefan_schmidt>
wpwrak: how long are you at FISL?
<wpwrak>
i should be back home sunday late afternoon, airlines and volcano willing
<stefan_schmidt>
ok
<kristianpaul>
brazil, how is you portun~ol going? ;)
<stefan_schmidt>
hopes wpwrak has some little time left tomorrow for atusb and the parcel arrives in time :)
<wpwrak>
kristianpaul: when i talk to them in spanish, and they answer in portugese, that's usually sufficient for taxis or to buy some beer :)
<kristianpaul>
sound good :)
<stefan_schmidt>
night all
<kristianpaul>
n8
<kristianpaul>
"Digital Signal Processing Techniques for Radio Amateurs, Theoretical Part"
<kristianpaul>
wpwrak: i dont have too much friends at university..
<kristianpaul>
"Global Positioning by Satellite" P. Mattos
<wolfspraul>
wpwrak: did you get your atben/atusb in time?
<wpwrak>
wolfspraul: i didn't get them yet. but they should be delivered tomorrow. that would be just in time. within less than 24 hours of me heading to the airport :)
<wolfspraul>
ouch
<wpwrak>
wolfspraul: any news about yours ?
<wolfspraul>
nah
<wolfspraul>
just fired an email to the headquarters, cc you :-)
<wolfspraul>
on the other hand someone just rang Adam's bell...
<wolfspraul>
the plot is thickening
<wpwrak>
:)
<wolfspraul>
read the backlog - you forgot a major accomplishment of mine - SAKC!
<wolfspraul>
:-)
<wpwrak>
yeah ! and AVT2 too
<wolfspraul>
that was a beautiful little project, if the software effort would not have broken down almost immediately after the run, it could help us quite a big going forward...
<wolfspraul>
sure there's more stuff
<wolfspraul>
was wikireader in that list?
<wpwrak>
of course, nothing that could compare with the experience gained from 1 year of hard thinking ;-)
<wpwrak>
oh, right. that one too
<wolfspraul>
i've seen that 'CPU on a DIMM' idea last at this rfid project that is so totally screwed up that nobody knows how to rescue it
<wolfspraul>
let me see what happened there since last time I looked :-)
<DocScrutinizer>
half the wiki - the better half - on openmoko and on maemo is made by him
<kristianpaul>
actually speedevil gave me that link again in #hihgaltitude
<kristianpaul>
oh
<kristianpaul>
high*
<DocScrutinizer>
yeah, he's doing balloon with methane
<DocScrutinizer>
living somewhere rural where next building seems 5 miles away :-)
<kristianpaul>
cool :-)
<DocScrutinizer>
kinda reminds me on our modem hacker dspaaron
<kristianpaul>
and he has internet, something i can achieve again if tried that..
<kristianpaul>
s/can/cant
<DocScrutinizer>
well, maybe not next building but next post office is 5 miles away ;-D
<kristianpaul>
haha
<DocScrutinizer>
actually the best part in hanging out on irc in dozens of chan is you get to know some smart people after a few years ;-)
<DocScrutinizer>
WTF!! [Notice] -NickServ- 19 channel access matches for the nickname jOERG_rw
<DocScrutinizer>
I need to drop responsibilities...
<DocScrutinizer>
and ML
<DocScrutinizer>
idly wonders how to properly close down a chan for good
<DocScrutinizer>
or if that's even feasible, desirable, and of any benefit
<DocScrutinizer>
good, server chanlist not even shows #openmoko.de, #opie.de etc
<DocScrutinizer>
there's still an #opie chan though :-o
<wpwrak>
rsharpe: (device before probe) such as platform_device_register ? i do that before calling platform_driver_probe
<wpwrak>
rsharpe: it appears that the problem is now that the at86rf230 doesn't get removed when removing the underlying SPI master. if i manually unbind it first and only then rmmod spi_atben, things appear to be okay
<wpwrak>
wolfspraul: (boards arrived) great ! soon, you'll be able to play ! ;-)
<wolfspraul>
yeah, definitely
<wolfspraul>
I demoed NanoNote and M1 to 2 people from Intel Labs today, ben-wpan would have been a nice addition of coolness factor...
<wolfspraul>
use 2 Ben, and start the music on Ben A from Ben B, connected with ben-wpan. just for the heck of it...
<wpwrak>
heh :)
<wpwrak>
just don't try to stream the music over wpan :)
<wpwrak>
until we have proper csma-ca (an "upstream" issue), bulk data transfers quickly end up in both stations jamming each other. they'll recover nicely enough once you make one stop, but ...
<jow_laptop>
it scans the log for *** ERROR or something
<jow_laptop>
that is normal in some compile outputs
<jow_laptop>
(e.g. ignored failed make targets)
<kyak>
would it be better to scan for "ERROR: package .* failed to build"?
<jow_laptop>
maybe
<kyak>
btw, i wonder why "kernel" package always results in error?
<kyak>
ok, there really is an error..
<wpwrak>
kyak: have your wpan boards arrived yet ?
<kyak>
wpwrak: if everything goes fine, i'll have it tomorrow
<kyak>
i'm not sure yet what would be the first thing to do with it :) perhaps i'll try to reproduce the dirtpan hack and start using some network applications
<wpwrak>
kyak: sounds like a good idea :) you'll notice that, if you have bulk traffic, TCP will hang. that's because there's no collision detection yet, so at some point both sides just jam each other.
<kyak>
yeah, i read earlier today
<wpwrak>
kyak: other tools to try are atrf-rssi -g and atrf-txrf -P. the latter allows you to find out how far the signal can travel.
<kyak>
i think, if there is no fix for it, it can be workarounded by traffic shaping
<wpwrak>
kyak: for these tools, the kernel driver must be absent/disabled. otherwise, kernel and tool will fight for access, usually both losing
<wpwrak>
(fix) naw, that's something quite low-level. the chip can do it. we just haven't enabled it yet.
<kyak>
yeah, that's a cool thing to explore.. Whether i can still use Ben in a bathroom :)
<wpwrak>
kyak: i think that will be an extremely common usage scenario ;-)
<kyak>
right.. so it will also be a himudity testing for atben
<wpwrak>
and the ben ;-)
<kyak>
yeah, this, too
<kyak>
is there an accepted solution for casing?
<kyak>
or is it not clear yet?
<wpwrak>
kyak: still unclear. i don't even know how well or bad the sugrus worked in the end (after curing)
<kyak>
wpwrak: do you mean the production samples?
<wpwrak>
kyak: tuxbrain wrapped one atusb in sugru, then tested it. he said rf performance suffered a lot. but the sugru was still wet at that time. he didn't report back yet if it got better after letting the sugru dry (takes ~24 hours)
<kyak>
ah, i see
<kyak>
i was thinking maybe covering it with lacquer wouldn't do a lot of harm (if it isn't already covered during production)
<wpwrak>
lacquer may be a possibility. that adds very little material.
<wpwrak>
the board is convered with solder stop, but all the pins and such are exposed
<kristianpaul>
Is it posible that a corrupted uboot dont allow the nanonote to power on by the power button, and the only power it on seens to be when you connect the battery for first time?
<wpwrak>
seems somewhat unlikely, but it's hard to tell what a bad u-boot could or couldn't do
<kristianpaul>
he ;)
<kristianpaul>
i think the bad is the user, liers !!
<wpwrak>
yeah. that's what all the people from support say ;-)
<methril_work>
most of the time it's users fault :)
<kristianpaul>
well, just trying to a friend in the town use his nanonote and stop it from taking dusts...
<kristianpaul>
btw wpwrak  you have a mm1 already sint?
<kristianpaul>
isnt*
<kristianpaul>
s/to/that
<kristianpaul>
kyak: there is an official image with allegro srpite editor, alex4 and Allegro demo?
<kyak>
kristianpaul: official - no, but there is a "nightly" image
<kristianpaul>
i alrady did some hacks, but still work to do
<dvdk>
why does everybody around here have an accuont to upload to qi-hw/people?
<dvdk>
kristianpaul: many functions, which one to invoke?
<kristianpaul>
dvdk: init.m
<kristianpaul>
ah i forgot some additional files
<kristianpaul>
minute
<dvdk>
ok, let's see whether the latest build of octave has any problems
<kristianpaul>
dvdk: ( upload to qi-hw/people) may be because our home made servers dont have enought bandwicht or storage avaliable?
<kristianpaul>
wich is at least my personal case
<kristianpaul>
this code was made for matlab
<dvdk>
wpwrak: looked at your example.  this looks perfectly usable to me.  cool.  just need to think about what i can do with the 802.15.4 feature :)
<dvdk>
kristianpaul: yeah but /me doesn't have an account.  even hosting some source-code snaphsots (gforth) that is used by the our firmware on my dyndns.
<dvdk>
kristianpaul: you mean it's not working because it's written for matlab?  not because the nanonote's octave is broken?
<kristianpaul>
dvdk: i'll remenber that to wolfgang, but sure he never asked you?..
<dvdk>
btw plotAcquisition.m: need to double-check my changes, maybe i broke something (don't know how it would look when correct)
<dvdk>
now trying to do more sth more relaxing for the rest of the evening :)
<kristianpaul>
what can i see you disablet the partially the plot
<kristianpaul>
right?
<dvdk>
kristianpaul: no, just fixed the syntax to correspond to octave (the 'handle' stuff isn't fully supported)
<kristianpaul>
hum
<dvdk>
and hold(h, 'on') triggers an octave bug here
<dvdk>
so without handle sohuld be ok , too
<kristianpaul>
hAxes=gca() ?
<dvdk>
see the manual.  just a guess. Â
<dvdk>
'get current axes'
<dvdk>
seems to be ok. Â
<dvdk>
also look at  /usr/share/octave/3.2.4/m/plot/hold.m
<dvdk>
octave tries to emulate matlab syntax, but it seems to be mostly untested code.
<dvdk>
just go for the std octave syntax instead
<dvdk>
going to be online again tomorrow
<dvdk>
good night
<kristianpaul>
nite
<kristianpaul>
thanks for the help
<kristianpaul>
(be mostly untested code) :D
<dvdk>
kristianpaul: regarding the overlap, just convert the sample-number into a "relative window size" i.e. 'overlap_samples / windowsize_samles' should be ok
<dvdk>
(just widely guessing )
<dvdk>
cu
<stefan_schmidt>
wpwrak: I now get the right requests and answers in the spi transfer function but rf230 is unhappy while waiting for it:
<stefan_schmidt>
wpwrak: I need to clean up my local mess in some sane commits. Will do this right after the dentist appointment tomorrow
<stefan_schmidt>
wpwrak: (scheduling while atomic) Thinking about it rf230 may hold a spinlock and usb_control_msg is not safe for this
<stefan_schmidt>
hmm, it holds a mutex lock around the spi communication
<wpwrak>
stefan_schmidt: for the registers, why not use the ones defined in  #include "../ieee802154/at86rf230.h"  ?
<wpwrak>
oh, you're doing synchronous transfers. interesting idea ;-)
<wpwrak>
naw, they should be async
<wpwrak>
so you call completion when the URB is returned to you
<stefan_schmidt>
wpwrak: I took what was there from the usb skeleton driver I got
<wpwrak>
sync is messy and inefficient
<stefan_schmidt>
And it worked fine for the other parts. Yeah, I know without SPI involved, directly from the ATMega no lock
<stefan_schmidt>
I see your point
<stefan_schmidt>
need to rework using async urbs
<wpwrak>
if you really want to go sync, then you'd have to add yet another worker, etc.
<wpwrak>
async is a lot cleaner than sync. also, the whole at86rf230 driver should be async, too. also the stack above it.
<stefan_schmidt>
*sigh*
<wpwrak>
there should be countless examples to pick from :)
<stefan_schmidt>
ok, some sleep now, early dentist appointment tomorrow, clean up my mess and push out current state, rewrite the USB side to be async using submit_urb and friends
<stefan_schmidt>
wpwrak: picking the right is difficult :)
<wpwrak>
if you hack all night, then you'll be tired and numb tomorrow and won't feel so bad in the torture chamber ;-)
<stefan_schmidt>
On the positive side is that if it takes longer and longer I'm even more happy when its done :)
<wpwrak>
excellent philosophy ! ;-)
<stefan_schmidt>
wpwrak: I could ask the dentist if he has a problem with me sleeping while he does his work ;)
<stefan_schmidt>
wpwrak: sleeping now. I wish you a unproblematic flight
<wpwrak>
btw, the conflict with sleeping is probably with something inside spi.c
<wpwrak>
at86rf230.c now only has the mutex left. the spinlock is already dead :)
<stefan_schmidt>
wpwrak: will keep you informed if you have a chance to connect to the internet from FISL
<wpwrak>
kewl. sweet dreams ! :)
<stefan_schmidt>
wpwrak: hmm, maybe a spinlock in spi_sync() itself