![]() |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Umm, seems like something is not working. I made the i2c tinkering stuff succesfully and installed the rpm and the daemon is running.
But, the dips seem unresponsive. tail -f /home/nemo/diplog just gives me: /home/nemo/diptoh/dip4on.sh /home/nemo/diptoh/dip5off.sh No matter what switches I dip. And journalctl -f | grep diptoh doesn't give me any print. I tried reattaching the oh but without any success. |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
journalctl as root.
Something has happened atleast, maybe. Today i did use diptoh whole day without issues. The gpio-expander is tricky, as it looses its config if it looses power. I had to add some paper (2 layers of 80g) under the pcb (between 3dprint and pcb) for reliable contact. (<< dirkvl FYI) If fails, just lift the toh few mm from the bottom left corner, to make the microswitch toggle. |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
will adjust design
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
I've received mine a few days ago but it was quite a busy week so I didn't have enough time to play with it. First impressions: toh is great, the whole finish seems really professional (thanks so much dirk) and kimmoli's work on the software side is just genious (just in the thought that with the press of a dip switch I can run my custom bash scripts...)
I had a few problems with the stability of it and it seems that somehow occasionally the pins lose contact with the board (or something else is happening) and so I have to take off toh and put it back again. After removing the board from toh and putting some stickers between (following the advice of paper suggested above by kimmoli) the issue seems to be appearing less frequently. I have noticed though that sometimes after turning on the first dip it works but any other change won't until I refit toh. From the example scripts provided by kimmoli those for display do not work simply because there is no mcetool in my jolla (fixed by installing it with pkcon: "pkcon install mce-tools") instead I added a simple script for enabling/unmasking disabling/masking aliendalvik which is extremely handy: For Masking/disabling: Code:
systemctl stop aliendalvik.serviceCode:
systemctl unmask aliendalvik.serviceNow I wish I knew of a way for enabling/disabling the led flashlight from the command line.... Question: Do we need to keep i2ctool installed after we finish the initial process of setting up the diptoh? |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
Also included aliendalvik sample (w/o masking) there. thanks. Quote:
|
Re: DIP_TOH -- lots of toggles! -- orders 12/12
excellent, thanks for the examples Kimmo.
I will look and try to make a script to enable/disable wifi - will post it here if successfull. |
Re: DIP_TOH -- lots of toggles! -- orders 12/12
Quote:
PreferredTechnologies = bluetooth,wifi,cellular code for on: Code:
dbus-send --system --print-reply --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:"Powered" variant:boolean:trueCode:
dbus-send --system --print-reply --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:"Powered" variant:boolean:false |
Re: DIP_TOH -- lots of toggles! -- orders 12/12
Now what I'm looking for is a way to have a switch which says:
"On => switch radio to 4G" "Off => switch radio to 2G" That way I can have 2G when not using the screen, and when using the screen, I manually switch to 3G or 4G. |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Code:
dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.RadioSettings.SetProperty string:"TechnologyPreference" variant:string:"umts""umts" for 3G "gsm" for 2G |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
Thanks!!! |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
The switches still seem not to work here, though the scripts do work as intented if I manually run them with sh dipXon.sh as root in the terminal.
journalctl -f | grep diptoh finds no journal, or shows nothing (no error either) if run as root. And diplog shows nothing new (but there are some lines originating from my first few trials when the script were still default). How can I check that the service is running/not conflicting with any other OH service? |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
That sounds strange;
Quote:
To check what is running, ps -A | grep toh When diptoh is not attached, you should see this: Code:
95 ? 00:00:00 irq/331-toh-eveAnd you could try to add 2-3 layers of paper between the PCB and 3D print. Just small ~10mm pieces to position where contacts are. Or you can try to manually start the diptoh systemctl start harbour-diptoh-daemon (open another ssh session to do this, or New Window from fingerterm) and keep that journal running on the other.) Hope this helps. |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Thanks Kimmo.
Then, the service is running correctly. I had toholed running though, so I stopped it, disabled it, and I restarted diptoh but still no fortune when trying the switches again. I already added two layers of papers between the PCB and the OH 3D print yesterday. :[ Here's what I get when attaching diptoh: http://hastebin.com/zuwapoqeyu.avrasm Apparently there's something wrong with the EEPROM. That's weird because I did check that I entered the correct values when I used i2ctool, and after the first trials, the scripts where correctly echoing to diplog. |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Did you have prototype toholed? (my bad memory)
The new versions should not be running, only when it is actually attached, just like the diptoh öh. Copied it here to easier commenting: Sep 21 20:27:16 Jolla systemd[1]: Stopping Diptoh Other Half... ^ this is caused by opening the TOH microswitch (removing TOH), then it kills the daemon. Sep 21 20:27:16 Jolla harbour-diptoh-daemon[791]: Received signal SIGTERM Sep 21 20:27:16 Jolla harbour-diptoh-daemon[791]: vdd set to off Sep 21 20:27:16 Jolla harbour-diptoh-daemon[791]: diptoh exiting, bye Sep 21 20:27:16 Jolla systemd[1]: Stopped Diptoh Other Half. ^ daemon is now shutdown, but there is prints from daemon so it has been started at some point. Sep 21 20:27:19 Jolla kernel: toh-core toh-core.0: No valid eeprom present ^ This occurs when TOH microswitch is pressed again, but there is no contact between toh pcb and phone. If you try this when attaching toh: start from top, and while applying pressure to the area where PCB is (making sure there is contact) and bending the print a little (2-3mm) to make the microswitch-corner to be last to snap in. (I have discussed with Jolla to add some retries/delay to the eeprom reading procedure) |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Yep I had prototype toholed, have I missed some new versions of the software?
Here's what happens when attaching the toh as you said: # Here I just removed diptoh: [root@Jolla nemo]# journalctl -f | grep toh Sep 21 20:51:28 Jolla systemd[1]: Stopped Diptoh Other Half. # And reattached it as you said: Sep 21 20:52:13 Jolla kernel: platform toh-core.0: parent platform should not be sleeping Sep 21 20:52:13 Jolla kernel: wakeup wake lock: tohd Sep 21 20:52:13 Jolla kernel: active wake lock tohd Sep 21 20:52:13 Jolla systemd[1]: Starting Diptoh Other Half... Sep 21 20:52:13 Jolla systemd[1]: Started Diptoh Other Half. Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: diptoh starting, yay. My version is 0.1 Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: vdd set to on Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: mcp23009 initialized Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: Worker started Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: Write failed. Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: Dips toggled: 111111 Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: Nothing actually changed Sep 21 20:52:16 Jolla tohd[783]: timeout; terminating discovery Switches seem to work now. :eek: ... Well they stopped working 2 minutes later. :( |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
The journal you copied is ok. That one "write error" is unknown, and i have it too. Do you have all switches at position 1 (on) ? And you dont see anything if toggling now? |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Yep, all were at position 1. First trials have worked (demo-mode, bluetooth, wlan), and then switches have stopped working (even those I cited).
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
öö, so it works few times now? (or was this the first time you tried it and it worked?)
set all to OFF and reattach, does it show like this then Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: Dips toggled: 000000 Sep 21 20:52:13 Jolla harbour-diptoh-daemon[27420]: Nothing actually changed |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Yes Kimmo, I edited the previous message (20:54) when I realized switches were working with the custom scripts! But it stopped working a few minutes later. I removed the diptoh and replaced it again the way you advised, and it works again. I guess it stopped working yesterday because of a bad contact, or because perhaps I moved two switches at the same time inadvertently? Would that be an issue if that happens? Considering that I have very short nails and that the switches are tiny, this can happen quite often. :)
Anyway, thanks for your very valuable help Kimmo! |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
https://github.com/kimmoli/diptoh-da.../dips.cpp#L172 I think there is still contact issues. I had to reset it twice (just liftng that one corner few mm), specially if i have phone in my pocket. Quote:
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
You're right, I just checked after having carried the Jolla in my jean's pocket today, and the switches had stopped working again. Lifting up the bottom corner solved it.
I noticed that the switches had moved from "off" to "on" or the opposite while in my pocket, though I did not pick the Jolla from my pocket very often today (it was just sitting there in my pocket). That could be an issue to solve for future revisions of the diptoh (but future versions would need larger buttons or larger space between them anyway, to be more useable for people like me who have short nails). These pockets can be a bit tight though, that should be OK in almost every other pants I have. Speaking of that, I'd appreciate any built-in system to help removing OHs for people who have no nails. I have to find a tool and slightly scratch my Jolla every time I must remove an OH (and I really have to, there is no way I can remove a custom OH with no tool; don't laugh at me). A small notch in future 3D prints, or small lever, or anything, I don't know. I'm glad I made your ancestors proud! Now finish and ship some toheinks and you'll be the greatest offspring ever. :] |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
First of all:
Thanks kimmoli and dirk for both hard- and software developing for the DIPTOH - really great!!!! I'm doing some experiments with different calls at the moment and came to one point: Is it possible to check the position of a switch? If I don't miss anything we do it the other way round: using a switch calls a script. Can we also read out the positions of all switches? asys3 |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
Daemon them compares read states to previous states, and executes a specified script of state which really changed. Quote:
To prevent the whole diptoh to die after single connection break, i think i will add timer to periodically check and re-init gpio expander if needed. |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Eh, and what's about the button? Where is the area, how should it be pressed and whether there'll be capability to run a script on this interrupt as well?
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
Not yet implemented in the daemon though. Update coming, ETA 12 hours |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
tomorrow the last shells arrive, then the last ones go on the mail!
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
OBSOLETE
http://talk.maemo.org/images/icons/icon2.gif Update 0.4-1 Download RPM here: https://app.younited.com/?shareObjec...9-7726d2d559f0 Update will not overwrite your dip*.sh scripts (but make a back e.g. tar czvf diptoh.tgz /home/nemo/diptoh/ just to be sure)
|
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
Or does someone have a better idea? |
Re: DIP_TOH -- lots of toggles! -- orders 14/19
Quote:
This shouldn't happen if diptoh is not attached to phone, as it is not started in that case. ------- :mad: Ok, seems that during reboot, it gives sporadic interrupt, at first reboot it did execute dip1on and dip1off, and on 2nd boot only dip1on. I raise an issue to me about this, and try to fix it asap (ETA 5 hours) |
Re: DIP_TOH -- lots of toggles! -- sold out!
Well, for me it doesn't boot with whatever OH (or not any) is attached.
|
Re: DIP_TOH -- lots of toggles! -- sold out!
http://talk.maemo.org/images/icons/icon2.gif Update 0.5-1
RPM here https://app.younited.com/?shareObjec...3-3f69e7ababe1 Changes:
|
Re: DIP_TOH -- lots of toggles! -- sold out!
Quote:
|
Re: DIP_TOH -- lots of toggles! -- sold out!
Quote:
but... it is really hard to say what could gone wrong there.. the daemon itself does not write anything anywhere, except to /sys/class/gpio/export /sys/class/gpio/gpio67/... /sys/devices/platform/reg-userspace-consumer.0/state That updated version uses libiphb (compiled within) but i use exactly same stuff in toholed. I will seek advisory from irc |
Re: DIP_TOH -- lots of toggles! -- sold out!
|
Re: DIP_TOH -- lots of toggles! -- sold out!
Well, only factory reset helped. Now after installing the latest version phone behaves fine - though it doesn't look like daemon is working. Scripts do not seem to activate, and there are also no records in journal. My EEPROM is supposed to be programmed - as oh was shipped out after the related post.
So kimmoli, probably will need to have a lunch with you for troubleshooting. |
Re: DIP_TOH -- lots of toggles! -- sold out!
Quote:
|
Re: DIP_TOH -- lots of toggles! -- sold out!
Got mine. I thought that it'd be mostly a novelty due to dip beeing slightly fiddly, but it's very usable. Now we only need more apps with dbus-interfaces.
Only problem is that can't use it toghether with the lastu case. |
Re: DIP_TOH -- lots of toggles! -- sold out!
Is it only me or after the latest Jolla update (1.1.0.38) the DIP_TOH stopped working?
|
Re: DIP_TOH -- lots of toggles! -- sold out!
It still works for me. However, it stops working every few days with no apparent reason, I have to remove it and reinstall it to make it work again, which is terrible for me as I my nails are not long enough to remove an OH. :)
More importantly, I'm not sure it is related to the diptoh but let's throw it just in case someone experienced the same thing: I lose network (phone and data) several times a day approximately since I use diptoh. Sailfish utilities to restart network does not help, nor does my diptoh script to switch from 3/4G to 2G. Not more success with the flight mode toggle. I lose network in areas where there is good coverage, be it 2G, 3G or 4G, and in several distant locations (I moved like 800 km last week and the problem occurred in all areas). There is not necessarily a notification for the error, just the phone network gauge displayed as empty and no data connection indicator. Only rebooting helps solving the issue (instantly). Is it possible that it is related to the diptoh? I would happily test that by using toholed for a few weeks but it doesn't offer the update when I plug it and I have no time right now to investigate why. And there is no way I will put a regular OH on my Jolla. :) |
| All times are GMT. The time now is 15:35. |
vBulletin® Version 3.8.8