* [PATCH 0/2] python test scripts @ 2009-10-29 13:54 Ryan M. Raasch 2009-10-29 13:54 ` [PATCH 1/2] Added functionality to remove modem from system, if needed Ryan M. Raasch 2009-10-29 13:54 ` [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card Ryan M. Raasch 0 siblings, 2 replies; 11+ messages in thread From: Ryan M. Raasch @ 2009-10-29 13:54 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 264 bytes --] Hello, Python script to enter a pin number to unlock the sim card. Regards, Ryan test/enable-modem | 6 +++++- test/enable-sim | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletions(-) create mode 100755 test/enable-sim ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 13:54 [PATCH 0/2] python test scripts Ryan M. Raasch @ 2009-10-29 13:54 ` Ryan M. Raasch 2009-10-29 14:00 ` Marcel Holtmann 2009-10-29 13:54 ` [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card Ryan M. Raasch 1 sibling, 1 reply; 11+ messages in thread From: Ryan M. Raasch @ 2009-10-29 13:54 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 690 bytes --] --- test/enable-modem | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/test/enable-modem b/test/enable-modem index 0f9f604..d44783d 100755 --- a/test/enable-modem +++ b/test/enable-modem @@ -1,6 +1,7 @@ #!/usr/bin/python import dbus +import sys bus = dbus.SystemBus() @@ -14,4 +15,7 @@ path = properties["Modems"][0] modem = dbus.Interface(bus.get_object('org.ofono', path), 'org.ofono.Modem') -modem.SetProperty("Powered", dbus.Boolean(1)) +if len(sys.argv) > 1 and sys.argv[1] == '0' : + modem.SetProperty("Powered", dbus.Boolean(0)) +else : + modem.SetProperty("Powered", dbus.Boolean(1)) -- 1.6.4.GIT ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 13:54 ` [PATCH 1/2] Added functionality to remove modem from system, if needed Ryan M. Raasch @ 2009-10-29 14:00 ` Marcel Holtmann 2009-10-29 14:16 ` Ryan Raasch 0 siblings, 1 reply; 11+ messages in thread From: Marcel Holtmann @ 2009-10-29 14:00 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 813 bytes --] Hi Ryan, > --- > test/enable-modem | 6 +++++- > 1 files changed, 5 insertions(+), 1 deletions(-) > > diff --git a/test/enable-modem b/test/enable-modem > index 0f9f604..d44783d 100755 > --- a/test/enable-modem > +++ b/test/enable-modem > @@ -1,6 +1,7 @@ > #!/usr/bin/python > > import dbus > +import sys > > bus = dbus.SystemBus() > > @@ -14,4 +15,7 @@ path = properties["Modems"][0] > modem = dbus.Interface(bus.get_object('org.ofono', path), > 'org.ofono.Modem') > > -modem.SetProperty("Powered", dbus.Boolean(1)) > +if len(sys.argv) > 1 and sys.argv[1] == '0' : > + modem.SetProperty("Powered", dbus.Boolean(0)) > +else : > + modem.SetProperty("Powered", dbus.Boolean(1)) if you want this, then add a disable-modem script. Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 14:00 ` Marcel Holtmann @ 2009-10-29 14:16 ` Ryan Raasch 2009-10-29 14:20 ` Marcel Holtmann 0 siblings, 1 reply; 11+ messages in thread From: Ryan Raasch @ 2009-10-29 14:16 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1522 bytes --] Marcel Holtmann wrote: > Hi Ryan, > >> --- >> test/enable-modem | 6 +++++- >> 1 files changed, 5 insertions(+), 1 deletions(-) >> >> diff --git a/test/enable-modem b/test/enable-modem >> index 0f9f604..d44783d 100755 >> --- a/test/enable-modem >> +++ b/test/enable-modem >> @@ -1,6 +1,7 @@ >> #!/usr/bin/python >> >> import dbus >> +import sys >> >> bus = dbus.SystemBus() >> >> @@ -14,4 +15,7 @@ path = properties["Modems"][0] >> modem = dbus.Interface(bus.get_object('org.ofono', path), >> 'org.ofono.Modem') >> >> -modem.SetProperty("Powered", dbus.Boolean(1)) >> +if len(sys.argv) > 1 and sys.argv[1] == '0' : >> + modem.SetProperty("Powered", dbus.Boolean(0)) >> +else : >> + modem.SetProperty("Powered", dbus.Boolean(1)) > > if you want this, then add a disable-modem script. Ok. If no one else thinks it may be needed, i won't. In my case, i thought it would be helpful to see what happens to the system to remove a modem out of the system, ie. power off. I would be nice to be able to set a toggle power to the modem, and allow the daemon to be in the correct state to recover. I have tried toggling the power to the modem (has a switch on the board) when the daemon was running, and the daemon was not able to return to a known state. Greetings, Ryan > > Regards > > Marcel > > > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 14:16 ` Ryan Raasch @ 2009-10-29 14:20 ` Marcel Holtmann 2009-10-29 16:16 ` Ryan Raasch 2009-10-29 16:27 ` Denis Kenzior 0 siblings, 2 replies; 11+ messages in thread From: Marcel Holtmann @ 2009-10-29 14:20 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1596 bytes --] Hi Ryan, > >> test/enable-modem | 6 +++++- > >> 1 files changed, 5 insertions(+), 1 deletions(-) > >> > >> diff --git a/test/enable-modem b/test/enable-modem > >> index 0f9f604..d44783d 100755 > >> --- a/test/enable-modem > >> +++ b/test/enable-modem > >> @@ -1,6 +1,7 @@ > >> #!/usr/bin/python > >> > >> import dbus > >> +import sys > >> > >> bus = dbus.SystemBus() > >> > >> @@ -14,4 +15,7 @@ path = properties["Modems"][0] > >> modem = dbus.Interface(bus.get_object('org.ofono', path), > >> 'org.ofono.Modem') > >> > >> -modem.SetProperty("Powered", dbus.Boolean(1)) > >> +if len(sys.argv) > 1 and sys.argv[1] == '0' : > >> + modem.SetProperty("Powered", dbus.Boolean(0)) > >> +else : > >> + modem.SetProperty("Powered", dbus.Boolean(1)) > > > > if you want this, then add a disable-modem script. > > Ok. If no one else thinks it may be needed, i won't. In my case, i > thought it would be helpful to see what happens to the system to remove > a modem out of the system, ie. power off. I would be nice to be able to > set a toggle power to the modem, and allow the daemon to be in the > correct state to recover. I am fine with disable-modem script. I just never needed it so far. Otherwise it would have been there. > I have tried toggling the power to the modem (has a switch on the board) > when the daemon was running, and the daemon was not able to return to a > known state. Weird. Might need some udev magic to do the right thing. Or some special handling inside the plugin. Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 14:20 ` Marcel Holtmann @ 2009-10-29 16:16 ` Ryan Raasch 2009-10-29 16:29 ` Denis Kenzior 2009-10-29 16:27 ` Denis Kenzior 1 sibling, 1 reply; 11+ messages in thread From: Ryan Raasch @ 2009-10-29 16:16 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 2120 bytes --] Marcel Holtmann wrote: > Hi Ryan, > >>>> test/enable-modem | 6 +++++- >>>> 1 files changed, 5 insertions(+), 1 deletions(-) >>>> >>>> diff --git a/test/enable-modem b/test/enable-modem >>>> index 0f9f604..d44783d 100755 >>>> --- a/test/enable-modem >>>> +++ b/test/enable-modem >>>> @@ -1,6 +1,7 @@ >>>> #!/usr/bin/python >>>> >>>> import dbus >>>> +import sys >>>> >>>> bus = dbus.SystemBus() >>>> >>>> @@ -14,4 +15,7 @@ path = properties["Modems"][0] >>>> modem = dbus.Interface(bus.get_object('org.ofono', path), >>>> 'org.ofono.Modem') >>>> >>>> -modem.SetProperty("Powered", dbus.Boolean(1)) >>>> +if len(sys.argv) > 1 and sys.argv[1] == '0' : >>>> + modem.SetProperty("Powered", dbus.Boolean(0)) >>>> +else : >>>> + modem.SetProperty("Powered", dbus.Boolean(1)) >>> if you want this, then add a disable-modem script. >> Ok. If no one else thinks it may be needed, i won't. In my case, i >> thought it would be helpful to see what happens to the system to remove >> a modem out of the system, ie. power off. I would be nice to be able to >> set a toggle power to the modem, and allow the daemon to be in the >> correct state to recover. > > I am fine with disable-modem script. I just never needed it so far. > Otherwise it would have been there. > >> I have tried toggling the power to the modem (has a switch on the board) >> when the daemon was running, and the daemon was not able to return to a >> known state. > > Weird. Might need some udev magic to do the right thing. Or some special > handling inside the plugin. Yea. I haven't looked at that part of the code, only that AT+CRC is the first command sent (if i remember right). Our modem sends a ^SYSSTART on powerup, what causes ofonod to go back to its initial state? What is the "normal" start-up string for modems (i was told mc75 doesn't really abide the norm) ? Thanks, Ryan > > Regards > > Marcel > > > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 16:16 ` Ryan Raasch @ 2009-10-29 16:29 ` Denis Kenzior 0 siblings, 0 replies; 11+ messages in thread From: Denis Kenzior @ 2009-10-29 16:29 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 585 bytes --] Hi Ryan, > Yea. I haven't looked at that part of the code, only that AT+CRC is the > first command sent (if i remember right). Our modem sends a ^SYSSTART on > powerup, what causes ofonod to go back to its initial state? The core has no idea, everything is up to the modem driver. Only the driver knows when the powered up / down events happened. The driver is responsible for informing the core. > > What is the "normal" start-up string for modems (i was told mc75 doesn't > really abide the norm) ? There isn't one, they are all different. Regards, -Denis ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 1/2] Added functionality to remove modem from system, if needed. 2009-10-29 14:20 ` Marcel Holtmann 2009-10-29 16:16 ` Ryan Raasch @ 2009-10-29 16:27 ` Denis Kenzior 1 sibling, 0 replies; 11+ messages in thread From: Denis Kenzior @ 2009-10-29 16:27 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 430 bytes --] Hi, > > I have tried toggling the power to the modem (has a switch on the board) > > when the daemon was running, and the daemon was not able to return to a > > known state. > > Weird. Might need some udev magic to do the right thing. Or some special > handling inside the plugin. What kind of modem is this? If it is a UART modem then udev won't help here. Custom plugin handling is required. Regards, -Denis ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card. 2009-10-29 13:54 [PATCH 0/2] python test scripts Ryan M. Raasch 2009-10-29 13:54 ` [PATCH 1/2] Added functionality to remove modem from system, if needed Ryan M. Raasch @ 2009-10-29 13:54 ` Ryan M. Raasch 2009-10-29 14:00 ` Marcel Holtmann 1 sibling, 1 reply; 11+ messages in thread From: Ryan M. Raasch @ 2009-10-29 13:54 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 698 bytes --] --- test/enable-sim | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) create mode 100755 test/enable-sim diff --git a/test/enable-sim b/test/enable-sim new file mode 100755 index 0000000..bbfd34f --- /dev/null +++ b/test/enable-sim @@ -0,0 +1,18 @@ +#!/usr/bin/python + +import dbus +import sys + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object('org.ofono', '/'), + 'org.ofono.Manager') + +properties = manager.GetProperties() + +path = properties["Modems"][0] + +modem = dbus.Interface(bus.get_object('org.ofono', path), + 'org.ofono.SimManager') + +modem.EnterPin(sys.argv[1], sys.argv[2]) -- 1.6.4.GIT ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card. 2009-10-29 13:54 ` [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card Ryan M. Raasch @ 2009-10-29 14:00 ` Marcel Holtmann 2009-10-29 14:17 ` Ryan Raasch 0 siblings, 1 reply; 11+ messages in thread From: Marcel Holtmann @ 2009-10-29 14:00 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 855 bytes --] Hi Ryan, > --- > test/enable-sim | 18 ++++++++++++++++++ > 1 files changed, 18 insertions(+), 0 deletions(-) > create mode 100755 test/enable-sim > > diff --git a/test/enable-sim b/test/enable-sim > new file mode 100755 > index 0000000..bbfd34f > --- /dev/null > +++ b/test/enable-sim > @@ -0,0 +1,18 @@ > +#!/usr/bin/python > + > +import dbus > +import sys > + > +bus = dbus.SystemBus() > + > +manager = dbus.Interface(bus.get_object('org.ofono', '/'), > + 'org.ofono.Manager') > + > +properties = manager.GetProperties() > + > +path = properties["Modems"][0] > + > +modem = dbus.Interface(bus.get_object('org.ofono', path), > + 'org.ofono.SimManager') > + > +modem.EnterPin(sys.argv[1], sys.argv[2]) call this script enter-pin and have it check if a PIN is actually required. Regards Marcel ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card. 2009-10-29 14:00 ` Marcel Holtmann @ 2009-10-29 14:17 ` Ryan Raasch 0 siblings, 0 replies; 11+ messages in thread From: Ryan Raasch @ 2009-10-29 14:17 UTC (permalink / raw) To: ofono [-- Attachment #1: Type: text/plain, Size: 1099 bytes --] Marcel Holtmann wrote: > Hi Ryan, > >> --- >> test/enable-sim | 18 ++++++++++++++++++ >> 1 files changed, 18 insertions(+), 0 deletions(-) >> create mode 100755 test/enable-sim >> >> diff --git a/test/enable-sim b/test/enable-sim >> new file mode 100755 >> index 0000000..bbfd34f >> --- /dev/null >> +++ b/test/enable-sim >> @@ -0,0 +1,18 @@ >> +#!/usr/bin/python >> + >> +import dbus >> +import sys >> + >> +bus = dbus.SystemBus() >> + >> +manager = dbus.Interface(bus.get_object('org.ofono', '/'), >> + 'org.ofono.Manager') >> + >> +properties = manager.GetProperties() >> + >> +path = properties["Modems"][0] >> + >> +modem = dbus.Interface(bus.get_object('org.ofono', path), >> + 'org.ofono.SimManager') >> + >> +modem.EnterPin(sys.argv[1], sys.argv[2]) > > call this script enter-pin and have it check if a PIN is actually > required. > No prob. Thanks, Ryan > Regards > > Marcel > > > _______________________________________________ > ofono mailing list > ofono(a)ofono.org > http://lists.ofono.org/listinfo/ofono ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-10-29 16:29 UTC | newest] Thread overview: 11+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-29 13:54 [PATCH 0/2] python test scripts Ryan M. Raasch 2009-10-29 13:54 ` [PATCH 1/2] Added functionality to remove modem from system, if needed Ryan M. Raasch 2009-10-29 14:00 ` Marcel Holtmann 2009-10-29 14:16 ` Ryan Raasch 2009-10-29 14:20 ` Marcel Holtmann 2009-10-29 16:16 ` Ryan Raasch 2009-10-29 16:29 ` Denis Kenzior 2009-10-29 16:27 ` Denis Kenzior 2009-10-29 13:54 ` [PATCH 2/2] This patch enables the pin number and type of pin to be sent to daemon to unlock the sim card Ryan M. Raasch 2009-10-29 14:00 ` Marcel Holtmann 2009-10-29 14:17 ` Ryan Raasch
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.