**** BEGIN LOGGING AT Mon Sep 10 02:59:58 2012 Sep 10 07:49:41 ~seen zeq Sep 10 07:49:42 zeq <~s_j_newbu@2a01:348:1e3:1:e6ec:10ff:fe9a:d418> was last seen on IRC in channel #maemo-ssu, 6d 14h 16m 45s ago, saying: 'I guess that could work'. Sep 10 08:14:55 ~seen your butt Sep 10 08:14:57 vi_: i haven't seen 'your butt' Sep 10 08:15:20 vi_: hmm, strange Sep 10 08:15:21 ~butt Sep 10 08:15:22 butt is, like, not to be confused with but Sep 10 08:15:35 ~music Sep 10 08:15:36 i heard music is essential for hacking -- especially calming music for debugging so you don't throw the damn machine out the nearest window Available from magnatune, a company that isn't evil. Sep 10 08:17:18 ~seen hugh gass Sep 10 08:17:18 vi_: i haven't seen 'hugh gass' Sep 10 08:17:50 freemangordon: I know, I am exposing my butt all the time. Sep 10 08:19:29 vi_: yeah, that's why it seems strange infobot has never seen it Sep 10 08:20:11 freemangordon: I am changing over to embedded systems role at my job today. Sep 10 08:20:21 freemangordon: After 2 years I am starting C again. Sep 10 08:20:29 wow, sounds great Sep 10 08:20:30 The project I am taking over is... Sep 10 08:20:36 made of nightmares Sep 10 08:21:00 well, saying it is written in C should be enough :D Sep 10 08:21:10 There have been 6 people working on this for the past 8 years. Sep 10 08:21:21 The last 2 only lasted 1 year each. Sep 10 08:21:26 yeah, I know what you mean Sep 10 08:21:39 They did not know C and learned 'on the job'. Sep 10 08:21:47 This firmware is an abomination. Sep 10 08:21:54 I can bet the code is like spaghetti Sep 10 08:22:12 freemangordon: At least spaghetti is not tied end to end. Sep 10 08:22:19 hehe Sep 10 08:22:23 rewrite it in golang ;) Sep 10 08:22:41 They only started including 'version' numbers inside the code in the last year. Sep 10 08:22:57 Wizzup: not always possible, imagine you have a deadline ;) Sep 10 08:23:05 hehe Sep 10 08:23:05 The guy added it to THE END of 'print.c' Sep 10 08:23:15 LOL Sep 10 08:23:27 freemangordon: I did not lol. :| Sep 10 08:23:47 why not lol, existence is but a bad joke. Sep 10 08:24:07 vi_: is the situation with developers that hard where you are? Sep 10 08:24:39 freemangordon: No, my company is just so fucking stupid and cheap. Sep 10 08:24:49 aah Sep 10 08:25:03 For example the goon that just left was getting paid 25% more than me. Sep 10 08:25:24 They are expecting me to take over his job on my current salary. Sep 10 08:25:38 :( Sep 10 08:25:50 I have not had a pay rise in 3 years. Sep 10 08:26:03 In fact I have taken a pay cut if you consider inflation. Sep 10 08:26:13 vi_: well, it is economic crisys after all Sep 10 08:26:36 For skilled people it is not so much. Sep 10 08:28:12 I shall use this opportunnity to get back into embedded systems and coding (I have not really done any for 3 years) and then find a new job in a couple of months. Fuck 'em. Sep 10 08:30:03 meh, you should able to get a decent pay somewhere if you don't mind loosening your ideals (say, android or ios coding) Sep 10 08:30:50 Wizzup: I am more about embedded systems as oppose to appz development. Sep 10 08:31:09 I understood that Sep 10 08:34:18 vi_: how's your networking skills? Sep 10 08:35:10 teotwaki: With people or embedded systems? Sep 10 08:35:10 vi_: also, where are you based and do you mind travelling? Sep 10 08:35:19 computer-wise Sep 10 08:35:22 teotwaki: Edinburgh Sep 10 08:35:58 teotwaki: (scotland) Sep 10 08:36:03 (uk) Sep 10 08:36:06 Yes, I know where the brugh is Sep 10 08:36:30 Why, do you know somone who is hiring? Sep 10 08:36:31 vi_: and, do you mind travelling? Sep 10 08:36:53 depends what exactly you mean by travelling. Sep 10 08:37:04 I.e a long commute or relocating country? Sep 10 08:37:07 going to the other side of the planet for customer meetings. Sep 10 08:37:18 teotwaki: that sounds awesome. Sep 10 08:37:23 not relocation, just regular travels to meet up with the team. Sep 10 08:37:37 how's your multithreading skills? Sep 10 08:38:37 non-existant. I have not done any real coding for ~3 years. Back then it was firmware for 8051 microcontrollers. Sep 10 08:39:04 Now it is firmware for freescale 56F300 Sep 10 08:40:13 Well, if embedded is what you like (set top boxes, tvs, mobiles), you may want to check out ZMQ Sep 10 08:40:29 The company that powers ZMQ is looking for solid recruits Sep 10 08:40:48 Young, available (as in, not tied down by girlfriend/wife), ready to work stupid hours. Sep 10 08:41:02 But the pay is good, and you get to become a public figure ;) Sep 10 08:41:18 teotwaki: interesting... Sep 10 08:41:23 so they want slaves.. Sep 10 08:41:44 teotwaki: Thank you for the tip. Sep 10 08:42:29 Luke-Jr: that's one way of looking at it, but seeing they'd probably double or triple my salary, I'm OK with that. Sep 10 08:42:48 And I am *very* well paid for my geographical area. Sep 10 08:43:34 I'm relatively underpaid, because I weigh pay with other important factors <.< Sep 10 08:43:44 like working from home, not signing NDAs, etc Sep 10 08:44:50 In this project they have run out of flash memory to hold the code. Sep 10 08:45:03 The flash memory is 64k. Sep 10 08:45:16 ☺ Sep 10 08:45:21 This is a simple gas measuring device. Sep 10 08:45:33 Yeah, I work from home two or three days a week, I don't have any NDAs, I get 7 weeks of (paid) vacation, I'm a shareholder, and I'm currently negotiating to start my own company within the holding. Sep 10 08:45:35 with 4 buttons and a tiny monochrome LCD display. Sep 10 08:45:52 vi_: let me guess, they compile with -O6? Sep 10 08:45:58 teotwaki: I like where you are at, how old are you? Sep 10 08:46:03 I'm 26. Sep 10 08:46:06 teotwaki: I do not even know yet. Sep 10 08:46:13 teotwaki: FUCK. Sep 10 08:46:19 teotwaki: 26????? Sep 10 08:46:27 Or 25? Sep 10 08:46:29 teotwaki: FML. Sep 10 08:46:30 No, 26. Sep 10 08:47:00 vi_: why, how old are you? Sep 10 08:47:13 and if it is not to much, who do you work for? Sep 10 08:47:34 teotwaki: I am 27. I have a graduate salary and a rusty car. Sep 10 08:48:41 A small company in France, Interact-IV. The website is shite---we don't sell things directly, so we don't need to be known; we have other companies (massive network operators in Europe) who get the clients, and give 'em to us. Sep 10 08:49:07 And You GET TO LIVE IN FRANCE??? Sep 10 08:49:14 The food! Sep 10 08:49:18 The hot chicks! Sep 10 08:49:22 90% of our business is "white label", or whatever the terminology is in English. Sep 10 08:49:22 The language! Sep 10 08:49:34 Well, I'm hoping to leave pretty soon, frankly. Sep 10 08:49:50 teotwaki: Germany, right? Sep 10 08:50:24 I spent my adolescence here, came back after two years in London, and some time in Australia, the weather's awesome, and the produce is amazing, but the people are just stupid. Sep 10 08:50:40 No, probably London again for a year or two, then Sweden or Canada. Sep 10 08:50:56 So this 64k firmware has a whole USB subsystem compiled into it. Sep 10 08:51:08 ...there is no USB interface in the PCB. Sep 10 08:51:12 SO Sep 10 08:51:13 MUCH Sep 10 08:51:14 FAIL. Sep 10 08:51:37 Sweden & Canada are appealing, Sep 10 08:51:44 London is apalling. Sep 10 08:51:54 fuck my spelling this morning. Sep 10 08:52:12 vi_: isn't there a JTAG-to-USB interface? Sep 10 08:52:34 London is actually seriously cool, I love that place Sep 10 08:52:54 Take the train for 10 minutes, and you cycle your heart out, take the train in the other direction for 20 minutes, and you're at work. Sep 10 08:53:07 Yes, but why would you need USB in the firmware for it? Sep 10 08:53:25 I don't know, but maybe a physical USB thingie isn't required to use USB? Sep 10 08:53:25 Also, no one has had the debugger hooked up in about 2 years. Sep 10 08:54:18 You can fly to literally any place in the world from London, except for maybe London itself, you can even take the train to Belgium/Paris, so holidays and visiting friends/family is no big deal. Sep 10 08:54:19 london is horrible Sep 10 08:54:45 teotwaki: I meant the project, the device has no USB on it. It does not use the USB hardware of the 56F300, yet the code for it is included in the firmware. Sep 10 08:54:53 jacekowski: I can confirm this. Sep 10 08:54:53 teotwaki: you can't fly to paris from london Sep 10 08:54:56 vi_: ah, ok. Sep 10 08:55:05 teotwaki: you have to take the train Sep 10 08:55:21 jacekowski: I don't think that's correct Sep 10 08:55:32 teotwaki: eurostar takes 2h to get to paris Sep 10 08:55:40 London: filthy, rotten to the core and full of c*nts. Sep 10 08:55:41 teotwaki: with check-in times of like 10minutes Sep 10 08:55:54 teotwaki: plane takes about the same and check in times are much longer Sep 10 08:56:14 teotwaki: so airlines couldn't compete with eurostar on that route Sep 10 08:56:16 Eurostar is actually more of a checkin of 30-40 minutes, but ok :) Sep 10 08:56:36 jacekowski: Air France 1180 Sep 10 08:56:45 teotwaki: i've traveled on eurostar few times and never had any problems Sep 10 08:57:06 teotwaki: i got there like 20 minutes before train was due to leave and i managed to get something to eat in that time Sep 10 08:58:03 Yes, check in *can* be easy, but I could tell you the same story flying out from Tunisia, or even LHR :) Sep 10 08:58:49 And for the record, the plural of anecdotes isn't data. Sep 10 08:59:00 it always takes a lot longer to check in on the airport Sep 10 08:59:05 + you have weight limits Sep 10 08:59:15 and with eurostar you end up in middle of paris Sep 10 08:59:48 CDG airport is quite far from it Sep 10 09:00:38 Yes yes, you're right, disregard any statement I might provide with new constraints and rules, just so you can keep disregarding my facts :) Sep 10 09:01:01 I said "You can fly to literally any place in the world from London, except for maybe London itself, you can even take the train to Belgium/Paris" Sep 10 09:01:08 well yeah Sep 10 09:01:16 and somehow this fucktard is arguing with me that "Eurostar is the only way to to Paris" Sep 10 09:01:22 I mean what the fuck, who gives a flying shit. Sep 10 09:01:33 You're arguing exactly the same thing as I am. Sep 10 09:01:42 hmmm Sep 10 09:01:56 well, i'm just saying london is horrible Sep 10 09:02:10 How is arguing for its excellent transport a way to make that point? Sep 10 09:02:57 well, it's not Sep 10 09:03:10 sales droid Sep 10 09:03:31 some of them are anyway Sep 10 09:03:33 i've worked in london and wouldn't say that transport is so good Sep 10 09:04:04 every time i had to take a van into london it was like 2h to get to city from M25 Sep 10 09:06:03 And try doing the same in Paris, or Moscow, or Kiev, or SF, or NY. Sep 10 09:06:17 that's why i don't like big cities Sep 10 09:06:22 But then compare---as a tourist---using the tube in London, Paris, Kiev. Sep 10 09:06:41 abominations like that shouldn't exist Sep 10 09:07:10 Kiev is stupid, nobody speaks English, and you can't read where to get out. The tube is roughly at 250m under ground level, so you spend 10 minutes going down, doooown, dooooooooown. Sep 10 09:07:44 But it's very funny to see some poor dude in a cabin at the bottom of the escalators, looking up, all day, all the time, to press the single big red button in front of him if someone trips. Sep 10 09:09:10 Paris is even more stupid, because most people *could* help you if they wanted to. They just can't be bothered. The indications don't make sense, because they only happen once every 600m, nevermind the fact you just went up and down two escalators, a u-turn, and had to use three tickets because the old ones didn't work anymore. Sep 10 09:11:17 Compare that with London, where every tube train indicates where it's going, and there's maps/boards indicating everywhere where it's come from. There's staff all over the fucking place, in case your ticket doesn't work (you know, that good ol'e right that says that no mechanical authority can hold you prisoner unless there's a human to supervise it---it works!), or in case you need directions. Sep 10 09:37:40 can somone suggest a good online c dictionary? Sep 10 09:37:47 c dictionary? Sep 10 09:38:34 Young, available.... Sep 10 09:38:37 :-S Sep 10 09:40:26 an online reference Sep 10 09:41:54 vi_: of what? Sep 10 09:42:06 C Sep 10 09:42:22 You mean the C Std Lib? Sep 10 09:42:32 Yes. Sep 10 09:42:39 Man pages? Sep 10 09:42:44 LOL Sep 10 09:42:49 no one reads manpages. Sep 10 09:42:53 man stdio Sep 10 09:42:56 there was some site with functions and the examples Sep 10 09:43:16 teotwaki: I have to use a windows 7 workstation Sep 10 09:43:20 vi_: actually people do read man pages Sep 10 09:43:28 wait, what Sep 10 09:43:32 vi_: there are mans online :P Sep 10 09:43:40 "I need a reference" "LOL, no one reads manpages" Sep 10 09:43:47 what has the world come to Sep 10 09:43:49 ZogG_laptop: I do not want to know about your online man search. Sep 10 09:43:49 vi_: http://www.cplusplus.com/reference/clibrary/ Sep 10 09:44:03 http://www.acm.uiuc.edu/webmonkeys/book/c_guide/ Sep 10 09:44:09 vi_: if you don;t want to know — don't ask!!! Sep 10 09:44:17 http://www.gnu.org/software/libc/manual/html_node/index.html Sep 10 09:44:25 http://www.csse.uwa.edu.au/programming/ansic-library.html Sep 10 09:44:45 http://www.kernel.org/doc/man-pages/online/pages/man3/stdio.3.html Sep 10 09:44:59 * DocScrutinizer05 idly poonders which jobs an employer may ask for "young" employees without getting sued for discrimination Sep 10 09:45:08 simple like that, if you ask at public chat, be greatful for any help/reply. otherwise ask privately from who you want to hear Sep 10 09:45:17 -o Sep 10 09:45:30 DocScrutinizer05: sent your CV to jolla? Sep 10 09:45:31 ZogG_laptop: jesus christ ZogG_laptop, it was a joke. Sep 10 09:45:38 meh Sep 10 09:45:41 vi_: oh, =* Sep 10 09:45:42 DocScrutinizer05: because young people usually don't have as much baggage as more "ancient" devs Sep 10 09:45:44 teotwaki: cheers. Sep 10 09:45:52 vi_: still didn't wake up Sep 10 09:45:58 DocScrutinizer05: they don't mind working 16 hours per day, as long as the pay is good Sep 10 09:46:07 baggage==experiance==more money. Sep 10 09:46:28 aaah Sep 10 09:46:29 and they don't mind jumping into a 10 hour work day after a 15 hour flight Sep 10 09:46:35 Basically you have too much exp to join the graduates guild. Sep 10 09:46:47 vi_: no, baggage == holding you down. Sep 10 09:47:10 Relationships: Long-term anchor to keep your feet on the ground, but also daily pain in the ass. Sep 10 09:47:23 teotwaki: I know. Sep 10 09:47:44 vi_: http://www.tutorialspoint.com/ansi_c/c_function_references.htm - i think that can be usefull Sep 10 09:48:22 ZogG_laptop: cheers, Sep 10 09:49:22 i'm writting project now in ansi C for school and i wrote a load of shit code :P Sep 10 09:50:50 found this site while searching for string functions Sep 10 09:53:56 hey Dibblah Sep 10 09:58:31 mother of god. Sep 10 09:59:24 In this code they do not check the I2C (smbus) flag for 'ready', they just tell the processor to wait a millisecond or so. Sep 10 09:59:42 The hammer on regardless. Sep 10 09:59:50 ^then Sep 10 10:00:08 hammertime Sep 10 10:02:41 It is as shitty as using a slow sampling to de-bounce a button. Sep 10 10:06:06 haha Sep 10 10:06:30 coders and hardware Sep 10 10:19:04 One of our direct customers has been harassing me for a couple of months. Sep 10 10:19:33 The issue they have is related to configuration, I've told them on day one. We don't provide support for configuration issues. But the guy insists it's a bug, so I connect to their VPN, and check what's what. Sep 10 10:20:10 I notice that one of the processes has a weird configuration line. We enable to "name" different networks, so that they can route specific types of media streams over different networks. Sep 10 10:20:45 teotwaki: where is punch line? Sep 10 10:21:21 The guy added the configuration Sep 10 10:21:41 I told him "It doesn't look like that network address is the correct one. Could you double check that?" Sep 10 10:21:55 He replied "No, 10.220.34.17 is the correct address for that server" Sep 10 10:22:34 I replied, "I'm sorry, I meant the address field, it points to 10.4.5.0, which isn't a network your server has access to, maybe you copied the file from production, and only updated the server_address field?" Sep 10 10:22:50 He replied, "No, I insist that that address is correct." Sep 10 10:23:38 There's no such network on the server, for clear conscience, I connected to their production servers, and sure enough, their network is 10.4.5.0... Sep 10 10:24:22 So I sent an email with nice red and green colours, just to display what fields I'm talking about, because that numbnuts is incapable of reading my email without visual clues. Sep 10 10:24:35 Anyway, going home, too much construction noise at the office. Sep 10 11:05:53 After upgrading to the latest stable community edition, my usb ethernet connection doesn't work anymore. Why not? Sep 10 11:10:56 fasta: Because, gnomes. Sep 10 11:11:21 vi_: I had to do a manual ifup usb0 Sep 10 11:11:28 vi_: but that wasn't the case before. Sep 10 11:11:38 So, someone changed something. Sep 10 11:11:44 Or gremlins Sep 10 11:11:51 I am going for the former. Sep 10 11:12:01 fasta: autoifupping usb0 isn't something that used to be in cssu Sep 10 11:12:30 kerio: no, but it's something I put in /etc/network/interfaces Sep 10 11:12:58 so put it there again Sep 10 11:13:40 kerio: it's still there, but it just doesn't work now. Sep 10 11:13:46 \_o_/ Sep 10 11:13:57 ask Pali Sep 10 11:15:41 kerio: do you happen to know how I can enable boot messages to show when it is starting? Sep 10 11:15:56 maybe install syslog Sep 10 11:15:59 or rsyslog Sep 10 11:16:00 kerio: because I basically cannot really see sometimes whether it's booting, shutting down again, etc. Sep 10 11:16:05 kerio: no, I mean during boot. Sep 10 11:16:13 kerio: that I can see visual boot messages. Sep 10 11:16:45 kerio: this is a problem when the usb cable is connected, because the usb cable is also used for firmware upgrades. Sep 10 11:17:00 So, sometimes there are delays, etc., so it's not clear as to what it is doing. Sep 10 11:17:11 btw, make sure g_nokia is loaded Sep 10 11:17:15 and not g_file_storage Sep 10 11:28:26 >> kerio: this is a problem when the usb cable is connected, because the usb cable is also used for firmware upgrades.<<< err wut? Sep 10 11:28:41 idk Sep 10 11:29:25 sounds like PK boot issue to me Sep 10 11:30:22 DocScrutinizer05: PK? Sep 10 11:30:29 powerkernel Sep 10 11:30:37 he means KP Sep 10 11:30:40 for kernel-power Sep 10 11:30:52 DocScrutinizer05: I am running stock kernel. Sep 10 11:30:59 I'm not speaking reverse polish notiation Sep 10 11:31:26 fasta: so what's your boot problems then? Sep 10 11:31:46 there are no boot problems known, and for sure CSSU doesn't mess with that Sep 10 11:32:01 DocScrutinizer05: mostly that I don't know whether after pressing the start button whether it is really booting or not. Sep 10 11:32:23 DocScrutinizer05: it would be nice if it would give some indication that yes, it's really booting. Sep 10 11:32:41 CSSU didn't change a thing on that Sep 10 11:33:00 DocScrutinizer05: sure, but that doesn't make it less of a problem. Sep 10 11:33:04 it's always been like "press button, watch indicator LED, waaaaait" Sep 10 11:33:19 DocScrutinizer05: yes, but sometimes the indicatator LED is not fully white. Sep 10 11:33:28 DocScrutinizer05: but I do see the Nokia logo. Sep 10 11:33:52 In that case, it's in some state where AFAIK, you can also do a firmware upgrade. Sep 10 11:33:55 sorry I don't get it what's your problem Sep 10 11:34:37 too fuzzy description, no use in me trying to make a story out of it Sep 10 11:35:17 and assumptions that don't help Sep 10 11:36:13 DocScrutinizer05: never mind then. Perhaps I should make a video out of it, if I care more about the problem. Sep 10 11:36:25 maybe your confusion arises from the fact that device actually boots to a state called act_dead as soon as you apply power to USB Sep 10 11:36:58 btw, act_dead is stupid Sep 10 11:37:10 this can take like 15 seconds, during which the device might not respond to you trying to "boot" it Sep 10 11:38:17 and no, firmware update is absolutely unrelated to this Sep 10 11:39:30 the firmware update state is a transient state in very early boot (boot triggered by plugging in USB, as well as "manual" boot via power button, though on the latter you won't notice it usually) Sep 10 11:40:26 it's the NOLO bootloader that shows NOKIA screen without backlight that handles firmware update. You can keep it in that state when you press and hold "u" key while plugging in USB Sep 10 11:41:15 (unless your battery is too depleted, which will cause NOLO to abort firmware update state and go straight to booting into linux) Sep 10 11:41:34 can we even talk about "firmware" in the n900's case? Sep 10 11:42:08 but all that is irrelevent you you should never mind. It got nothing to do with what you probably think is meant by "booting" Sep 10 11:42:31 kerio: good point, I always thought we can't really Sep 10 11:42:56 but firmware is a rather fuzzy term, poorly defined Sep 10 11:43:52 it had a precise meaning for microcontrolers etc that never can change their own "firmware" during runtime Sep 10 11:44:46 even cpu microcode can be updated runtime now :) Sep 10 11:45:11 jaska: though I'd tend to call THAT firmware still Sep 10 11:45:17 yeah Sep 10 11:46:02 firmware of the CPU core, changed by larger SoC Sep 10 11:46:53 generally firmware isn't self-modifying Sep 10 11:48:09 and usually installed at fab production time, or later during special firmware update process, but generally doesn't alter/change in the times of normal usage in between those special events Sep 10 11:49:29 but I guess that doesn't help to relieve fasta's confusion and grief Sep 10 11:50:27 fasta: a general suggestion: after plugging device to USB, *wait* for 30s before "booting" it Sep 10 11:50:50 DocScrutinizer05: ok (although, I am also not the most patient of people) ;) Sep 10 11:51:22 The act_dead comments above seem to apply. Sep 10 11:51:23 I recall I suffered quite similar confusion in my early N900 times ;-D Sep 10 11:52:10 if you're in a hurry, *first* boot and only *then* plug in USB Sep 10 11:52:33 takes considerably shorter and less patience Sep 10 11:55:08 Is there a way to increase the 32GB storage on the device? Sep 10 11:55:20 (rationale: when booted by power button [I.E. without USB plugged in] the device will enter normal active mode [run level], not act_dead) Sep 10 11:55:45 fasta: yes, plug in a 32GB microSD card ;-) Sep 10 11:56:06 DocScrutinizer05: so there's an open slot still somewhere? Sep 10 11:56:27 err, under battery cover Sep 10 11:56:35 Yes, sure. Sep 10 11:57:40 if you're asking about "internal stoage upgrade": no such thing supported on N900 Sep 10 11:58:40 DocScrutinizer05: I already have 32GB currently. Sep 10 11:58:48 not like on 8GB N9 which allows to swap the 8GB flash chip for a 64GB chip Sep 10 11:58:58 DocScrutinizer05: as such, is there an extra space to get to 64GB? Sep 10 12:00:14 fasta: N900 has 32GB internal "fixed"(soldered) storage (plus the 'core' 256MB NAND storage), and it has a uSD slot that can take uSD-cards up to 32(64?)GB Sep 10 12:00:35 no other options beyond that Sep 10 12:01:26 32GB internal + 32GB uSD = 64GB total storage capacity Sep 10 12:01:55 It appears that even 64GB does work (talk.maemo) Sep 10 12:02:09 That is, a 64GB uSD. Sep 10 12:02:26 hmm, I think I haven't seen 64GB uSD cards yet Sep 10 12:02:36 http://talk.maemo.org/showthread.php?t=72864&page=4 Sep 10 12:03:14 ooh, so they are finally available? Sep 10 12:03:18 nice Sep 10 12:10:09 isn't it puzzling some of you as well sometimes, to look at that tiny uSD and figure it can hold like 100 CD worth of data Sep 10 12:11:48 1TB in a volume the size of a sugar cube :-D Sep 10 12:12:50 for storage moore's law itself seems to follow moore's law Sep 10 12:14:49 "storage capacity increases every two years by a factor that doubles every two years" Sep 10 12:15:11 moore^2 Sep 10 12:29:14 PALI IS BACK Sep 10 12:29:16 WOOT Sep 10 12:30:02 DocScrutinizer05: "ultra" uSDs suck for random read/writes Sep 10 12:30:22 Pali: hi! :-D Sep 10 12:30:32 I'm here and know implicit function theorem :) Sep 10 12:30:33 hi Sep 10 12:30:56 Pali: there's a number of problems with your bq24k module Sep 10 12:31:09 it leaves gaia in a weird state Sep 10 12:31:21 luckily we found a way to reset it without removing the bupbat Sep 10 12:31:22 kerio, first look at: https://gitorious.org/rx51-bme-replacement/bq2415x_charger Sep 10 12:31:29 see if it is fixed or not Sep 10 12:31:53 ooh, Disable charger in none mode Sep 10 12:31:55 could be that Sep 10 12:32:04 I fixed some problems (it reported bad values in sysfs) Sep 10 12:32:59 and hald-addon-bme is working now! Sep 10 12:33:11 neat Sep 10 12:33:17 see https://gitorious.org/rx51-bme-replacement/hald-addon-bme Sep 10 12:33:30 i don't know if i'm a bad enough dude to test it Sep 10 12:33:49 Pali: are you? Sep 10 12:33:58 and now I rewritten dsme-thermalobject-surface to use bq27200 temperature: https://gitorious.org/rx51-bme-replacement/dsme-thermalobject-surface Sep 10 12:34:12 dsme-thermalobject-surface it not tested yet Sep 10 12:34:20 Pali: eventually i got to a weird state where twl thought the charger was connected Sep 10 12:34:36 hald-addon-bme with patched bq2415x_charger working without problem on my n900 Sep 10 12:35:04 it correctly detect when charger is connected and when disconnected Sep 10 12:36:05 and I have something about adcin0 temperature conversion Sep 10 12:36:25 nothing from nokia devs, but from some public bme hearder files Sep 10 12:38:27 search for file bmeisa.h and here is: "unit conversion data for logarithmical channel" and "struct { gain, b, t_ref }" and "unit: 1 Kelvin" Sep 10 12:39:14 I think that this is used for temperature formula, and function will be some logarithm approximation... Sep 10 12:39:25 DocScrutinizer05, see ^^^^ Sep 10 12:40:48 :nod: Sep 10 12:41:07 I created small code which ask libbmeipc for data about temperature and bme returns me: 64 00 34 0D 2A 01 Sep 10 12:41:19 and 64 00 34 0D 2A 01 I found in CAL Sep 10 12:42:36 calvaria show me: -- BME-PMM area -- group 1, element 8: [0000]: 05 03 03 00 64 00 34 0D 2A 01 00 00 00 00 00 00 |....d.4.*.......| Sep 10 12:43:26 I also written small program which ask bme (via bmeipc) for adcin0 value and temperature value (returns in kelvin) Sep 10 12:44:09 and adcin0 value I checking with raw value from /dev/twl-adc... and both are same... Sep 10 12:44:40 sounds like some great success :-) Sep 10 12:45:08 so we can collect more raw values and converted temperatures, we have some hint that convert function can be logarithm and some data from cal (which can be some adjust constant) Sep 10 12:45:28 :nod: Sep 10 12:45:30 I think we can count that conversation formula Sep 10 12:45:46 or at least create some mapping table Sep 10 12:46:28 mapping table with some 8 support points and linear interpolation should be just good enough Sep 10 12:46:57 maybe 16 Sep 10 12:47:23 after all this sensor is pretty inaccurate by hw design Sep 10 12:48:51 and given the purpose of that temperature value for system (or any other possible usecase) we are probably fine with an accuracy of +-3°C, maybe even worse Sep 10 12:52:32 ooh, Pali, have you looked into L3_4 manual and searched for calibration of battery temperature? It *might* have info about that, if there's actually any such thing like fab side calibration of that sensor Sep 10 12:57:28 there is nothing about battery calibration (in L34) Sep 10 13:04:40 Yep, I just checked whole manual for both "temperature" and "NTC" ->nuttin Sep 10 13:04:50 what about "temp"? Sep 10 13:05:49 not the usual language in L3_4 manual: "the battery temp sensor will check the temp at a point..." Sep 10 13:08:22 WTF?!!?!! "no copying of text from this L3_4 manual due to DRM" Sep 10 13:08:43 ~lart ocular Sep 10 13:08:43 * infobot changes ocular's permissions to 0777 and tells the world Sep 10 13:09:13 somehow infobot must have a AI to always pick the matching ~lart Sep 10 13:09:23 ~lart DocScrutinizer05 Sep 10 13:09:24 * infobot blames DocScrutinizer05 for all the evil in the world Sep 10 13:09:29 indeed it does Sep 10 13:09:42 s/it/she/ Sep 10 13:09:42 teotwaki meant: indeed she does Sep 10 13:10:59 anyway only "calibration" mentioned in L3_4 is for ALS Sep 10 13:12:02 nothing (relevant) for "temp" either Sep 10 13:12:12 DocScrutinizer05: duh, you mean okular (the KDE thing) does that? Sep 10 13:12:18 yep Sep 10 13:12:22 retarted Sep 10 13:12:27 indeed Sep 10 13:12:31 or even retarded Sep 10 13:12:45 returded Sep 10 13:12:53 it's like "you can't send this image via bluetooth" on some old nokias Sep 10 13:14:48 Pali: you might want to ask stskeeps about his knowledge and work regarding bmeipc Sep 10 13:15:27 do you really think that he wrote us some info about bme? Sep 10 13:15:34 he investigated quite a bit of that stuff for mer Sep 10 13:15:58 leme see if I can dig up a bookmark in my mess Sep 10 13:16:06 DocScrutinizer05, I have done collecting data program Sep 10 13:16:37 tadzik: my 6120c had that for .mp3s Sep 10 13:16:41 for some stupid-ass reason Sep 10 13:16:44 yeah Sep 10 13:16:57 it was just a stupid check on the file extension, too Sep 10 13:17:02 really? Sep 10 13:17:03 hah Sep 10 13:18:28 source: http://atrey.karlin.mff.cuni.cz/~pali/temp_collect.c arm binary: http://atrey.karlin.mff.cuni.cz/~pali/temp_collect Sep 10 13:19:07 I also looked at meego n900_libbme source and it contains maemo libbmeipc source code Sep 10 13:19:39 http://wiki.maemo.org/Mer/Documentation/BME_Protocol Sep 10 13:19:56 at least library has same exported functions and my programs working with both (closed in maemo and open in meego) without problem on maemo Sep 10 13:20:06 DocScrutinizer05, that info is old Sep 10 13:20:12 and not for maemo5 (n900) Sep 10 13:20:20 so is bme Sep 10 13:20:21 Pali: so does your hald-addon-bme work properly? how much have you tested it' Sep 10 13:20:22 ? Sep 10 13:21:20 kerio, one day - but needs new bq2415x charger driver (from git) and you must disable BME and load bq driver before HAL is starting Sep 10 13:22:10 oh Sep 10 13:22:31 well, i assume the driver is going to be in KP52 Sep 10 13:22:47 and that the replacement package will add the appropriate Sep 10 13:22:49 er Sep 10 13:22:56 *will add the appropriate upstart scripts Sep 10 13:23:24 I will rewrite hal addon to not exit if bq drivers are not loaded Sep 10 13:23:46 so you will be able to load bq modules yourself via xterm Sep 10 13:23:48 Pali: can't you just replace the actual hald-addon-bme binary? Sep 10 13:24:04 no, because my does not working without bq drivers Sep 10 13:24:10 so load those Sep 10 13:24:11 :) Sep 10 13:24:31 also, can't you just make it pretend nothing is happening without the bq drivers? Sep 10 13:24:44 DocScrutinizer05, see: https://meego.gitorious.org/meego-device-adaptation/n900_libbme https://meego.gitorious.org/~matthalm/meego-device-adaptation/matthalms-n900_libbme Sep 10 13:24:45 what starts bme in maemo5? Sep 10 13:24:51 second one is patched for maemo bme Sep 10 13:25:02 kerio, upstart /etc/event.d/ Sep 10 13:25:15 but there are scripts which depends on "start on started bme" Sep 10 13:25:24 so change the bme script Sep 10 13:25:28 so you cannot remove bme package Sep 10 13:25:30 to load the modules Sep 10 13:25:32 sure you can Sep 10 13:25:38 kerio, I will fix it one day Sep 10 13:25:46 it is not simple as you can write! Sep 10 13:25:46 started bme is an upstart thing, it doesn't check for the actual running binary Sep 10 13:26:04 need to test in qemu Sep 10 13:26:22 I already created non working system in qemu because I dpkg -P bme... Sep 10 13:27:18 Pali: thanks Sep 10 13:27:46 Pali: hell, easiest way: ln -s /bin/true /usr/sbin/bme_RX-51 Sep 10 13:27:58 kerio, not Sep 10 13:28:09 /bin/true is not daemon Sep 10 13:28:19 oh good point Sep 10 13:28:20 it will exit immediately Sep 10 13:28:25 and you got MALF Sep 10 13:28:36 * DocScrutinizer05 idly ponders to have a look into other weird packages like opneSuse sysinit5 package that nukes systemd. Might give some ideas how to do such massive changes inb system config Sep 10 13:28:42 kerio, again, it is not simple! Sep 10 13:28:53 DocScrutinizer05: in unix, how do you make a process wait indefinetely? Sep 10 13:29:18 raise signal pause maybe Sep 10 13:29:32 or sleep very big number Sep 10 13:29:40 Pali: does dsme complain if you stop bme? Sep 10 13:30:36 kerio, do not know Sep 10 13:30:55 Pali: i mean, if you initctl stop bme Sep 10 13:31:00 dsme stops checking for it Sep 10 13:31:28 not dsme but upstart Sep 10 13:31:46 upstart is handling bme respawning... Sep 10 13:32:05 kerio, but I will create working solution Sep 10 13:32:15 I have already needed steps in head... Sep 10 13:32:26 but now I need temp data Sep 10 13:32:31 see, http://mg.pov.lt/maemo-irclog/latest.log.html#t2012-09-10T16:18:28 Sep 10 13:33:05 kerio: suspend Sep 10 13:34:36 kerio: >> help suspend suspend: suspend [-f] Suspend shell execution. Suspend the execution of this shell until it receives a SIGCONT signal. Sep 10 13:35:38 DocScrutinizer05: i suppose it would work if you put "suspend" in place of "exec /usr/sbin/bme_RX-51" in /etc/event.d/bme Sep 10 13:36:27 DocScrutinizer05, this is only in bash Sep 10 13:36:43 I don't know upstart too much Sep 10 13:36:45 suspend is bash command not executable Sep 10 13:36:55 Pali: we just make something similar Sep 10 13:37:40 unsigned int sleep(unsigned int); int main() { while (1) sleep(3600); } Sep 10 13:37:40 kill -SIGSTOP $$ Sep 10 13:37:43 I will create upstart script which will be upstart task (so send "bme started") and there will be no respawn because it will be task Sep 10 13:37:54 and this script replace bme Sep 10 13:38:02 Pali: /usr/event.d/bme does other stuff too, though Sep 10 13:38:12 kerio, no Sep 10 13:38:18 it is inly bme stuff Sep 10 13:38:39 Pali: there's some led-related stuff Sep 10 13:39:00 kerio, again, do not spam channel Sep 10 13:39:11 kerio, it is bme related Sep 10 13:39:32 I can't see anybody spamming channel Sep 10 13:39:34 whatever, sorry for trying to be helpful Sep 10 13:39:59 ...the grammar there doesn't sound correct Sep 10 13:40:40 for help, send me temperature data Sep 10 13:41:20 kids, play nice! we're all just hackers trying to improve our beloved baby Sep 10 13:45:29 Pali: for helping you with temperature data, please provide proper instructions how to do that Sep 10 13:46:12 1. download c source and compile it or download arm compiled binary Sep 10 13:46:22 2. run it on n900 (as normal user) Sep 10 13:46:33 3. upload somewhere terminal output Sep 10 13:46:49 CTRL+C terminate program Sep 10 13:46:54 it collecting data infinity Sep 10 13:47:16 output is I think self explaining Sep 10 13:47:19 sounds good, just it's missing any real URLs for download Sep 10 13:47:35 http://mg.pov.lt/maemo-irclog/latest.log.html#t2012-09-10T16:18:28 Sep 10 13:48:08 or simply [2012-09-10 15:18:28] source: http://atrey.karlin.mff.cuni.cz/~pali/temp_collect.c arm binary: http://atrey.karlin.mff.cuni.cz/~pali/temp_collect Sep 10 13:48:18 Pali: http://fpaste.org/0feZ/ Sep 10 13:48:18 ok :-) Sep 10 13:48:36 kerio, Internal Server Error Sep 10 13:48:47 fpaste does that sometimes Sep 10 13:48:49 try again Sep 10 13:49:02 not working... Sep 10 13:49:17 WFM Sep 10 13:49:42 kelvin raw Sep 10 13:49:43 304 54 Sep 10 13:49:45 highlights: 304 54, 305 53 Sep 10 13:49:46 what the fuck Sep 10 13:51:47 even worse Sep 10 13:52:15 DocScrutinizer05, raw value 54 = 304°K Sep 10 13:52:17 304 55 Sep 10 13:52:18 304 54 Sep 10 13:52:20 305 55 Sep 10 13:52:22 303 55 Sep 10 13:52:33 o.O Sep 10 13:52:59 there can be problem that bme not reporting current temperature but some average... Sep 10 13:57:57 DocScrutinizer05: why do we have the same temperature? Sep 10 13:58:04 get out of my house bro Sep 10 13:58:19 kerio: I quoted your pastebin Sep 10 13:59:40 oic Sep 10 14:06:04 is this the channel for nokia n9 help? Sep 10 14:06:17 timmay: #harmattan Sep 10 14:06:18 please read the topic Sep 10 14:07:05 thanks Sep 10 14:32:54 very bad, here are my data (about 1 hour) | sort -u : http://pastebin.com/cwDsTVit Sep 10 14:33:11 kerio, DocScrutinizer05, see ^^^ Sep 10 14:34:51 wat Sep 10 14:35:01 Pali: btw, what are the sources for the numbers? Sep 10 14:35:15 kerio, bme Sep 10 14:35:31 both? Sep 10 14:40:54 yes Sep 10 14:41:15 kerio, I tested and raw (adcin0) value is reported same as directly from kernel Sep 10 14:41:54 so... how does bme calculate the other value? Sep 10 14:52:57 kerio, nobody know what doing bme... Sep 10 14:55:49 Pali: unless you place the N900 in frige eventually, the tables from this tool won't give enough data to conclude anything from them Sep 10 14:56:34 I mean, the Kelvin value just differs by 4° between min and max Sep 10 14:57:20 I see from my logs... Sep 10 14:57:30 but when I ask bme for reading CAL data for adc *temp* channel, I got raw data: 00 64 00 34 0D 2A 01 00 Sep 10 14:58:40 if it is data for logarithm function, then it is: gain=25600=0x6400; b=13312=0x3400; t_ref=10765=0x2A0D Sep 10 15:01:20 Pali: judging from L3_4 there's no such thing like factory calibration data for bat-temp. I rather guess that's some self-adjusting parameters of a PID filter Sep 10 15:02:05 or something completely different, like last known good impedance of battery, or even voltage vs capacity data Sep 10 15:02:09 get someone good with ARM assembler to figure out what's going on Sep 10 15:02:23 DocScrutinizer05, I asked bme devs for formula and they wrote me that formula depends on data from CAL, and they cannot share it with me... Sep 10 15:02:28 we already did, but they gave up ;-P Sep 10 15:03:12 Pali: whatever, do we really care? Sep 10 15:03:52 don't we have other temp monitors in the n900? Sep 10 15:04:09 temp monitors that don't need magic data in CAL Sep 10 15:04:19 if those "bme devels" are so numb they can't even share a general description of what that formula does in plain english Sep 10 15:04:30 kerio: no Sep 10 15:04:44 why do we need a temp monitor anyway? Sep 10 15:04:55 because Sep 10 15:06:04 Pali: I suggest you never mind what those "bme devels" told you Sep 10 15:06:52 DocScrutinizer05: because what? Sep 10 15:07:03 if it's just a matter of "omg shut down everything" then we don't need accuracy Sep 10 15:07:32 could mean everything from "I was too bored to look up what that's all about", to "the whole source got lost and we can't find it anymore" to "this is a verbatim copy of some (C) code used in cmt" Sep 10 15:07:46 kerio: see my post above Sep 10 15:08:51 [2012-09-10 14:47:23] after all this sensor is pretty inaccurate by hw design Sep 10 15:08:53 [2012-09-10 14:48:50] and given the purpose of that temperature value for system (or any other possible usecase) we are probably fine with an accuracy of +-3°C, maybe even worse Sep 10 15:10:31 kerio: Pali: >>charging allowed between -25°C..+50°C<< (L3_4) Sep 10 15:10:42 yes, I saw it Sep 10 15:11:44 just giving a rationale why we "need" that friggin sensor at all Sep 10 15:12:00 what happens if we charge below -25°C? Sep 10 15:12:40 it simply won't charge (with bme) or break the cell (when forcing charging) Sep 10 15:12:51 break the cell? D: Sep 10 15:13:18 man, i sure hope i'll never try to charge while i am IN A FUCKING ICEBERG Sep 10 15:13:31 well, cell manufs aren't vebose on what will happen if you disobey their abs max ratings Sep 10 15:13:53 DocScrutinizer05: over 50°C is riskier, because that's actually kinda believable Sep 10 15:14:03 sure Sep 10 15:14:17 NB that's ambient temp Sep 10 15:14:34 oh, then it's not believable either Sep 10 15:14:56 the insides of my laptop reach 100 Sep 10 15:14:57 er Sep 10 15:15:04 the insides of my laptop reach 100+ °C, when playing minecraft Sep 10 15:15:14 not your battery ;-P Sep 10 15:15:30 i certainly hope so Sep 10 15:15:32 your battery is toast on 100°C Sep 10 15:15:43 my battery is toast already Sep 10 15:15:46 1696 cycles Sep 10 15:15:48 so far Sep 10 15:15:56 and it still survives two or three hours Sep 10 15:16:13 not bad Sep 10 15:16:19 fuck yeah apple Sep 10 15:16:22 :D Sep 10 15:17:22 anyway, place your friggin N900 into fridge (NOT freezer!) next time you do such a test with that listing-proggie Sep 10 15:18:07 a temperature change range of less than 10°C during test will not produce anything useful Sep 10 15:18:47 (well, you even *might* try freezer, shouldn't harm device) Sep 10 15:19:46 water condensation! Sep 10 15:19:49 start logging, place into freezer for 15min, get it out again and continue logging for another 15min Sep 10 15:20:20 jon_y: in a plastic bag? Sep 10 15:20:27 better not Sep 10 15:20:55 DocScrutinizer05, I think I have formula Sep 10 15:20:59 you migt want to wrap it into a cloth, with screen facing down, after freezer Sep 10 15:21:13 log(13312, 10765)*(ADCIN0+256)+7 Sep 10 15:21:29 yay, magic numbers Sep 10 15:21:34 o.O Sep 10 15:21:50 whatever that means Sep 10 15:22:10 log(base, t_ref)*(ADCIN0+gain)+7 Sep 10 15:22:20 base, t_ref and gain is from CAL Sep 10 15:22:20 you see, log is the inverse function of the exponential function Sep 10 15:22:25 sounds like utter BS Sep 10 15:22:39 since log(13312, 10765) is a constant Sep 10 15:22:47 DSME doing real_temp = bme_temp-7 Sep 10 15:23:35 base, t_ref and gain I got via libbmeipc request Sep 10 15:24:54 sorry, I can't map this formula to my EE knowledge about NTC and ADC in any possible way Sep 10 15:25:14 DocScrutinizer05: clearly, you're not as good as the BME devs Sep 10 15:25:16 :P Sep 10 15:25:36 and log(base, t_ref) still is a constant value based on two constant values Sep 10 15:25:40 makes no sense Sep 10 15:25:52 DocScrutinizer05: those are values in CAL Sep 10 15:26:07 kerio: yes, thanks. Seen that Sep 10 15:26:28 maybe they didn't want to store the result for convenience? Sep 10 15:26:38 maybe storing two ints is easier than a float Sep 10 15:26:45 maybe you entered trolling mode again? Sep 10 15:27:02 maybe ;) Sep 10 15:27:09 but seriously, if that crap fits the data... Sep 10 15:27:19 GET DATA! Sep 10 15:27:27 I'M NOT PUTTING MY PHONE IN THE FRIDGE Sep 10 15:27:28 unless nothing to fit to Sep 10 15:27:44 i would have to explain too many things to my parents Sep 10 15:27:45 s/unless/otherwise/ Sep 10 15:27:46 DocScrutinizer05 meant: otherwise nothing to fit to Sep 10 15:28:04 FFS Sep 10 15:28:25 Pali: put your phone in the fridge! Sep 10 15:28:31 :D Sep 10 15:28:38 better is to charge phone Sep 10 15:28:42 sorry, http://atrey.karlin.mff.cuni.cz/~pali/temp_collect Sep 10 15:28:59 when charging temperature is increasing... Sep 10 15:30:27 Pali: what's that ^^^? binary? dpkg? Sep 10 15:30:40 DocScrutinizer05, armel elf Sep 10 15:30:44 k Sep 10 15:30:51 sissies! ;-P Sep 10 15:31:30 $ mad gcc temp_collect.c libbmeipc.so.0 -o temp_collect Sep 10 15:32:20 wtf is mad Sep 10 15:33:16 Pali: btw, you've lost an opportunity to install a rootkit in my phone Sep 10 15:33:38 mad is part of MADDE Sep 10 15:33:40 freemangordon! Sep 10 15:33:44 Pali is here! Sep 10 15:34:04 kerio: mad is what you are, bro. Sep 10 15:34:15 Pali: wtf doesn't piping output of temp_collect work? Sep 10 15:35:45 it does? Sep 10 15:36:00 or maybe http://i.qkme.me/3qujl6.jpg Sep 10 15:36:48 I'm sure *my* N900 will enjoy a short chill-out Sep 10 15:37:09 DocScrutinizer05: does wifi work from inside the fridge? Sep 10 15:37:19 yes, obviously Sep 10 15:37:35 flawless Sep 10 15:37:39 Pali: hi. sorry I didn;t answer your mail, but I was on holiday Sep 10 15:37:48 hi! Sep 10 15:37:49 ok Sep 10 15:38:19 down from 305 52 to 301 58 Sep 10 15:38:26 hald-addon-bme is now working with bq2415x and bq27200 modules Sep 10 15:38:28 Pali: anyway, I was thinking to add BCI driver to monitor backup battery voltage and battery temperature Sep 10 15:38:44 Pali: great, how do you get battery temp? Sep 10 15:38:53 read log Sep 10 15:39:02 Pali: ok Sep 10 15:39:04 :) Sep 10 15:39:14 299 63 Sep 10 15:39:24 wtf? Sep 10 15:39:35 oh lawds Sep 10 15:39:40 nah, wtf == your-formula Sep 10 15:39:53 ok, so it does not working... Sep 10 15:40:19 297 70 Sep 10 15:40:56 295 75 Sep 10 15:41:43 Pali: why not use libmeipc for dsme-thermalobject-surface? Sep 10 15:42:05 or I am missing something Sep 10 15:42:08 293 81 Sep 10 15:42:13 freemangordon, because open libbmeipc is not ready yet Sep 10 15:42:31 Pali: but it only needs temp reading, everything else is in place Sep 10 15:42:32 292 84 Sep 10 15:42:47 291 87 Sep 10 15:43:27 freemangordon, we can always use old unpatched dsme-... it is opensource Sep 10 15:43:30 290 93 Sep 10 15:43:56 Pali: I know, the point was that it is not the only one to use libmeipc IIRC Sep 10 15:44:21 DocScrutinizer05, thanks for data Sep 10 15:44:22 DocScrutinizer05: what has happened with our "conclusion" about thermistor type? Sep 10 15:44:48 288 101 Sep 10 15:45:13 Pali: there is a formula in kernel to calculate battery temp in bci_???? driver Sep 10 15:45:33 it only needs a table specific for the thermistor used Sep 10 15:45:54 freemangordon, show link Sep 10 15:45:56 287 106 Sep 10 15:46:04 and by looking in datasheets it seems that thermistor MIGHT be THP05 Sep 10 15:46:10 Pali: jus a minute Sep 10 15:46:41 285 113 Sep 10 15:47:19 284 119 Sep 10 15:47:57 DocScrutinizer05: we get it Sep 10 15:48:27 it's not the formula that you said it wasn't Sep 10 15:48:44 sure, you get it as long as I post it, since friggin pali's temp_reader doesn't work when piping output to a file or less or whatever Sep 10 15:49:15 I'm delivering proper data for a LUT or binimail formula Sep 10 15:49:47 Pali: http://mxr.maemo.org/fremantle/source/kernel/drivers/power/twl4030_bci_battery.c#521 Sep 10 15:51:08 Pali: we should be able to get LUT by using BME temp readout and calcualted resistance Sep 10 15:52:18 But I was planning a driver who is a subset of twl4030_bci_battery and exports temp and backup battery voltage througe /sys/power/... Sep 10 15:52:48 s/ througe/through/ Sep 10 15:52:48 freemangordon meant: But I was planning a driver who is a subset of twl4030_bci_battery and exports temp and backup battery voltagethrough /sys/power/... Sep 10 15:53:26 sounds good Sep 10 15:54:11 that way libbmeipc will get battery temp from kernel Sep 10 15:54:30 instead or returning hardcoded 35 deg as of now :D Sep 10 15:54:49 I already have formula for converting ADCIN12 (raw battery voltage) to mV Sep 10 15:55:02 disassembled from bsi-read maemo armel binary Sep 10 15:55:10 Pali: the whole formula is in the kernel, look ath the link I posted Sep 10 15:55:36 voltage is not sufficient Sep 10 15:55:49 you need current too :) Sep 10 15:55:56 281 133; 280 138; 279 144; 278 151; 277 160; 276 169; 275 175; 274 182; 273 187; Sep 10 15:56:30 Pali: is that supposed to be Kelvin/Celsius? Sep 10 15:56:40 the values doc is posting Sep 10 15:56:46 kelvin raw Sep 10 15:56:56 ok Sep 10 15:57:20 DocScrutinizer05: wait, your fridge gets to 0°C? Sep 10 15:57:24 :o Sep 10 15:57:31 272 194;freezer Sep 10 15:57:34 oic Sep 10 15:59:01 we can patch twl-adc kernel driver to report our raw value and then ask bme for converted :D Sep 10 15:59:06 kerio: mine goes to under 0C Sep 10 15:59:18 jacekowski: but your milk will be frozen! Sep 10 15:59:19 D: Sep 10 15:59:20 kerio: i can leave stuff in it on bottom shelf and it will freeze Sep 10 16:03:24 Pali: why, we have a fully functional BCI driver, we just need to strip (or #if BCI_BATTERY_FULL) what is unneeded Sep 10 16:03:47 Pali: I've already have a working backup battery voltage reading driver Sep 10 16:03:58 ok Sep 10 16:04:01 s/I've/I/ Sep 10 16:04:01 freemangordon meant: Pali: I already have a working backup battery voltage reading driver Sep 10 16:04:56 Pali: But I want new -thumb out before doing it Sep 10 16:05:04 which reminds me... Sep 10 16:05:42 271 208; 270 218; 269 227; 268 236; 267 248; 266 259; Sep 10 16:05:52 ^C Sep 10 16:06:08 DocScrutinizer05: put it in the oven now! Sep 10 16:07:01 now other question: have all N900 same thermal chip? Sep 10 16:07:40 are these values correct for all N900 or only for DocScrutinizer05 one? Sep 10 16:07:47 Pali: elborate please, as battery temp is read using adcin2 Sep 10 16:07:49 http://pastebin.ca/2202901 Sep 10 16:08:08 freemangordon, no, battery temperature is adcin0 Sep 10 16:08:19 yeah, right, my bad Sep 10 16:09:37 Pali: can you rework your tem_read (or whatever the name is) to output the values for the resistance according to the formula in the kernel? Sep 10 16:10:01 in parallel with BME temp reading? Sep 10 16:10:43 Pali: so we will be able to find what R/T LUT is Sep 10 16:10:49 can you inport http://pastebin.ca/2202901 as CSV to a spreadsheet and calculate it there? Sep 10 16:11:14 DocScrutinizer51: we dont have BME temp there AIUI Sep 10 16:11:47 DocScrutinizer05: ^^^ Sep 10 16:12:21 AIUI it's bmetemp/ADCIN0_raw tuples Sep 10 16:13:01 DocScrutinizer05: ADCIN0 is not enough, we need resistance Sep 10 16:13:15 uhuh Sep 10 16:13:21 i.e. we need current too Sep 10 16:13:38 no, we don't since that's not anything we can readout Sep 10 16:13:42 it's a constant Sep 10 16:14:04 or rather, even a function of resistance of NTC Sep 10 16:14:06 http://mxr.maemo.org/fremantle/source/kernel/drivers/power/twl4030_bci_battery.c#534 Sep 10 16:14:33 DocScrutinizer05: ^^^ Sep 10 16:14:38 :-S Sep 10 16:15:10 you expect a EE to read C sourcecode to gather what non-EE figured how a resistive divider works? Sep 10 16:15:37 "/* Getting and calculating the supply current in micro ampers */" Sep 10 16:15:41 that ^^^ Sep 10 16:16:45 Uout==ADC-result==Uin(const) * NTC / (R1(const) + NTC) Sep 10 16:16:47 not the code, but what it does. Reads the current :) Sep 10 16:16:58 DocScrutinizer05: get off your high and beautifully engineered horse Sep 10 16:18:31 NTC => Negative_Temperature_Coefficient --> the lower the temperature, the higher the NTC resistance in Ohms, in above formula Sep 10 16:18:42 DocScrutinizer05: no matter if the current is constant, we still need to find it. Though we can use voltage only (when the current is constant) it looks ugly. And you're not guaranteed it is really constant Sep 10 16:18:59 argo: lower temperature -> higher ADCIN0 reading Sep 10 16:19:06 we don;t know what happens on suspend/resume, etc Sep 10 16:19:26 current is NOT constant Sep 10 16:19:41 that is why we need to read it Sep 10 16:20:01 Ivar = U(const) / (R1(const) + NTC(var)) Sep 10 16:20:15 you CAN NOT read current Sep 10 16:20:30 though IIRC ADCIN0 is current generator (or whatever the english term is) Sep 10 16:20:40 it's a function of NTC and it has no other input to read it than ADCIN0 Sep 10 16:20:54 afaik it's not Sep 10 16:21:05 DocScrutinizer05: lemme check in datasheet Sep 10 16:21:42 whatever it is, it's pretty simple to calculate proper values for R1, Uin and NTC curve, from above pasted table I just created Sep 10 16:22:41 if it's actually claiming to be constant-current-source, you're fine with assuming Uin=200V and R1=200kR Sep 10 16:22:48 DocScrutinizer05: if I read the doc correctly adcin1 is "current source" Sep 10 16:22:53 or whatever you like to use for that Sep 10 16:23:26 in the end it all just doesn't matter Sep 10 16:24:31 yeah, but it is better to read what the curent si (or expected to be), than hardcoding the table as U/T Sep 10 16:24:41 I strongly suggest to use a LUT for true ADCIN reading vs temperature in Kelvin, and interpolate between the maybe 32 support points Sep 10 16:25:17 DocScrutinizer05: disagree, it is better to build a R/T LUT, no matter the number of points Sep 10 16:25:48 as "current source" can have several settings for current Sep 10 16:25:55 pffff Sep 10 16:27:07 if you really had understood the formula, you'd also see it's pretty simple to convert that LUT for whatever you like Sep 10 16:27:34 sure, what I am saying is we should use R/T from the start Sep 10 16:27:37 and there's no sound rationale to use a LUT and then process that via a formula that only uses constants Sep 10 16:28:18 everybody would go "WTF? why didn't they do this calculation pre-compiletime??" Sep 10 16:28:44 because the current is not known by the time of compilation Sep 10 16:28:52 IT IS! Sep 10 16:29:15 gimme a minute to find adcin1 current source register in docs Sep 10 16:29:15 there's only one sane setting for current, with this NTC and this temperature range Sep 10 16:29:27 I don't give a shit about it Sep 10 16:29:46 I'm pretty sure Nokia already used optimal setting Sep 10 16:29:57 and we don't need to use any other than that Sep 10 16:30:35 well, if you don't give a shit about docs, I don;t see a point continuing that conversation with you :). And I am pretty sure TI know how their chips work way better than Nokia Sep 10 16:30:49 *sigh* Sep 10 16:31:11 not to say I don;t see a pint to make yet another BME Sep 10 16:31:14 *point Sep 10 16:31:15 I'm pretty sure I know about resistive devicers better than you Sep 10 16:31:22 irellevant Sep 10 16:31:39 as is your bitching about current Sep 10 16:31:59 DocScrutinizer05: ad auctoritatem? Sep 10 16:32:24 no, it is not. what I am saying is that it can be done in your way (voltage reading only), but it will be ugly Sep 10 16:32:39 pffff Sep 10 16:32:48 DocScrutinizer05: you appear to be leaking air from somewhere Sep 10 16:32:55 obfuscated c contest or what? Sep 10 16:34:20 it will be ugly to use sophisticated formula for calculating current that **has only one usable setting for this circuit** Sep 10 16:35:03 DocScrutinizer05: we are talking about kernel driver here :S Sep 10 16:35:26 any other setting will result in ADC range at the limits for the temperature range we're interested in Sep 10 16:35:51 so what? Sep 10 16:36:36 the rationale of particular circuit/NTC-type needs ONE particular R1 or current setting to operate ADC in proper range is universal Sep 10 16:36:50 I won't save 5 instructions if I can do it in the "right" way. Hardcoding wor a particualr setup is deffinitely not that "right" way Sep 10 16:37:20 no reason to add cruft to allow runtime parameters for that, not even in kernel drivers Sep 10 16:37:37 did you look at the code? Sep 10 16:38:01 no, runtime calculating boarb-parameter specific stuff is not the right way Sep 10 16:38:10 board* Sep 10 16:38:54 then it should go in board specific files, not in the main driver Sep 10 16:39:29 as it is bci_battery, not rx51_bci_battery Sep 10 16:39:37 there's exactly one setting for current, in every hardware. No way to switch that for whatever reasons during runtime. So pretty please don't use this setting as a input var for runtime calculations Sep 10 16:40:12 still don't get why. larger code or what? Sep 10 16:40:17 since it *will never cahnge* at runtime Sep 10 16:40:46 such things get calculated at compile time Sep 10 16:41:37 DocScrutinizer05: see, the way I write code is something like: write it in a way so you can reuse it in the future. Feel free to write that driver according to your understandings Sep 10 16:42:32 if your friggin code isn't reusable when you can't do calculations on target that belong into #define, then I dunno what your code looks like Sep 10 16:43:45 anyway, I am losing too much time arguing Sep 10 16:44:09 yeah, better write crappy code than do crappy arguing Sep 10 16:44:17 exactly Sep 10 16:44:47 that's what I thought Sep 10 16:44:51 :-S Sep 10 16:48:11 of course you can calculate Uout==ADC-result==Uin(const) * NTC / (R1(const) + NTC) at runtime, alas I think nobody will understand the reason why this has to eat up any CPU cycles, since NTC->temp comes from a LUT anyway, and it's the only vatiable in that formula, since R1 is CONSTANT! Sep 10 16:48:33 aka board-parameter-specific Sep 10 16:48:38 DocScrutinizer05: you can do that calculation *once* though Sep 10 16:49:08 seems that bci-battery code is not in upstream kernel... Sep 10 16:49:23 driver is only in maemo kernel Sep 10 16:49:33 * DocScrutinizer05 wonder why ;-P Sep 10 16:50:06 Pali: yes, there are several patches sent to lkml, like bci_charger, etc. Seems none have made it Sep 10 16:50:39 bci_charger is upstreamed Sep 10 16:51:25 but there is no therm_tbl table Sep 10 16:51:35 Pali: it is board specific Sep 10 16:51:58 driver gets it through platform data Sep 10 16:51:58 in maemo kernel there is code for therm_tbl, but not in upstream kerne Sep 10 16:52:18 hmm, is there temp readout at all? Sep 10 16:52:18 bci_charger do not get any these data Sep 10 16:53:06 there is no temperature code Sep 10 16:53:18 hmm, clever :) Sep 10 16:53:52 Pali: madc-hwmon? Sep 10 16:54:09 (or whatever the driver name was) Sep 10 16:54:36 it reading only raw value, but from adcin1 channel Sep 10 16:54:47 not usable on n900 too Sep 10 16:54:49 yes, that is the correct channel Sep 10 16:55:03 no, n900 has adcin0 Sep 10 16:55:04 could that be the reason your temp_input fails? Sep 10 16:55:10 Pali: no, it is adcin1 Sep 10 16:55:17 lemme check once again Sep 10 16:55:39 see Nokia_N900_RX-51_Schematics.pdf Sep 10 16:55:44 ADCIN0 - temp Sep 10 16:56:07 BME also using ADCIN0 Sep 10 16:56:38 from TRM: Sep 10 16:56:40 ADCIN0 External Battery type (BTYPE) Sep 10 16:56:47 ADCIN1 External BCI: Battery temperature (BTEMP) Sep 10 16:56:50 Pali: one is BSI (often used as in-battery temperature sensor, NOT on N900 though), the other is true battery temp sensor Sep 10 16:57:15 I asked BME for raw value of temperature and it returns me same value as twl4030 adcin0 kernel driver Sep 10 16:58:02 Pali: NFC, that is what is written in TPS65950 TRM Sep 10 16:58:25 ADCIN4 is BSI (from Nokia_N900_RX-51_Schematics.pdf) Sep 10 17:02:26 Pali: according to my scheamtics ADCIN0 is "Bettry Temeprature Sensor" BTEMP R1110 on ball H4 Sep 10 17:03:05 ADCIN4 is BSI Sep 10 17:03:22 I already wrote this Sep 10 17:03:55 ADCIN1 isn't used Sep 10 17:04:03 yes, you wrote that Sep 10 17:04:41 well, something does not make sense here, in all TI docs it is ADCIN1 that is used for battery temp sensor, while ADCIN0 is either Battery Type or GP Sep 10 17:04:47 hm, ADCIN1 returns value 34 or 35 Sep 10 17:04:52 on my n900 Sep 10 17:05:29 note that TI docs are for GP devices, not HS Sep 10 17:05:48 maybe some stupid changes for Nokia or by Nokia... Sep 10 17:05:57 Pali: it is for TWL4030, it does not matter GP/HS AIUI Sep 10 17:06:19 Pali: the "stupid change" is called schematics, or design Sep 10 17:06:58 Nokia is free to use the chip in whatever way they feel may fit their needs Sep 10 17:06:58 DocScrutinizer05: makes no sense, all of the monitoring is done on ADCIN1 Sep 10 17:07:07 other question, do we know how to get design battery capacity from BSI raw value? Sep 10 17:07:20 no Sep 10 17:07:49 DocScrutinizer05: why? iirc it is some resistor there Sep 10 17:08:01 (if connected) Sep 10 17:08:05 we have armel binary bsi-read and it show me: raw BSI: 463, BSI: 990 Sep 10 17:08:29 I already looked at that binary for BSI and is using some tables for conversation Sep 10 17:08:31 so this binary at least pretends to 'know' Sep 10 17:08:53 but what BSI: 990 means? Sep 10 17:09:02 hehe, a table for conversation Sep 10 17:09:05 ohms? Sep 10 17:09:06 and obviously it's quite off with its "knowledge", since battery isn't 990mAh Sep 10 17:09:44 neither Ohm nor kOhms Sep 10 17:10:19 maybe Nokia internal battery product number ;-P Sep 10 17:10:29 hehe Sep 10 17:10:57 https://wiki.maemo.org/N900_Software_BME Sep 10 17:11:08 are values for BSI here correct? Sep 10 17:11:11 anyway, AFAIK there is internal resistor in every battery which is related to its capacity Sep 10 17:11:41 since there are no Nokia alternatives for BL-5J, it's moot to speculate how to derive bat capacity from BSI. There's no real life instance to proof any hypothesis against Sep 10 17:12:04 DocScrutinizer05: mine bl5j is 1430 mAh Sep 10 17:12:23 freemangordon, run bsi-read Sep 10 17:12:28 as root Sep 10 17:12:35 is it preinstalled? Sep 10 17:12:38 yes Sep 10 17:12:39 to get what? Sep 10 17:13:07 Nokia-N900:~# bsi-read Sep 10 17:13:10 raw BSI ADC reading: 493 Sep 10 17:13:10 the product tolerance of BSI resistor? Sep 10 17:13:12 BSI: 1114 Sep 10 17:13:14 raw battery level: 630 Sep 10 17:13:16 battery level: 3695 Sep 10 17:13:30 Pali: bingo Sep 10 17:13:46 bingo what? Sep 10 17:14:42 DocScrutinizer05: BSI resistor should be in linear dependance with capacity Sep 10 17:14:56 says who? Sep 10 17:15:02 well, you can kinda expect that they use same BSI values for all batteries Sep 10 17:15:14 no you can't Sep 10 17:15:29 RAW and BSI which are printed by bsi-read are not linear Sep 10 17:15:41 so what? Sep 10 17:15:54 I looked into asm code and there is lot of math code for converting Sep 10 17:15:55 does this leave us any wiser? regarding what ? Sep 10 17:16:04 battery capacity Sep 10 17:16:23 yeah, and it converts to nokia internal virtual birthday of Elop Sep 10 17:16:54 ~(1360/990)*1114 Sep 10 17:16:55 1530.343434343434 Sep 10 17:16:56 obviously it's totally wrong even for BL-5J Sep 10 17:17:11 hmm Sep 10 17:17:19 indeed Sep 10 17:17:29 are you calculating Pi or what? Sep 10 17:17:47 ~(1360/463)*493 Sep 10 17:17:48 1448.120950323974 Sep 10 17:18:05 wf? Sep 10 17:18:05 Pali: you use 1360 Mah battery, ain't? Sep 10 17:18:19 standard bl5j Sep 10 17:18:20 well, like we all do Sep 10 17:18:36 DocScrutinizer05: no, as I already told you mine is 1430 mAh Sep 10 17:18:54 uhuh, and certified by Nokia I assume Sep 10 17:19:07 I took it from asha Sep 10 17:19:17 original Nokia Sep 10 17:19:27 lshal | grep design Sep 10 17:19:46 DocScrutinizer05: google a bit, all new bl5j batteries are 1430 Sep 10 17:19:51 battery.reporting.design = 1258 Sep 10 17:19:58 neat Sep 10 17:20:02 battery.reporting.design = 1415 (0x587) (int) Sep 10 17:20:12 freemangordon: are those better than a scud blue dream? Sep 10 17:20:24 Pali: WTF? why 1258? Sep 10 17:20:27 ooh, so we actually have a certified Nokia real life instance to test against, fine! then we *might* RE their formula Sep 10 17:20:30 no idea Sep 10 17:20:41 DocScrutinizer05: yes Sep 10 17:21:05 DocScrutinizer05: can you run the same bsi-read? Sep 10 17:21:10 it is preinstalled Sep 10 17:21:18 raw BSI ADC reading: 466 Sep 10 17:21:19 BSI: 1002 Sep 10 17:21:41 (1360/1002)*1114 Sep 10 17:21:45 ~(1360/1002)*1114 Sep 10 17:21:47 1512.015968063872 Sep 10 17:21:59 hmm Sep 10 17:22:12 DocScrutinizer51: lshal | grep design ? Sep 10 17:22:29 battery.reporting.design = 1276 (0x4fc) (int) Sep 10 17:22:42 o/ Sep 10 17:22:52 ~(1276/1002)*1114 Sep 10 17:22:53 1418.626746506986 Sep 10 17:23:02 here it is Sep 10 17:23:13  battery.reporting.design = 1415  (0x587)  (int) Sep 10 17:23:42 though their formule seems a little bit incorrect Sep 10 17:24:26 when I call bsi-read more times, it show me different BSI Sep 10 17:24:37 ~(1276.0/466.0)*493 Sep 10 17:24:37 1349.931330472103 Sep 10 17:25:11 freemangordon, better try to disassemble that bsi-read under ida Sep 10 17:25:12 Pali: not here, they remain the same Sep 10 17:25:17 Pali: hehe Sep 10 17:25:39 * freemangordon is going to cook some dinner, bbl Sep 10 17:26:06 I used objdump and I only disassembled that battery level Sep 10 17:26:57 battery level = (((((2099203 - (1LL<<31)) * level * 6000) >> 32) - ((level * 6000 << 1) >> 32) + (level * 6000)) >> 9) Sep 10 17:27:27 no idea what this is, but it is in that armel binary... Sep 10 17:27:42 question: should i buy a polarcell or not? Sep 10 17:28:46 Pali: bsi-read battery level looks like mV Sep 10 17:29:28 yes, it could be Sep 10 17:29:37 but what that formula means??? Sep 10 17:30:58 *5.86 Sep 10 17:31:20 ~630 * 5.86 Sep 10 17:31:21 3691.8 Sep 10 17:31:48 some good approximation of that formula could be: battery level = level * 3003 / 512 Sep 10 17:31:52 but it is not same Sep 10 17:32:46 and about BSI, seems that design_capacity/BSI is 1.26 Sep 10 17:33:33 1415/1114=1.2701 1258/994=1.2655 1276/1002=1.2734 Sep 10 17:33:40 or 1.27 Sep 10 17:34:40 IroN900:/home/user/MyDocs/tmp# level=630 echo $(( (((((2099203 - (1<<31)) * level * 6000) >> 32) - ((level * 6000 << 1) >> 32) + (level * 6000)) >> 9) )) Sep 10 17:34:42 3695 Sep 10 17:34:54 http://maemo.org/news/ how come this is empty? Sep 10 17:35:40 ~630 * 5.86 Sep 10 17:35:40 3691.8 Sep 10 17:35:50 630*3003/512 Sep 10 17:35:56 FIQ, somebody broke the aggregator. Sep 10 17:35:58 ~630*3003/512 Sep 10 17:35:58 3695.09765625 Sep 10 17:37:24 ~(((((2099203 - (1<<31)) * 630 * 6000) >> 32) - ((630 * 6000 << 1) >> 32) + (630 * 6000)) >> 9) Sep 10 17:37:39 FIQ, https://bugs.maemo.org/enter_bug.cgi?product=maemo.org%20Website Sep 10 17:38:06 Man, I forgot all of my Bugzilla URL kung-fu. Sep 10 17:38:13 need account for that apparently Sep 10 17:38:50 PALI!!! you killed her! Sep 10 17:39:19 ~ping Sep 10 17:39:19 ~pong Sep 10 17:39:21 lies Sep 10 17:39:33 ~ping Sep 10 17:39:33 ~pong Sep 10 17:39:42 prolly she's still calculating ;-P Sep 10 17:39:47 dead or alive? Sep 10 17:40:28 she should go back to school :-) Sep 10 17:41:12 Actually, this is the one I want. https://bugs.maemo.org/enter_bug.cgi?alias=bug_severity=major&bug_status=NEW&component=News&product=maemo.org%20Website&bug_severity=major&op_sys=All&rep_platform=All Sep 10 17:42:25 ...and cheers Sep 10 17:43:54 FIQ, https://bugs.maemo.org/show_bug.cgi?id=12663 Sep 10 17:43:54 04Bug 12663: http://maemo.org/news/ is missing the news content Sep 10 17:44:06 (if somebody wants to confirm it, that'd be great) Sep 10 18:31:50 Pali: just in case you need some more support points for your LUT: http://pastebin.ca/2202939 Sep 10 18:32:13 ok, thanks Sep 10 18:32:47 I started writing simple power supply driver which export temperature and voltage via sysfs Sep 10 18:32:57 very simple Sep 10 18:34:48 Hi. Can someone compile postgres for maemo? Anyone solved the problem of postgresql and metasploit? Sep 10 18:38:33 I tried to compile postgres (9.2beta) in scratchbox but I can't make .deb package Sep 10 19:07:29 Pali: why not reuse bci_battery? Sep 10 19:07:48 I do not know why Sep 10 19:07:55 what you can reuse? Sep 10 19:08:11 temp reading and backup battery voltage Sep 10 19:09:12 Pali: btw there is nor hexrays for ARM (in IDA i have here) Sep 10 19:09:21 s/nor/no/ Sep 10 19:09:22 freemangordon meant: Pali: btw there is no hexrays for ARM (in IDA i have here) Sep 10 19:09:48 for battery voltage we already have formula Sep 10 19:09:51 so not much of a difference between IDA and objdump Sep 10 19:09:59 Pali: backup battery ;) Sep 10 19:10:12 ok Sep 10 19:10:38 Pali: and it is integrated as a platform driver with twl4030 Sep 10 19:10:55 and registers itself as power_supply Sep 10 19:12:06 just #ifdef the main battery/charger code , add temp table in rx51_peripherals.c and you're good to go Sep 10 19:15:35 fwiw, the answer to my question about Paul Lee Phil or whatever is apparently polyfill and not polyfil Sep 10 19:15:54 Pali: http://pastebin.com/1y99T166 Sep 10 19:16:09 this is mine stripped down version Sep 10 19:16:11 and the prize for getting it wrong is awarded to android Sep 10 19:16:27 Pali: it reads backup battery voltage Sep 10 19:16:36 ok Sep 10 19:18:29 Pali: you will need also http://pastebin.com/Sr2A9DuY in board-rx51-peripherals.c Sep 10 19:18:56 Pali: and you'll need to add .bci = &rx51_bci_data, Sep 10 19:19:03 in rx51_twldata Sep 10 19:19:34 Pali: though that was quick'n'dirty way to check if backup battery is charged at all Sep 10 19:19:48 so you may find a batter way to integrate it Sep 10 19:20:17 ok Sep 10 19:46:12 sup guys Sep 10 20:07:35 what is the nokia-binaries repo supposed to be? Sep 10 20:35:33 btw, that MyDocs should be named after the Bluetooth name in File Manager seems a weird decision Sep 10 20:43:06 well, that's the only "name of the phone" Sep 10 20:51:51 Pali: the formula to convert BSI raw value to BSI value is (1200*bsi_raw)/(1024-bsi_raw) Sep 10 20:52:48 ~(1200*463)/(1024-463) Sep 10 20:52:49 990.374331550802 Sep 10 20:52:53 nice :-) Sep 10 20:53:06 990 is correct Sep 10 20:53:49 ~990*1.27 Sep 10 20:53:49 1257.3 Sep 10 20:54:01 sounds good Sep 10 20:54:14 sounds correct :D Sep 10 20:54:29 so raw bsi to design capacity is: 1.27*(1200*bsi_raw)/(1024-bsi_raw) Sep 10 20:54:53 though I think 1.27 is a bit incorrect Sep 10 20:54:55 ~1.27*(1200*463)/(1024-463) Sep 10 20:54:56 1257.775401069519 Sep 10 20:55:12 a bit too low Sep 10 20:55:21 1415/1114=1.2701 1258/994=1.2655 1276/1002=1.2734 Sep 10 20:55:32 Pali: are you sure your battery is genuine nokia 1360 mAh? Sep 10 20:55:50 I did not changed battery Sep 10 20:56:02 hmm Sep 10 20:56:14 ~1430/1114 Sep 10 20:56:14 1.283662477558 Sep 10 20:56:44 ~1415/1114 Sep 10 20:56:45 1.270197486535 Sep 10 20:57:16 seems that bme using 1.27xxx Sep 10 20:58:06 Pali: yes Sep 10 20:58:18 ~1118*1.27 Sep 10 20:58:19 1419.86 Sep 10 20:58:29 ~1118*1.275 Sep 10 20:58:29 1425.45 Sep 10 20:58:35 ~1118*1.278 Sep 10 20:58:36 1428.804 Sep 10 20:58:41 ~1118*1.28 Sep 10 20:58:42 1431.04 Sep 10 20:58:57 Pali: should be 1.28 Sep 10 20:59:04 ~1114*1.28 Sep 10 20:59:04 1425.92 Sep 10 20:59:21 my battery is 1430 mAh Sep 10 20:59:33 ~994*1.28 Sep 10 20:59:33 1272.32 Sep 10 20:59:46 and I get either 1114 or 1118 Sep 10 21:00:03 1272 could be Sep 10 21:00:20 Pali: how is that, it should be 1360 Sep 10 21:00:31 IIRC Sep 10 21:00:34 it is not 1260? Sep 10 21:00:38 or 1270? Sep 10 21:00:39 no Sep 10 21:00:42 no Sep 10 21:01:03 i just disabled the sdk and nokia-binaries repos :D Sep 10 21:01:23 Pali: 1320 Sep 10 21:01:25 :D Sep 10 21:01:34 checked on my second n900 Sep 10 21:01:40 I remebmer that I read somewhere that bl5j batteries in n900 was not 13xx but only 12[6|7]0 Sep 10 21:02:01 it is written 1320 Sep 10 21:02:49 and according to what I remember from battery thread on tmo, it is around that value Sep 10 21:02:59 th real capacity Sep 10 21:04:11 Pali: something is fishy here Sep 10 21:05:56 but anyway, that is how bsi-read calculates BSI Sep 10 21:07:13 iirc bme reported capacity for me has been around 1250 Sep 10 21:07:33 BSI: 998 Sep 10 21:07:34 D: Sep 10 21:07:35 for orig bl-5j Sep 10 21:07:50 ShadowJK: but it should be around 1320 Sep 10 21:07:54 for original bl-5j Sep 10 21:08:20 freemangordon, bq27200 chip never reported more than 1250 after learning cycles... Sep 10 21:08:53 kerio: and what is the output from lshal | grep design Sep 10 21:09:18 Pali: ok, but how old is your battery? Sep 10 21:09:24 1269 Sep 10 21:09:33 4200 voltage Sep 10 21:09:34 year 2009 Sep 10 21:09:41 Pali: see Sep 10 21:09:53 i don't know how old mine is Sep 10 21:09:57 is there any date? Sep 10 21:09:58 but it's still pretty good Sep 10 21:10:07 freemangordon; i've never seen .design of bl-5j above 1300.. and never seen actual capacities above 1250-ish either :) Sep 10 21:10:41 * kerio had an actual capacity of 1312mAh Sep 10 21:10:46 ShadowJK: but according to TMO thread the capacity is really around 1315 Sep 10 21:10:49 now dropped to 1249 Sep 10 21:11:29 actual capacity on all of my Nokia BL-5J are about 1000mAh these days :) Sep 10 21:11:47 should i buy one of those 1500mAh batteries from germany? Sep 10 21:11:50 hehe. but this is not the same as design capacity :P Sep 10 21:12:48 ~1320/998 Sep 10 21:12:49 1.322645290581 Sep 10 21:13:17 ShadowJK, I still have about 1200 Sep 10 21:13:26 ~1430/1114 Sep 10 21:13:27 1.283662477558 Sep 10 21:13:34 the fuck Sep 10 21:13:57 Pali: I think we can use at least 1.28 Sep 10 21:14:35 ~1118.0*1.28 Sep 10 21:14:35 1431.04 Sep 10 21:14:40 perfect Sep 10 21:14:46 ~1114.0*1.28 Sep 10 21:14:46 1425.92 Sep 10 21:16:04 seems that on original batteries BSI resistor is badly calibrated. Or they are not 1320 mAh :D Sep 10 21:16:32 ~998*1.28 Sep 10 21:16:33 1277.44 Sep 10 21:17:06 ~1002*1.28 Sep 10 21:17:06 1282.56 Sep 10 21:17:15 or then thry didn't want to order odd value resistors and picked whatever was closest Sep 10 21:17:39 yeah, could be Sep 10 21:18:23 but 1.28 gives the correct capacity for my 1430 mAh BL5J Sep 10 21:18:49 ~1114*1.32 Sep 10 21:18:50 1470.48 Sep 10 21:23:07 what resistance does that work out to? Sep 10 21:23:52 ShadowJK: not sure I understand, would you rephrase? Sep 10 21:25:26 I'm more familiar with resistance to mAh rather than adc reading? Sep 10 21:25:52 ShadowJK: don;t know, never measuer it Sep 10 21:26:04 measured* Sep 10 21:28:55 anyway, I have a vague memory that the relationship of resistance to capacity wasn't linear, and then when we're measuring the voltage of a voltage divider where bsi forms one part, the voltage reading isn't linear either Sep 10 21:29:20 so I'd think there's atleast a + or - term missing somewhere :P Sep 10 21:30:18 ShadowJK: well, (1200*bsi_raw)/(1024-bsi_raw) is EXACTLY what bsi-read does Sep 10 21:30:30 don't know about BME though Sep 10 21:31:34 though x/(a-x) is not exactly linear :) Sep 10 21:31:51 (IIRC) Sep 10 21:33:04 too lazy now to fire matlab to get the exact graphic :) Sep 10 21:35:20 what does that return for bl-5j 1320? Sep 10 21:35:39 around 1000 Sep 10 21:36:27 Pali's is 990, while doc's is 1002 Sep 10 21:36:40 kerio has 998 Sep 10 21:37:58 982-990 Sep 10 21:45:42 * ShadowJK forgets if it was BL-5J or BP-4L that measures 100kR Sep 10 21:46:47 1.2V = 1200, 1024 for 10 bit ADC? Sep 10 21:47:32 http://tinypic.com/r/95pz68/6 Sep 10 21:48:19 deffinitely not linear Sep 10 21:49:01 i dont remember the schematics Sep 10 21:49:59 but bsi-read might be trying to read the resistance of the bsi resistor, and probably makes no attempt at converting it to mAh? Sep 10 21:50:31 ShadowJK: deffinitely, it gives some BSI: value, whatever it means Sep 10 21:51:01 and I suspect for mAh it's going to be something like mAh = (bsiR + a) * b + c Sep 10 21:51:37 ShadowJK: bsiR? raw or resistance Sep 10 21:52:21 resistance Sep 10 21:53:32 could be, but why BME reports incorrect values then? Sep 10 21:54:29 battery.reporting.design = 1415 here, for 1430 mAh battery Sep 10 21:54:53 it is even worse for original batteries Sep 10 21:55:19 1250-1270 for 1320 mAh battery Sep 10 21:56:21 As for the original bl-5j, 1250 is more truthful :) Sep 10 21:56:57 but I've seen variation from boot to boot bigger than 1430-1415 Sep 10 21:58:08 it might be that resistance depends on the temperature, thus variations Sep 10 21:58:09 For purposes of determining optimal charge current, +-100 is sufficient too.. Sep 10 21:59:06 anyway, I am off for sleep Sep 10 21:59:09 night Sep 10 22:00:30 nini Sep 10 22:02:29 freemangordon: well, resistors have tolerances Sep 10 22:52:54 here is source code kernel driver which export voltage, temperature and design capacity: http://atrey.karlin.mff.cuni.cz/~pali/rx51_battery.c Sep 10 22:53:00 tested and seems working fine Sep 11 00:19:49 seems that on original batteries BSI resistor is badly calibrated. Or they are not 1320 mAh :D #### Or the whole assumption is moot, and BSI isn't really defined in any proper way at all Sep 11 00:35:51 BP-4L: 120kR, nom.cap. 1500mAh. BL-4U: 80.4kR, nom.cap. 1000mAh. BL-5J: 99.1kR, nom.cap: 1320mAh Sep 11 00:39:22 all @23°C Sep 11 00:42:25 http://wiki.openmoko.org/wiki/Battery_Questions_and_Answers#Can_nokia_phones_use.2Fcharge_gta01.2Fgta02_batteries.3F :: >>BL-6C?? (actual measured value on a cold (25C) battery is 75k, on a slightly warm battery - 82k)<< Sep 11 00:43:47 so it seems BSI is only useful together with proper bat-temp, at least for some battery types Sep 11 00:46:35 and since different NTC/PTC (80kR, 100kR, 120kR) also may have different T/R characteristic, probably BSI formula is more or less undefined on any but a certain nominal temperature (like 22°C) Sep 11 00:47:24 ~1000/80.4 Sep 11 00:47:24 12.437810945274 Sep 11 00:47:47 ~1500/120 Sep 11 00:47:47 12.5 Sep 11 00:48:07 ~1320/99.1 Sep 11 00:48:07 13.319878910192 Sep 11 00:49:29 @-15°C: BP-4L: 120kR Sep 11 00:50:30 @-15°C: BL-4: 80kR Sep 11 00:50:37 @-15°C: BL-4U: 80kR Sep 11 00:52:06 @-15°C: BL-5J: 99kR Sep 11 00:56:09 conclusion: for all three types there's no thermistor used, unlike BL-5C. For BP-4L and BL-4U there seems to be a consistent multiplier for BSI_kR * $multiplier_12.5 = Capacity_mAh Sep 11 00:56:49 not though for BL-5J Sep 11 00:57:27 ~90.1 * 12.5 Sep 11 00:57:27 1126.25 Sep 11 01:00:25 for BL-4/5/6D above formula may or may not apply (@22°C), alas no proper genuine Nokia of this model at hand right now Sep 11 01:03:13 noteworthy detail: BL-xD has flat-pad contacts, while the three other types have compatible spring loaded bracket in slot contacts Sep 11 01:05:21 all three marked "(+) (-) ( ) 3.7V" Sep 11 01:08:46 all my BL-5J are marked 1320mAh Sep 11 01:26:20 dang, now I recall I already did all this some 3 or 4 years ago Sep 11 01:29:17 and seems my today's conclusion is same like back then: There are several different methods/alrgorithms, even concepts (Thermistor) used on this obscure 3rd pin of batteries. And thus it's not really useful for anything, except maybe for differentiating between old and newer improved builds of one particular model of a battery Sep 11 01:38:16 hell, we even take assumptions, when we take "Battery *SIZE* Indicator" for granted. Might just be a unfortunate incorrect wording kept for histroical reasons. Who says this isn't meant to maybe signal allowable charge current, like ShadowJK suggested. If that's the case, this value may loosely correlate to battery capacity but basically is useless for the very purpose to calculate exact capacity from it then, since different cell Sep 11 01:38:17 builds may take different relative max charge current, like 0.5C, 0.7C, 1C, even 2C Sep 11 02:50:24 well a rough capacity indication would be useful for setting charge current Sep 11 02:51:21 as for fuel gauging, I'd say a rough indicaion is sufficient because real capacity is way off anyway, especially when you take bme's early shutdown thresholds into account Sep 11 02:52:27 ther's probaly a magic bsi range for signaling "device in jig" too **** ENDING LOGGING AT Tue Sep 11 02:59:58 2012