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

[NetAdmin] Issues using GPS if modem has never been enabled #2096

Closed
nicolatimeus opened this issue May 9, 2018 · 0 comments
Closed

[NetAdmin] Issues using GPS if modem has never been enabled #2096

nicolatimeus opened this issue May 9, 2018 · 0 comments
Assignees

Comments

@nicolatimeus
Copy link
Contributor

Steps to reproduce:

  1. Perform a fresh Kura install
  2. Connect a supported Telit modem with GPS
  3. Enable modem GPS without enabling the modem
  4. Disable GPS without enabling the modem

After step 3, the following exception occurs:

2018-04-13 12:48:24,550 [qtp27753771-43] ERROR o.e.k.n.a.v.l.PppConfigWriter - Could not write modem config
java.lang.StringIndexOutOfBoundsException: String index out of range: -10
	at java.lang.String.substring(Unknown Source)
	at org.eclipse.kura.net.admin.modem.telit.he910.TelitHe910ConfigGenerator.getPdpContextNumber(TelitHe910ConfigGenerator.java:114)
	at org.eclipse.kura.net.admin.modem.telit.he910.TelitHe910ConfigGenerator.getConnectScript(TelitHe910ConfigGenerator.java:78)
	at org.eclipse.kura.net.admin.visitor.linux.PppConfigWriter.writeConfig(PppConfigWriter.java:217)
	at org.eclipse.kura.net.admin.visitor.linux.PppConfigWriter.visit(PppConfigWriter.java:98)
	at org.eclipse.kura.net.admin.visitor.linux.LinuxWriteVisitor.visit(LinuxWriteVisitor.java:47)
	at org.eclipse.kura.core.net.NetworkConfiguration.accept(NetworkConfiguration.java:154)
	at org.eclipse.kura.net.admin.NetworkConfigurationServiceImpl.updated(NetworkConfigurationServiceImpl.java:241)
	at org.eclipse.kura.net.admin.NetworkConfigurationServiceImpl.setNetworkConfiguration(NetworkConfigurationServiceImpl.java:206)
	at org.eclipse.kura.net.admin.NetworkAdminServiceImpl.submitNetworkConfiguration(NetworkAdminServiceImpl.java:1487)
	at org.eclipse.kura.net.admin.NetworkAdminServiceImpl.updateModemInterfaceConfig(NetworkAdminServiceImpl.java:941)
	at org.eclipse.kura.web.server.GwtNetworkServiceImpl.updateNetInterfaceConfigurations(GwtNetworkServiceImpl.java:927)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:587)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:333)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:303)
	at com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:373)
	at com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at org.eclipse.kura.web.server.OsgiRemoteServiceServlet.service(OsgiRemoteServiceServlet.java:41)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.http.servlet.internal.HttpServiceRuntimeImpl$LegacyServlet.service(HttpServiceRuntimeImpl.java:1223)
	at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:148)
	at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
	at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:131)
	at org.eclipse.equinox.http.servlet.internal.servlet.ProxyServlet.service(ProxyServlet.java:74)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:284)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:841)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:535)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:561)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:334)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:104)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:243)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:679)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:597)
	at java.lang.Thread.run(Unknown Source)

This is caused by the fact that since the modem has never been enabled, the dial string provided by the Web Ui will be empty (no validation is performed in this case).
This causes a failure in PppConfigWriter that prevents the modem configuration from being persisted, but the GPS will be enabled anyway.

Disabling the GPS at step 4 will fail (nothing happens) because the modem config and the fact that GPS is enabled is not persisted.

A workaround for this is enabling the modem at least once before trying to use GPS.

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

No branches or pull requests

2 participants