andreasgal / B2G

Boot to Gecko aims to create a complete, standalone operating system for the open web.
https://wiki.mozilla.org/B2G
909 stars 158 forks source link

Emulator-to-emulator SMS not working #248

Open jonallengriffin opened 12 years ago

jonallengriffin commented 12 years ago

Attempting to send an SMS from one emulator to another silently fails; the logcat is:

E/GeckoConsole( 33): [JavaScript Warning: "The constant IDBTransaction.READONLY has been deprecated. Use the string value "readonly" instead."] I/Gecko ( 33): -- RadioInterfaceLayer: Requesting enumeration of calls for callback: [xpconnect wrapped nsIRILTelephonyCallback] I/Gecko ( 33): RIL Worker: Received DOM message {"type":"enumerateCalls"} I/Gecko ( 33): RIL Worker: Sending all current calls I/Gecko ( 33): -- RadioInterfaceLayer: Registered callback: [xpconnect wrapped nsIRILTelephonyCallback] I/Gecko ( 33): -- RadioInterfaceLayer: Received message: {"type":"enumerateCalls","calls":[]} I/Gecko ( 33): -_- RadioInterfaceLayer: handleEnumerateCalls: [] I/Gecko ( 33): WIFI: loaddriver returned: -1 I/Gecko ( 33): -- WifiWorker component: Couldn't start Wifi I/Gecko ( 33): -_- RadioInterfaceLayer: _calculateUserDataLength: {"dcs":0,"encodedFullBodyLength":12,"userDataHeaderLength":0,"langIndex":0,"langShiftIndex":0,"segmentMaxSeq":1,"fullBody":"hello world!"} I/Gecko ( 33): RIL Worker: Received DOM message {"dcs":0,"encodedFullBodyLength":12,"userDataHeaderLength":0,"langIndex":0,"langShiftIndex":0,"segmentMaxSeq":1,"fullBody":"hello world!","type":"sendSMS","number":"5554","requestId":0,"processId":0,"segments":null} I/Gecko ( 33): RIL Worker: New outgoing parcel of type 100 I/Gecko ( 33): RIL Worker: Outgoing parcel: 0,0,0,8,100,0,0,0,13,0,0,0 I/Gecko ( 33): RIL Worker: Received 16 bytes. I/Gecko ( 33): RIL Worker: Already read 0 I/Gecko ( 33): RIL Worker: New incoming parcel of size 12 I/Gecko ( 33): RIL Worker: Parcel (size 12): 0,0,0,0,13,0,0,0,6,0,0,0 I/Gecko ( 33): RIL Worker: We have at least one complete parcel. I/Gecko ( 33): RIL Worker: Received error 6 for solicited parcel type 100 I/Gecko ( 33): RIL Worker: Next parcel size unknown, going to sleep. I/Gecko ( 33): -*- RadioInterfaceLayer: Received message: {"dcs":0,"encodedFullBodyLength":12,"userDataHeaderLength":0,"langIndex":0,"langShiftIndex":0,"segmentMaxSeq":1,"fullBody":"hello world!","type":"error","number":"5554","requestId":0,"processId":0,"segments":null,"rilRequestType":100,"rilRequestError":6} E/GeckoConsole( 33): [JavaScript Error: "Don't know about this message type: error" {file: "jar:file:///system/b2g/omni.ja!/components/RadioInterfaceLayer.js" line: 286}]

joneschrisg commented 12 years ago

@philikon any thoughts on this? We would really like to get these test turned on :).

philikon commented 12 years ago

So the problem is that the REQUEST_GET_SMSC_ADDRESS (parcel type 100) request isn't supported by the emulator (it returns with ERROR_REQUEST_NOT_SUPPORTED = 6). So far we've assumed that you need the SMSC to send an SMS, but maybe an empty SMSC would do on the emulator? Perhaps even with regular operators? We can find out.

jonallengriffin commented 12 years ago

Inter-emulator SMS works similar to inter-emulator telephony; no SMSC should be required. See http://developer.android.com/guide/developing/devices/emulator.html#calling. A Marionette test of this used to work at some point in the past.

vicamo commented 12 years ago

Buzilla issue opened in https://bugzilla.mozilla.org/show_bug.cgi?id=740238