Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package uniscy_demo #174

Closed
MerlijnWajer opened this issue Sep 3, 2018 · 12 comments
Closed

Package uniscy_demo #174

MerlijnWajer opened this issue Sep 3, 2018 · 12 comments

Comments

@MerlijnWajer
Copy link
Member

https://github.com/pavelmachek/unicsy_demo

Would be a useful tool to test various functionality/features. Pavel wrote:

Would it be possible to package unicsy_demo?
https://github.com/pavelmachek/unicsy_demo Right now it is useful for
driver debugging, for example it can estimate battery remaining even
when battery is not calibrated. It can also reboot / poweroff the
machine, and read various sensors... When ofono is integrated, it can
also initiate calls and handle SMSes...

And, regarding packaging:

It should go to /usr/share/unicsy, dependencies are python-gtk2 for UI
parts and python-dbus ofono for the phone stuff.

I can apply patches with the debian/ directory, or give you repository
access, or attempt to do it myself (but I may need some help).
@MerlijnWajer MerlijnWajer added this to the Beta release for the N900 milestone Sep 3, 2018
@MerlijnWajer
Copy link
Member Author

@pavelmachek - I will try to look at this soon. I have a question, though. I haven't used/run uniscy_demo yet but it seems to do a lot of initialisation. Will some of that initialisation bite (or: fight with) the running system daemons, or should it mostly be restricted to what parts the user wants to use? We don't -use- ofono currently, but it's running on the N900 by default, so that should be fine. But if it tries to set brightness, it might have to fix for that with mce, for example.

@pavelmachek
Copy link

pavelmachek commented Nov 25, 2018 via email

@MerlijnWajer
Copy link
Member Author

I tried to start unicsy_demo, and it doesn't quite work yet (either user or root):

# python2 /usr/share/unicsy/startup/x_startup.py
Unicsy starting up
Not on debian
sudo: unable to resolve host n900devuan
Unicsy/root starting up
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
mount: /dev/zero is already mounted or /sys/kernel/debug busy
       /dev/zero is already mounted on /sys/kernel/debug
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
Fast charge on, 500 mA
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
sudo: unable to resolve host n900devuan
ofono unavailable
Unicsy executing command  mate-terminal  --tab  -t 1_tefone -e 'sh -c "/usr/share/unicsy/demo/tefone; xmessage /usr/share/unicsy/demo/tefone failed; sleep 1h"' --tab  -t 2_battery -e 'sh -c "/usr/share/unicsy/monitor/batmond; xmessage /usr/share/unicsy/monitor/batmond failed; sleep 1h"' --tab  -t 3_monitor -e 'sh -c "/usr/share/unicsy/monitor/mond; xmessage /usr/share/unicsy/monitor/mond failed; sleep 1h"' --tab  -t 5_ofone -e 'sh -c "sudo /usr/share/unicsy/ofone/ofone --primary; xmessage sudo /usr/share/unicsy/ofone/ofone --primary failed; sleep 1h"' --tab  -t 0_panel -e 'sh -c "/usr/share/unicsy/desktop/panel.py; xmessage /usr/share/unicsy/desktop/panel.py failed; sleep 1h"'
sh: 1: mate-terminal: not found

ofono is definitely running:

# mdbus2 -s org.ofono
/
/bluetooth
/bluetooth/profile
/bluetooth/profile/dun_gw
/bluetooth/profile/hfp_ag
/bluetooth/profile/hfp_hf
/n900_0

@MerlijnWajer
Copy link
Member Author

MerlijnWajer commented Dec 14, 2018

Starting ofone gets me further:

root@n900devuan:/home/user/unicsy_demo/ofone# python2 ofone
Fell back to pygtk 2

(process:10306): Gtk-WARNING **: Locale not supported by C library.
        Using the fallback 'C' locale.
Fell back to pygtk 2
Fell back to pygtk 2
Fell back to pygtk 2
Fell back to pygtk 2
Fell back to pygtk 2
Fell back to pygtk 2
Can't open events.json
(0, 'battery watchdog')
(1, 'phone watchdog')
(0, 'battery watchdog')
(1, 'phone watchdog')
(9, 'track ok')
Battery (3.71V) 3.86V (17%) 58% 96% 1326/1368 mAh Not charging Discharging -453 0 650/500 mA ??? 1326 ??? mAh
cat: /etc/alpine-release: No such file or directory
Setting main loop

done
Connecting modem /n900_0...
Traceback (most recent call last):
  File "ofone", line 449, in 
    mw = MainWindows()
  File "ofone", line 348, in __init__
    m.startup()
  File "/home/user/unicsy_demo/ofone/ofono.py", line 213, in startup
    m.online_modem()
  File "/home/user/unicsy_demo/ofone/ofono.py", line 247, in online_modem
    m.modem.SetProperty("Online", dbus.Boolean(1), timeout = 120)
  File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.ofono.Error.Failed: Operation failed

Let me reboot and try again - I am seeing this:

[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: Data RX id: 1
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: Data TX id: 1
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (a3ea4b4f)
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (ab530849)
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (a1dfd8a9)
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (267d2a0d)
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (b45476cf)
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (0a0cd943)
[Fri Dec 14 14:54:15 2018] ssi-protocol ssi-protocol: pending TX data (1485c6e9)

@MerlijnWajer
Copy link
Member Author

Reboot got me further, but I forgot to disable/remove the PIN.

@MerlijnWajer
Copy link
Member Author

MerlijnWajer commented Dec 14, 2018

Works, gtk2 style makes it look a bit weird :D

Ofone

Not sure why it says alpine. ;)

@MerlijnWajer
Copy link
Member Author

I bumped version to 0.5 in debian/changelog because tags for previous versions existed (0.4, etc).

https://maedevu.maemo.org/leste/pool/main/u/unicsy-demo/

I've forked the repo to the orga, to ease building: https://github.com/maemo-leste/unicsy_demo

@MerlijnWajer
Copy link
Member Author

Please let me know if you don't like the version bump for the repo. I think we can close this issue.
Thanks for doing most of the packaging work! I didn't see that you already did that before.

@pavelmachek
Copy link

pavelmachek commented Dec 14, 2018 via email

@MerlijnWajer
Copy link
Member Author

Good point about -p. I've already been able to receive and send sms. Calls not yet because I need to package/start libcmtspeech and the current SIM in there doesn't support calls (data only sim that can do sms)

@pavelmachek
Copy link

pavelmachek commented Dec 14, 2018 via email

@MerlijnWajer
Copy link
Member Author

But I want audio :D and I want to package libcmtspeech.
I've already been able to start a call using mdbus2, so I want something more out of this. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants