#qi-hardware IRC log for Tuesday, 2014-10-14

nicksydneyhttp://anonabox.com/home.html .. thoughts ?01:45
whitequarkit's ... misrepresented at best02:21
whitequarkthere is a reason tor browser bundle exists. if you send all your usual cookies through tor, you are immediately identifying yourself02:21
whitequarkin a way, it makes things worse by giving you a false sense of security02:21
wpwrakeintopf: there are no known cases of ebola in argentina so far, and i'd be a rather unlikely candidate for becoming the first one ;-)02:45
wpwrakbut it's the long columbus day weekend in the americas. well, columbus day for those of european heritage, "day of cultural diversity" (or such) for those who trace back their origin to natives02:47
eintopfwpwrak: happy columbus day!11:09
SyntaxTerroranyone around?11:18
DocScrutinizer05about my quick and dirty approach to talk to PPSU (/dev/ttyUSB0): it has a downside of creating "-rw-r--r-- 1 root root 5 Oct 14 13:12 /dev/ttyUSB0" when the PPSU is not properly enumerated ;-)11:18
DocScrutinizer05wondered why stuff suddenly fails, after I disconnected (and disassembled) the PPSU. Then I noticed this:11:21
DocScrutinizer05saturn:~ # ll /dev/ttyUSB*11:21
DocScrutinizer05-rw-r--r-- 1 root root         5 Oct 14 13:12 /dev/ttyUSB011:21
DocScrutinizer05crw-rw---- 1 root dialout 188, 1 Oct 14 13:12 /dev/ttyUSB111:21
wpwraksurprisingly, there doesn't even seem to be a redirect in bash that gives you write access without also implying O_CREAT. maybe i just didn't find it, or you have to use zsh or such ;-))11:24
DocScrutinizer05wpwrak: might be related to permissions of parent dir. But maybe you can help me out how to check *programmaticaly* in shell script if a file is a character special device file?11:45
wpwrakyou can use "test". (man test / help test)11:46
DocScrutinizer05ooh, and about create vs write: it's about >> and some parameter11:46
DocScrutinizer05aaah test, that's been it, thanks11:46
wpwrakbut ... this still has a race condition: if the USB device disappears between test and >... access, you still get a new file11:46
DocScrutinizer05sure11:47
wpwrakand yes, you can prevent creation with permissions11:47
wpwraka bit fragile, though. but as a just-for-joerg-at-home solution, why not.11:48
DocScrutinizer05parameter = noclobber11:50
wpwraknoclobber should still create it if it doesn't exist11:52
DocScrutinizer05err, I'm pretty sure it's meant to fail when file does exist, for >. and to fail when file does not exist, for >>11:53
DocScrutinizer05at least I'm sure I've read this somewhere11:53
DocScrutinizer05-C11:54
DocScrutinizer05If set, bash does not overwrite an existing file with the >, >&, and <> redirection operators. This may be overridden when creating output files by using the redirection operator >| instead of >.11:54
DocScrutinizer05isn't what I recal it been11:54
DocScrutinizer05it's missing the >> aspect11:54
wpwrakmaybe write a C program that opens argv[1] without O_CREAT, then forks your shell script with the fd number as first arg ? then you can do your stuff in shell with a properly set up fd11:57
wpwrakwell, or exec the shell. no fork needed if you want to optimize11:58
wpwrak(C) or any other real language. plenty of choices ;)11:58
DocScrutinizer05meh12:01
DocScrutinizer05I'm hardly motivated at all to check for type and existence of ttyUSB012:02
wpwrakall you want is get rid of the O_CREAT. well, you could also write a wrapper library that removes O_CREAT from calls that open something in /dev. that way, you don't need to change your application12:23
eintopfwrapper library for systemcalls, I always search something like that to link other code to it12:35
eintopffor example, unstable closed source software and some watchdog which restarts the unstable software12:36
wpwrakLD_PRELOAD is your friend :)12:36
eintopfwpwrak: yea, I know this, but for systemcalls? I want the normal behaviour12:36
eintopfso only some call open_wrapper, afterwards then it should call open(2)12:37
eintopffrom libc12:37
eintopfwpwrak: this should possible? It's like torsocks12:38
eintopftorsocks is wrapper for socket, send, recv etc...12:38
eintopfto make everything via tor, otherwise you need always applications with SOCKSv5 proxy support12:39
wpwraksure. there ought to be some tutorials on the net. it used to be "deep wizardry", but now it's pretty well-established hackery12:39
eintopfand very important also wrapper for gethostbyname(2)12:39
eintopfmhh12:39
eintopfokay12:39
eintopfgethostbyname isn't a systemcall, yea12:40
eintopfthat's something else, because readout also /etc/resolv.conf12:40
eintopfI think :/12:40
eintopfwpwrak: okay, maybe when I have time I will create a library where people could add easily code for that12:41
eintopflibhack12:41
wpwrakLD_PRELOAD is not limited to syscalls12:41
eintopfyep12:41
eintopfI know, at my university I compiled a second rootfs in $HOME/local12:41
eintopfbecause the pool environment is stupid12:42
eintopfthey install libs and not dev debian packets12:42
eintopfand also, there was no autoconf and automake12:42
eintopfand then I make a:12:43
eintopfexport LD_LIBRARY_PATH="$HOME/local/lib:$LD_LIBRARY_PATH"12:43
eintopfalso for PKG_CONFIG_PATH12:43
eintopfand everything else12:44
eintopfmy co-students want's always to know I can install new software on university pc's...12:44
eintopfbut I told their "You don't wanna know that"12:44
eintopfbecause after system upgrade... I can recompile everything12:44
eintopfbut I laugh always, because no autotools are installed12:45
eintopfI think the most people do java eclipse programming ;)12:45
eintopfso they don't need autotools (Oh yea I remember you name it autocrap)12:46
eintopfwpwrak: fvwm uses autocrap :P12:47
eintopfeverything uses autocrap12:47
eintopfbut the most weird buildsystem is the gcc buildsystem, never understand it12:47
DocScrutinizer05((<wpwrak> all you want is get rid of the O_CREAT)) I hardly could care12:47
DocScrutinizer05I first check if ttyUSB is of right type, then I open it for *reading* which will fail if the file doesn't exist12:48
DocScrutinizer05( cat /dev/ttyUSB& )12:49
DocScrutinizer05only then I'll open it for writing12:58
DocScrutinizer05what annoys me much more is root permissions needed13:00
DocScrutinizer05though prolly I should add user to dialout group13:01
DocScrutinizer05actually I probably should do a find /sys -path '*cp210x*ttyUSB*'13:10
DocScrutinizer05the damn thing doesn't give away any hint that it's a PSU13:11
DocScrutinizer05they simply added the USB<->RS232 on a separate PCB. Standard, in no way customized. And powered by USB even when PSU is unpowered13:13
DocScrutinizer05that's why I never noticed before about the funny side effects of creating ttyUSB0 by my own script13:14
DocScrutinizer05the device file only vanishes when unplugging USB13:14
DocScrutinizer05http://privatepaste.com/462c28c13813:16
DocScrutinizer05you actually need to tell system: "I'm going to plug in a PPSU, please consider next cp210x showing up on USB as Voltcraft PPS-161005!"13:19
DocScrutinizer05s/161/16/13:20
DocScrutinizer05how would I rename a /dev/ttyUSB to some other more specific name?13:22
DocScrutinizer05a symlink won't help since it doesn't notice when the ttyUSB vanishes13:23
mthudev rule?13:23
DocScrutinizer05prolly, yep. But I dunno how to rename in such rule13:23
DocScrutinizer05wait, udev creates the device, to start with, right?13:24
mthyes13:26
DocScrutinizer05also it's a tad nasty for a udev rule to go "interactive", i.e. wait answer (or check previously given command) of user, to declare next cp210x as PPSU13:26
mthudev does have a SYMLINK option, I presume it also cleans up the link at unplug then13:26
DocScrutinizer05ummm, makes sense13:26
DocScrutinizer05o/13:29
kyakin case someone missed the global notice: http://bit.ly/1z78rgQ13:42
kyakvery interesting is how this shit got into their servers in the first place13:50
SyntaxTerrorStill looking to chat to someone about putting together a Tizen dev boardĀ for us with a specific screen & capacitive touch input size. Get in touch if you know someone, we have budget!15:03
SyntaxTerrorDM or email me at: anthony@make-us-proud.com15:03
arhuacokyak: That's what I was looking for. No mention of it.15:04
astrSyntaxTerror, custom boards are easy with eoma-68, the the hard expencive bit the soc is taken care of so you can make a simple & cheep custom board with the lcd and touch driver and power supply on it that fits around the screen size you want and the eoma-68 card see rhombus-tech.net browse the sitemap and add your self to the mailing list and ask on there. while the website needs updating the project is moving forward17:29
astrand any money(orders) would help speed things up17:30
astrI belive some work has already been done with tizen on the a20 card17:31
SyntaxTerror@astr: thanks for the info! That looks like a neat bit of kit17:35
astrSyntaxTerror, crowdfunding is planing around nov~17:36
DocScrutinizer05arhuaco: [2014-10-14 Tue 19:02:40] <DocScrutinizer05> http://bit.ly/1z78rgQ  is there any info available to mere mortals yet on how this crap crept in? [2014-10-14 Tue 19:02:55] <mist> No more information is available18:05
arhuacoDocScrutinizer05: In the last comment they say they do not know. Weird...20:15
--- Wed Oct 15 201400:00

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