Ticket #1738 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

3G: Error when trying to connect without gsm settings

Reported by: erikos Owned by: tch
Priority: Urgent Milestone: 0.88
Component: sugar Version: Git as of bugdate
Severity: Major Keywords: r+
Cc: tomeu, Dcastelo, aa Distribution/OS: Unspecified
Bug Status: Assigned

Description

Scenario: No settings are done in the Control Panel. GSM Device is connected. Connect button is pressed in the gsm device palette.

We create a gsm connection in model.networks.py by default. When one tries to connect without any settings made the call "network.find_gsm_connection()" will return a connection - the default one, and tries to connect. We catch a runtime error in that case.

I think we should not create a connection unless settings in the CP section have been made.

Attachments

Change History

Changed 3 years ago by erikos

  • cc tomeu, Dcastelo added
  • owner changed from tomeu to aa
  • status changed from new to assigned

Changed 3 years ago by erikos

  • owner changed from aa to tch

I guess this one is for: Martin -> Martincho -> Tincho -> tch :)

Changed 3 years ago by aa

  • cc aa added

Changed 3 years ago by tch

that patch avoids gsm connection loading if it doesn't have the basic configuration and raises an exception if the user tries to connect under that circumstance.

Still needs to show the errors in a graphical-friendly way...whenever we decide what mechanism to use.

Changed 3 years ago by erikos

  • keywords r? added
  • priority changed from Unspecified by Maintainer to Urgent
  • status_field changed from Unconfirmed to Assigned

Thanks for the patch! Please don't forget to add the 'r?' in the keywords :) I think that makes more sense now. I will have another in depth look at the patch tomorrow. And maybe we can talk as well about how we will display errors.

Changed 3 years ago by erikos

  • keywords r! added; r? removed

Please watch for indentation (pylint would have caught this error):

W0311:695: Bad indentation. Found 6 spaces, expected 8

The baud_rate should be a constant.

Do we need to rais an error in "gsm_connect_cb" ? Can we not just log that?

Changed 3 years ago by erikos

  • keywords r+ added; r! removed
  • status changed from assigned to closed
  • resolution set to fixed
Note: See TracTickets for help on using tickets.