IRC log of #maemo for Thursday, 2018-09-27

*** Kabouik- has quit IRC00:13
*** Kabouik has joined #maemo00:13
*** dafox has joined #maemo00:14
*** blahdeblah29 has joined #maemo00:34
*** blahdeblah29 has quit IRC00:37
*** Pali has quit IRC00:53
*** soulz12 has joined #maemo00:53
*** soulz12 has quit IRC00:55
*** phlixi_ has quit IRC01:04
*** phlixi has joined #maemo01:05
*** Kinny11 has joined #maemo01:07
*** niston26 has joined #maemo01:11
*** Kinny11 has quit IRC01:12
*** niston26 has quit IRC01:13
*** ceene has quit IRC01:15
*** ceene has joined #maemo01:16
*** ravelo has quit IRC01:21
*** dminuoso9 has joined #maemo01:35
*** dminuoso9 has quit IRC01:38
*** wraeth26 has joined #maemo01:59
*** wraeth26 has quit IRC02:04
*** octe12 has joined #maemo02:05
*** octe12 has quit IRC02:07
*** dadrc has joined #maemo02:10
*** Anthaas_ has joined #maemo02:11
*** heroux has quit IRC02:11
*** heroux_ has quit IRC02:12
*** dadrc has quit IRC02:12
*** Anthaas_ has quit IRC02:15
*** heroux has joined #maemo02:34
*** heroux_ has joined #maemo02:34
*** logan-15 has joined #maemo02:38
*** ciil18 has joined #maemo02:39
*** logan-15 has quit IRC02:39
*** ciil18 has quit IRC02:42
*** atlas27 has joined #maemo03:00
*** atlas27 has quit IRC03:04
*** spiiroin has quit IRC03:13
*** infobot has quit IRC03:18
*** infobot has joined #maemo03:21
*** ChanServ sets mode: +v infobot03:21
*** grumble has quit IRC03:25
*** gurmble has joined #maemo03:25
*** gurmble is now known as grumble03:26
*** grumble has quit IRC03:36
*** grumble has joined #maemo03:37
*** Hijinks20 has joined #maemo04:04
*** Hijinks20 has quit IRC04:10
*** chainsawbike has quit IRC04:13
*** chainsawbike has joined #maemo04:17
*** Anaphylaxis3 has joined #maemo04:42
*** paraxial23 has joined #maemo04:42
*** FalconSpy has joined #maemo04:44
*** Anaphylaxis3 has quit IRC04:46
*** sarka6 has joined #maemo04:50
*** sarka6 has quit IRC04:52
*** Orez27 has joined #maemo04:56
*** Orez27 has quit IRC05:00
*** lucyoa has joined #maemo05:04
*** lucyoa has quit IRC05:06
*** newuser__ has joined #maemo05:28
*** drrty2 has quit IRC05:32
*** newuser__ has quit IRC05:37
*** tm has quit IRC06:11
*** tm has joined #maemo06:15
*** phlixi has quit IRC06:31
*** phlixi has joined #maemo06:32
*** florian_kc has joined #maemo06:46
*** florian has quit IRC06:50
*** Kilroo has joined #maemo07:02
*** spiiroin has joined #maemo07:15
*** Quick_Wango9 has joined #maemo07:16
*** Quick_Wango9 has quit IRC07:20
*** Juesto has joined #maemo07:31
*** Juesto has joined #maemo07:31
*** ravelo has joined #maemo07:38
*** spiiroin has quit IRC07:40
*** Kilroo has quit IRC07:46
*** spiiroin has joined #maemo08:11
*** dafox has quit IRC08:19
*** Fairy17 has joined #maemo08:40
*** Fairy17 has quit IRC08:45
*** shentey has joined #maemo08:58
*** QueenElsa has joined #maemo09:00
*** movsb has joined #maemo09:03
*** QueenElsa has quit IRC09:04
*** movsb has quit IRC09:06
*** frankie22 has joined #maemo09:06
*** dafox has joined #maemo09:06
*** frankie22 has quit IRC09:10
*** heroux_ has quit IRC09:13
*** heroux_ has joined #maemo09:13
*** shentey has quit IRC09:44
*** ravelo has quit IRC09:48
*** dafox has quit IRC09:53
*** brolin_empey has quit IRC10:00
*** skaji28 has joined #maemo10:02
*** skaji28 has quit IRC10:02
*** brolin_empey has joined #maemo10:14
*** Kabouik_ has joined #maemo10:20
*** jurop has joined #maemo10:27
*** Kabouik_ has quit IRC10:27
*** jupart11 has joined #maemo10:28
*** jupart11 has quit IRC10:30
*** jskarvad has joined #maemo10:35
*** geaaru has joined #maemo10:39
*** Kabouik_ has joined #maemo10:41
DocScrutinizer05IroN900:~# cat /sys/devices/platform/musb_hdrc/charger10:49
DocScrutinizer05110:49
KotCzarnyhe needs to differentiate between charger and charging via computer10:50
DocScrutinizer05^^^10:50
*** Rivkin has joined #maemo10:52
DocScrutinizer05/sys/devices/platform/musb_hdrc/charger == 1 : D+/- short10:53
DocScrutinizer05when you connect a charger that doesn't short D+ and D-, your device won't charge. So... exactly what you asked for10:54
*** Konsieur has joined #maemo10:56
*** Kabouik_ has quit IRC10:56
*** Juesto has quit IRC10:58
DocScrutinizer05and reading the full backlog, this is actually _not_ what sunshavi is interested in. They want to know if device is connected to a PC USB data connection10:58
DocScrutinizer05and I think the approach is pretty random10:59
*** jurop has quit IRC10:59
DocScrutinizer05sunshavi's question seems to be "can I send a signal from N900 to PC?" and to answer this we need to know which is the exact transport mechanism for the signal. USB networking with ssh? USB node polling? usb-tty?11:05
*** florian_kc has quit IRC11:06
DocScrutinizer05original question: >>[2018-09-26 16:01:53] <sunshavi> Hi guys. is there a way of knowing if pc suite mode is active?<<  Yes there is, but I don't know for sure right now how to check. Possibly lsmod11:07
DocScrutinizer05ask pali11:07
*** derlafff12 has joined #maemo11:08
MaxdamantusMaybe by seeing if g_nokia appears in /proc/modules, as opposed to g_file_storage? Dunno if that's an accurate determiner though; I always use either g_file_storage or g_ether.11:11
* Maxdamantus managed to disable that "PC suite" dialogue because it would annoyingly unlock the screen when plugging a USB cord in.11:12
DocScrutinizer05IroN900:~# cat /sys/devices/platform/musb_hdrc/mode11:12
DocScrutinizer05b_peripheral11:12
DocScrutinizer05PC-Suite Mode11:12
*** derlafff12 has quit IRC11:13
DocScrutinizer05b_idle == unplugged11:13
DocScrutinizer05HTH11:13
DocScrutinizer05UNDEFINED == mass storage mode11:14
DocScrutinizer05until mounted, then b_peripheral11:15
*** jurop has joined #maemo11:22
*** jurop has left #maemo11:22
DocScrutinizer05anyway note that [[ "b_peripheral" == `cat /sys/devices/platform/musb_hdrc/mode ` ]] still doesn't assert there's for example a working established network to run a ssh connection to the PC11:25
DocScrutinizer05you know it failed when "ssh $PC mynotifycmd" returns with error11:26
DocScrutinizer05>>... and to answer this we need to know which is the exact transport mechanism for the signal.<<11:27
DocScrutinizer05KotCzarny: sunshavi: ^^^11:30
DocScrutinizer05>><sunshavi> Wizzup: I have the notification script done<< mind to share via pastebin?11:31
*** koenig17 has joined #maemo11:38
*** koenig17 has quit IRC11:39
*** Sigyn has quit IRC11:44
*** Sigyn has joined #maemo11:45
*** ChanServ sets mode: +o Sigyn11:45
*** Sigyn has quit IRC11:45
*** Sigyn has joined #maemo11:45
*** ChanServ sets mode: +o Sigyn11:45
*** Sigyn has quit IRC11:45
*** Sigyn has joined #maemo11:48
*** Sigyn has joined #maemo11:56
*** ChanServ sets mode: +o Sigyn11:56
*** fbsd has joined #maemo11:59
*** florian has joined #maemo12:00
*** fbsd has quit IRC12:02
*** tkd12 has joined #maemo12:14
*** tkd12 has quit IRC12:18
*** ravagetalon has joined #maemo12:34
*** VLetrmx4 has joined #maemo12:36
*** marnej26 has joined #maemo12:48
*** Eatsoup_ has joined #maemo13:02
*** Eatsoup_ has quit IRC13:04
*** c-dog has joined #maemo13:05
*** cyteen has joined #maemo13:12
*** eMHa has joined #maemo13:15
*** lionel22 has joined #maemo13:21
*** lionel22 has quit IRC13:25
*** swidi27 has joined #maemo13:26
*** lizzie13 has joined #maemo13:52
*** lizzie13 has quit IRC13:53
*** Guest20815 has joined #maemo13:53
*** kuzetsa14 has joined #maemo13:55
*** kimmyk13 has joined #maemo13:56
*** kimmyk13 has quit IRC13:58
*** kuzetsa14 has quit IRC14:00
*** edge56310 has joined #maemo14:00
*** edge56310 has quit IRC14:02
VajbI've noticed that when I charge my n900 and wall charger flag is set absent it means that n900 thinks that it is connected to pc.14:10
WizzupDocScrutinizer05: afaik the /mode in musb_hdrc doesn't help distinguish between wall plug and pc14:22
WizzupDocScrutinizer05: it can also be idle when no gadget it loaded, for example14:22
DocScrutinizer05mode is D+- short14:23
DocScrutinizer05oops sorry nope14:23
DocScrutinizer05mode is what the MUSB state machine is in14:23
KotCzarnywhich might be totally random sometimes14:23
DocScrutinizer05yes14:23
DocScrutinizer05don't tell the father of H.E.N ;-D14:24
* DocScrutinizer05 feels that headache again14:24
DocScrutinizer05~hen14:25
infobotwell, hen is hostmode-easy-now, or http://talk.maemo.org/showthread.php?t=65232, or see ~hostmode14:25
DocScrutinizer05~hostmode14:25
infobothmm... hostmode is http://talk.maemo.org/showthread.php?p=652330, or http://www.youtube.com/watch?v=fkCDyUO0sKQ, or see ~hostmode-powered14:25
sunshaviDocScrutinizer05: good morning at least for me. the mechanism is this one14:28
sunshaviwhen sms or phone call arrives a python scripts sends a file by bluetooth push notification to workstation. and workstation shown the notification (there a process reading when a new file arrives to a folder). that was in case phone is lost for not having and ssh-key on my workstation (just in case)14:30
DocScrutinizer05Vajb: you mean you connect device to a charger without D+- short (cat /sys/devices/platform/musb_hdrc/charger  ->0 )? Yes, that is the same situation like immediately after plugging device to a PC host, before ENUM14:31
DocScrutinizer05afaik device will constantly try to communicate to host to run ENUM14:32
DocScrutinizer05no charging will be done14:33
sunshavithis is the script on n900 http://termbin.com/544z14:33
sunshavi14:33
*** FalconSpy25 has joined #maemo14:33
Wizzuphttps://github.com/maemo-leste/hildon-status-bar-usb/blob/master/udev-helper.c#L15214:33
DocScrutinizer05sunshavi: mhm, so how is this related to USB?14:34
sunshavithe problem happens when i disconnect|unplug the device from my workstation14:34
sunshavino usb host (workstation). then no no bluetooth host 4 receiving the file14:35
*** mirrorbox has joined #maemo14:36
DocScrutinizer05???14:37
*** FalconSpy25 has quit IRC14:37
sunshaviif not host an errors happens within the python script and I would need to restart the process. so process should just do his work when connected to my workstation. All of the if on the python script is for avoiding the error14:39
sunshavibrb. time for doing some duties here14:39
*** mirrorbox has quit IRC14:41
*** heroux_ has quit IRC14:44
*** heroux has quit IRC14:45
VajbDocScrutinizer05: maybe. Bnf shows wall charger as absent. It will charge but keeps charge under 500mah. This happanes randomly when i plug charger in14:49
*** heroux has joined #maemo14:51
*** heroux_ has joined #maemo14:51
*** heroux_ has quit IRC14:57
*** heroux has quit IRC14:57
*** Batholith27 has joined #maemo15:04
*** heroux has joined #maemo15:05
*** heroux_ has joined #maemo15:05
DocScrutinizer05bnf?15:05
DocScrutinizer05I seem to recall this is an app that dhows some system diagnostics, right? No idea what it does in detail15:06
DocScrutinizer05sunshavi: >>if not host an errors happens within the python script and I would need to restart the process<< no, I think you should catch the error within the script and handle it15:08
Vajbit shows battery info and charging state, remaining time etc15:09
Vajbwhat it does is it pulls info from system battery related file (can't recall the name) and just shows them with info what they are15:10
sunshaviDocScrutinizer05: there is an assert line there (watch the source code)15:11
sunshavithe error happens on that line (assert pipe.returncode == 0 and not errout)15:11
sunshavibecause i am debugging the script. I am still tuning it. But it works. I just need to catch some corner cases15:12
Vajbas I said my device randomly pops out the dialog asking wether I want it to massmedia or usb state and if I don't reset the state with usb-host-mode it will charge only slow and wall charger absent flag stays on.15:12
Vajbother way to reset this is reboot obviously.15:13
DocScrutinizer05Vajb: no idea what you're doing. Yes there is a race condition introducing randomness into charger detection, but I never seen a deadlock from that.15:17
DocScrutinizer05sunshavi: I completely fail to understand the concept of what you're doing. USB has nothing to do with bluetooth. You don't need to test any arbitrary USB state to find out whether or not a BT transaction succeeds or not15:19
DocScrutinizer05AIUI you want to avoid running the BT command under certain conditions (no PC in vicinity) since >>an errors happens within the python script and I would need to restart the process<<  I think you need to catch the error so it does NOT abort the python script and rather tells you that no PC in vicinity15:23
*** Guest74955 has joined #maemo15:25
sunshavidocscrutinizer05: how should i know if device if plugged to my workstation, and ton to the usb-wall-charger?15:26
sunshavis/ton/not/15:26
infobotsunshavi meant: docscrutinizer05: how should i know if device if plugged to my workstation, and not to the usb-wall-charger?15:26
DocScrutinizer05why do you want to know that?15:26
DocScrutinizer05how is that even relevant?15:27
sunshaviwhen dev is connected to different machine probably that machine that is not my workstation does not have a bluetooth device15:27
sunshavion n900 there is no l2ping utility. that could solve the issue too15:27
DocScrutinizer05hm?15:28
*** Guest74955 has quit IRC15:28
sunshavil2ping is for checking with a device with an specific mac-address in on reach15:28
sunshavis/with/when/15:28
infobotsunshavi meant: l2ping is for checking when a device with an specific mac-address in on reach15:28
DocScrutinizer05why do you need USB?15:29
*** eMHa has quit IRC15:30
sunshavifor testing n900 is plugged on my workstation (1. check usb-connection; 2. see if my workstation-usb0 has the hardcoded ip needed)15:30
DocScrutinizer05WHY???15:30
sunshaviwhen you send a file by bluetooth you need to give the device-bluetooth-address15:31
sunshavias a parameter15:31
DocScrutinizer05how's that related to USB?15:31
sunshavithe problem is: "how could be identified my machine from other machines?"15:32
DocScrutinizer05err, doesn'tBT do that for you?15:32
*** ladders13 has joined #maemo15:32
sunshavii am using for that a mechanism that involves usb+ip15:32
DocScrutinizer05I always thought that's what BT pairing is meant for15:32
*** ladders13 has quit IRC15:33
DocScrutinizer05whatever that "mechanism", I don't understand it and think it's nonsense15:33
*** eMHa has joined #maemo15:33
sunshavin900 is paired with several other devices15:34
DocScrutinizer05this is a classical yet very massive and wird instance of an XY problem15:35
DocScrutinizer05weird*15:36
DocScrutinizer05aiui you do a ping to USB-networked PC host. You as well could do a `ssh notifyuser@PC notify`15:38
DocScrutinizer05or you forget about all USB and send your BT data to the right device and catch any "transmission failed"15:39
sunshaviyes that could do the work too but a little insecure. bt is safer15:39
DocScrutinizer05no15:39
DocScrutinizer05this is NOT insecure at all15:39
DocScrutinizer05anyway either BT or USB could do the whole task, you don't need both concurrently15:40
DocScrutinizer05actually THIS is sort of insecure15:40
sunshavii am almost there with my approach. One of your first lines is going to be helpful with the issue. I am going to code that tonight15:40
*** spiiroin has quit IRC15:41
*** SET1 has joined #maemo15:41
DocScrutinizer05good luck! I'm not going to help implement a flawed broken-by-design "solution"15:41
DocScrutinizer05USB doesn't provide *any* info about what you can expect to find on BT15:43
*** SET1 has quit IRC15:47
DocScrutinizer05why do you think BT is more secure than ssh?15:48
DocScrutinizer05actually uploading arbitrary files to your PC via BT sounds damn dangerous, particularly compared to a ssh login that allows only one particular command to execute (add the allowed command to user "notifyuser"'s ~notifyuser/.ssh/authorized_keys line) and needs a proper keypair to do so15:55
*** spiiroin has joined #maemo15:58
DocScrutinizer05both BT and ssh are virtually equally uncrackable, and when you lose the N900, then the ssh solution only enables the attacker to trigger a notification on your PC while the disclosed BT pairing key allows attacker to upload arbitrary files aiui - something you definitely want to avoid by all means since such arbitrary file might be a virus or whatever and take over your complete PC15:59
*** dkg2 has joined #maemo16:00
DocScrutinizer05even worse, BT allows to do so wireless over the air while the already uncritical exploit of unsolicited SMS notification could only happen when the attacker has physical connection to your PC USB jack (or otherwise log in to your PC), to establish a network and open a ssh session16:02
DocScrutinizer05s/ unsolicited / bogus forged /16:08
infobotDocScrutinizer05 meant: even worse, BT allows to do so wireless over the air while the already uncritical exploit of bogus forged SMS notification could only happen when the attacker has physical connection to your PC USB jack (or otherwise log in to your PC), to establish a net...16:08
*** eMHa has quit IRC16:09
*** eMHa has joined #maemo16:09
*** eMHa_ has joined #maemo16:11
*** eMHa has quit IRC16:11
DocScrutinizer05sunshavi:   man sshd|less -j26 +'/command="uptime"'16:24
DocScrutinizer05for your purposes a command="cat >/tmp/notificationtext && popup_notification" prolly will already do the whole trick16:27
DocScrutinizer05or, for added safety (flood protection): instead of `cat >` use `dd bs=1 count=$INT_MAXCHARS of=`16:31
DocScrutinizer05now, on N900, do `cat SMScontent.txt|ssh notifyuser@neo900` and up pops th notification on your PC. Absolutely no risk except a n900 thief could make offensive notifications pop up on your PC16:35
DocScrutinizer05IF they had access to ssh-login to your PC (unlike BT where they need to be nearby, within RF range, only)16:36
*** Simonious3 has joined #maemo16:38
DocScrutinizer05I for one never use USB for networking, WLAN is so much more convenient16:40
*** Simonious3 has quit IRC16:42
*** c4757p20 has joined #maemo16:52
*** jurop has joined #maemo16:58
*** jurop has left #maemo17:00
*** darkSeid has joined #maemo17:02
DocScrutinizer05actually you better bundle all the "dd bs=1 count=$INT_MAXCHARS of=/tmp/notificationtext && popup_notification" into a bash script mynotify.sh and only hava a command="mynotify.sh" in authorized_keys17:04
DocScrutinizer05if you want to implement this, don't hesitate to ask about details17:06
*** darkSeid has quit IRC17:06
DocScrutinizer05actually not even a dedicated new user "notifyuser" is needed, you can run this under your default user account17:08
DocScrutinizer05all you need is a dedicated pk-pair for this, with pubkey on N900 and privkey on your PC17:09
sunshavidocscrutinizer05: on the contrary i almost never wlan on n900. Just usb and also bluetooth when needed. Also for consideration both of my n900 have a broken screen. so I access desktop by vnc over usb|bt17:32
sunshaviand fyi my pc priv key is on n90017:33
sunshaviso from home i could access and modify the complete phone from any network connection.17:35
sunshavidocscrutinizer05: thanks for your help17:36
*** Konsieur has quit IRC17:38
*** VladimirGl7 has joined #maemo17:44
*** VladimirGl7 has quit IRC17:46
*** Janusz5 has joined #maemo17:49
*** Janusz5 has quit IRC17:51
DocScrutinizer05>>and fyi my pc priv key is on n900<< irrelevant for this situation17:57
DocScrutinizer05err wait. No. This is what already exactly you need. If you had not swapped the meaning of privkey and pubkey. The provjkey is on the originating side, the pubkey on the "server" you log in to17:59
DocScrutinizer05when you log in to N900 from your PC then the privkey is on PC18:00
DocScrutinizer05for the solution I sketched above, you need a dedicated key pair exclusively for this solution, you place the pubkey on PC so the N900 can log in to PC using the privkey on N900, and you modify the pubkey on PC so it only works for exactly one command: mynotify.sh18:02
sunshavimy pc can read my phone or exec any ssh cmd on the phone. phone needs pwd when accesing pc18:03
DocScrutinizer05^^^18:03
DocScrutinizer05yes, you generally don't want password-less access from mobile devices to your PC, since you could lose the mobile device18:04
sunshaviyes a dedicated key pair could be the answer18:04
DocScrutinizer05in this case however the pubkey gets modified so it works for exactly ONE command only18:05
DocScrutinizer05and doesn't need password for executing this one command18:05
sunshavifor giving you the complete picture. i do the phone calls from my desktop-contacts app18:06
sunshavialso i send sms's from my desktop-contacts app18:06
DocScrutinizer05you can install this keypair on top of whatever is already there, since you can have multipkle authorized_keys lines18:06
*** bbielsa_ has joined #maemo18:08
*** Pali has joined #maemo18:10
*** JohnDoe215 has joined #maemo18:39
*** JohnDoe215 has quit IRC18:42
*** Kabouik_ has joined #maemo18:52
*** Kabouik has quit IRC18:55
*** wrenny_b has joined #maemo18:59
*** wrenny_b has quit IRC19:02
*** devlaf0 has joined #maemo19:15
*** devlaf0 has quit IRC19:19
*** drrty has joined #maemo19:22
*** tris9 has joined #maemo19:26
*** florian has quit IRC19:27
*** tris9 has quit IRC19:28
*** c-dog has left #maemo19:38
*** klaxa26 has joined #maemo19:52
*** ua has joined #maemo20:01
*** ua has quit IRC20:05
*** xymantec has joined #maemo20:06
*** xymantec has quit IRC20:11
*** shrifbot has joined #maemo20:19
*** shrifbot has quit IRC20:21
*** matti__ has joined #maemo20:22
*** ravelo has joined #maemo20:25
*** go|dfish14 has joined #maemo20:25
*** matti__ has quit IRC20:27
*** go|dfish14 has quit IRC20:30
*** shentey has joined #maemo20:41
*** florian_kc has joined #maemo20:47
*** Nevolution217 has joined #maemo21:14
*** Nevolution217 has quit IRC21:18
*** eMHa_ has quit IRC21:19
*** sadmac9 has joined #maemo21:23
*** jskarvad has quit IRC21:23
*** sadmac9 has quit IRC21:25
*** Apocalyptic6 has joined #maemo21:31
*** ozfalcon has joined #maemo21:34
*** Apocalyptic6 has quit IRC21:35
*** ozfalcon has quit IRC21:36
*** shentey has quit IRC21:41
*** shentey has joined #maemo21:41
*** eMHa_ has joined #maemo21:42
*** Elronnd29 has joined #maemo21:56
*** Elronnd29 has quit IRC22:00
*** geaaru has quit IRC22:03
*** stryngs has quit IRC22:29
*** stryngs has joined #maemo22:40
*** florian_kc is now known as florian22:42
*** shentey has quit IRC22:43
*** thc20210 has joined #maemo23:04
DocScrutinizer05Computrace.LoJack->LoJax  :-o23:11
*** lathiat_ has joined #maemo23:23
*** lathiat_ has quit IRC23:24
*** florian has quit IRC23:25
*** xqb13 has joined #maemo23:34
*** angel_killah9 has joined #maemo23:36
*** sunshavi has quit IRC23:41
*** analogical17 has joined #maemo23:41
*** angel_killah9 has quit IRC23:41
*** analogical17 has quit IRC23:42
*** tacegory15 has joined #maemo23:44
*** tacegory15 has quit IRC23:46
*** dafox has joined #maemo23:49
*** ackjewt0 has joined #maemo23:56

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