QuietModemKit icon indicating copy to clipboard operation
QuietModemKit copied to clipboard

Swift sample app

Open winster opened this issue 8 years ago • 29 comments

Hello @brian-armstrong ,

I was creating a sample Swift app. https://github.com/winster/QuietShare

Getting an error while setting the ReceiveCallback. I could not find the definition of that. Can you please help?

Regards Winster

winster avatar Mar 19 '17 10:03 winster

this should help https://github.com/winster/QuietShare/pull/1

brian-armstrong avatar Mar 20 '17 08:03 brian-armstrong

Hello Brian Armstrong, how are you? Hope everything's ok. I have been looking at winster quiet share implementation code on swift and compared with you OBJC code. There is something strange happening: 1- I can transmit quiet without any problem to any device:

@IBAction func transmit(_ sender: Any) { let frame_str = "winster@quiet"; let data = frame_str.data(using: .utf8); self.tx.send(data);

But when I try to receive it, it works on the simulator but never worked on the mobile phone itself: The permission was granted in info.plist and manually on the mobile.

AVAudioSession.sharedInstance().requestRecordPermission({(granted: Bool)-> Void in
  if granted {
    if self.rx == nil {
      let rxConf: QMReceiverConfig = QMReceiverConfig(key:"ultrasonic-experimental");
      self.rx = QMFrameReceiver(config: rxConf);
      self.rx?.setReceiveCallback(self.receiveCallback);
    }
  } else {
    print("Permission to record not granted")
  }
})

Can you help me? Thank you very much.

carlosguedes avatar Jan 09 '18 11:01 carlosguedes

My reiceiveCallback function is this:

func receiveCallback(frame: Data?) { let msg = String(data: frame ?? Data(), encoding: String.Encoding.utf8) ?? "data could not be decoded"; print(msg) }

carlosguedes avatar Jan 09 '18 11:01 carlosguedes

Debugging the code... it seems that the problem resides on this func: receiveCallback

carlosguedes avatar Jan 09 '18 11:01 carlosguedes

@carlosguedes Are you getting an error? Is the receiver just never receiving anything?

brian-armstrong avatar Jan 09 '18 21:01 brian-armstrong

Hello Brian, no, no error messages at all. The receiver just never received anything. (On the device). I also granted the right to use the Microphone on the application. Thanks

On Tue, 9 Jan 2018 at 19:39 Brian Armstrong [email protected] wrote:

@carlosguedes https://github.com/carlosguedes Are you getting an error? Is the receiver just never receiving anything?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-356422696, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxF4Z_SZ-aroqy4x--c3mpCB0MM_2ks5tI9yRgaJpZM4Mhsr- .

-- Atenciosamente,

Carlos Guedes

carlosguedes avatar Jan 09 '18 21:01 carlosguedes

What model of phone is it? How is its mic oriented with respect to the speaker, and how far away?

brian-armstrong avatar Jan 09 '18 21:01 brian-armstrong

Brian, I tryed in a lot of positioning, near by, a little far, 50% volume, 100% volume. The device is an Iphone 6s Plus, but i also have tryed on a iphone 6. Ios 10 and 11 didn’t work. Its strange is that on the simulator it works, but it doesnt on both devices. Even with microphone permission granted it simply can’t receive. (For sending is perfect). Maybe im missing something in the code I sent you... I never could get the receiver working.

On Tue, 9 Jan 2018 at 19:50 Brian Armstrong [email protected] wrote:

What model of phone is it? How is its mic oriented with respect to the speaker, and how far away?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-356425692, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxDE2GBQlB0dDXavvAWs0-v03uej7ks5tI99AgaJpZM4Mhsr- .

-- Atenciosamente,

Carlos Guedes

carlosguedes avatar Jan 09 '18 21:01 carlosguedes

I will provide the source and a little sample of the error to you tomorrow as i am out of the office

Thank you for attention

On Tue, 9 Jan 2018 at 19:55 Carlos Guedes [email protected] wrote:

Brian, I tryed in a lot of positioning, near by, a little far, 50% volume, 100% volume. The device is an Iphone 6s Plus, but i also have tryed on a iphone 6. Ios 10 and 11 didn’t work. Its strange is that on the simulator it works, but it doesnt on both devices. Even with microphone permission granted it simply can’t receive. (For sending is perfect). Maybe im missing something in the code I sent you... I never could get the receiver working.

On Tue, 9 Jan 2018 at 19:50 Brian Armstrong [email protected] wrote:

What model of phone is it? How is its mic oriented with respect to the speaker, and how far away?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-356425692, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxDE2GBQlB0dDXavvAWs0-v03uej7ks5tI99AgaJpZM4Mhsr- .

-- Atenciosamente,

Carlos Guedes

-- Atenciosamente,

Carlos Guedes

carlosguedes avatar Jan 09 '18 22:01 carlosguedes

It's hard to guess what's going on, Quiet's debugging tools aren't as good on iOS as elsewhere unfortunately. I haven't had a chance to test on newer iOS versions but I can't think of a reason it'd break there.

I'm not sure how feasible it is for you to check this, but if you're comfortable with the code, it would be interesting to check the QMFrameReceiver. Specifically, to get some printfs to show whether the quiet_frame_receiver_callback is being called, and if it is, whether any of the samples (d->monoBuffer and casted_buffer) are nonzero. Knowing that much would at least hint strongly at the sort of error it could be.

brian-armstrong avatar Jan 09 '18 22:01 brian-armstrong

Hello Brian thanks for all attention. I really can't make the receiver works on the Iphone, but inside the simulator, everything goes alright. And the simulator, emulates iOS 11. The quit frame receiver callback is indeed called on the emulator but inside the mobile phone seems that the function is never called.

carlosguedes avatar Jan 11 '18 11:01 carlosguedes

@IBAction func scan(_ sender: Any) { if AVAudioSession.sharedInstance().recordPermission() == .denied { self.testing.text = "Deu pau" }

AVAudioSession.sharedInstance().requestRecordPermission({(granted: Bool)-> Void in
  if granted {

    if self.rx == nil {
      let rxConf: QMReceiverConfig = QMReceiverConfig(key:"audible");
      self.rx = QMFrameReceiver(config: rxConf);
      self.rx?.setReceiveCallback(self.receiveCallback);
    }
  } else {
   print("Permission to record not granted")
    
  }
})

} No exception is on the debug.

func receiveCallback(frame: Data?) { let msg = String(data: frame ?? Data(), encoding: String.Encoding.utf8) ?? "data could not be decoded"; self.testing.text = "TEST" print(msg) self.testing.text = msg

}

}

*Test is a label I put on the code...

The most bizarre thing is that it works on the simulator, but not on the device. That's impressive. All device volumes are ok, everything's ok. There is only one situation that I receive on debug. When I hit the scan button first, it send me this message:

2018-01-11 09:43:18.445555-0200 QuietShare[7028:386670] 317: ca_debug_string: inPropertyData == NULL

But nothing more...

carlosguedes avatar Jan 11 '18 11:01 carlosguedes

That's all the log I could find in de the device... At my view... nothing abnormal:

Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [SpringBoard:59] Attempting to acquire assertion for QuietShare:2349: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&6FD4C991D496> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Add assertion: <BKProcessAssertion: 0x102223080; id: 59-631F12A8-ADCA-463E-ABC4-6FD4C991D496; name: com.apple.UIKit.KeyboardManagement.message; state: active; reason: finishTask; duration: 180.0s> { owner = <BSProcessHandle: 0x1022086d0; SpringBoard:59; valid: YES>; flags = preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventSuspendOnSleep; } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Activate assertion: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&6FD4C991D496> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Setting jetsam priority to 10 [0x10109] Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (CPUMON check): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&6FD4C991D496> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Updating PowerAssertion on QuietShare:2349 Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Client relinquished <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&6FD4C991D496> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Deactivate assertion: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&6FD4C991D496> Jan 11 09:57:45 iPhone SpringBoard(FrontBoard)[59] <Notice>: immediate edge swipe: failed Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (deactivateAssertion): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Setting jetsam priority to 10 [0x10101] Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (CPUMON check): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Updating PowerAssertion on QuietShare:2349 Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Remove assertion: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&6FD4C991D496> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (CPUMON check): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Updating PowerAssertion on QuietShare:2349 Jan 11 09:57:45 iPhone assertiond[74] <Notice>: -[BKAssertion dealloc] - <0x102223080> Jan 11 09:57:45 iPhone SpringBoard(FrontBoard)[59] <Notice>: immediate edge swipe: failed Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [SpringBoard:59] Attempting to acquire assertion for QuietShare:2349: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&B069054AD1B8> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Add assertion: <BKProcessAssertion: 0x102223080; id: 59-81E8EA21-DC5B-40D8-A2A5-B069054AD1B8; name: com.apple.UIKit.KeyboardManagement.message; state: active; reason: finishTask; duration: 180.0s> { owner = <BSProcessHandle: 0x1022086d0; SpringBoard:59; valid: YES>; flags = preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventSuspendOnSleep; } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Activate assertion: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&B069054AD1B8> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Setting jetsam priority to 10 [0x10109] Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (CPUMON check): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&B069054AD1B8> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Updating PowerAssertion on QuietShare:2349 Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Client relinquished <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&B069054AD1B8> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Deactivate assertion: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&B069054AD1B8> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (deactivateAssertion): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Setting jetsam priority to 10 [0x10101] Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (CPUMON check): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active] } Jan 11 09:57:45 iPhone assertiond[74] <Notice>: Updating PowerAssertion on QuietShare:2349 Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] Remove assertion: <BKProcessAssertion: 0x102223080; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&B069054AD1B8> Jan 11 09:57:45 iPhone assertiond[74] <Notice>: [QuietShare:2349] dump all assertions HWM:3 (CPUMON check): { <BKProcessAssertion: 0x10224b150; "Resume" (activation:inf); id:\M-b\M^@\M-&60D737A48FB3> [active] <BKProcessAssertion: 0x10223ff40; "CMSession.2349."no.birkett.QuietShare"."SoloAmbientSound".isPlayingProcessAssertion" (audio:inf); id:\M-b\M^@\M-&2C69F91C36E2> [active]

carlosguedes avatar Jan 11 '18 11:01 carlosguedes

Unfortunately that doesn't tell me much. If you get a chance to try what I mentioned (inserting some printfs into QuietModemKit's quiet_frame_receiver_callback) that would definitely help. Otherwise I will see if I can get some time to debug myself this weekend or next

brian-armstrong avatar Jan 11 '18 18:01 brian-armstrong

I see, and I appreciate for your attention. I will try to bring more information to you. Thank you very much

Atenciosamente,

Carlos Guedes

On Thu, Jan 11, 2018 at 4:42 PM, Brian Armstrong [email protected] wrote:

Unfortunately that doesn't tell me much. If you get a chance to try what I mentioned (inserting some printfs into QuietModemKit's quiet_frame_receiver_callback) that would definitely help. Otherwise I will see if I can get some time to debug myself this weekend or next

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-357022277, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxL_gu2S68TzS7K8yjLRgLhUIiPFuks5tJlYvgaJpZM4Mhsr- .

carlosguedes avatar Jan 12 '18 12:01 carlosguedes

@carlosguedes I was able to reproduce the behavior you saw. I have made a change to QuietModemKit that seems to fix this issue for me. I made a new release, so if you just run carthage update from the QuietShare repo, you should get the new code.

If you're curious, here's the fix I made https://github.com/quiet/QuietModemKit/commit/bbc44860806ef9ab369d9e5727a142298a9fed5c

brian-armstrong avatar Jan 14 '18 00:01 brian-armstrong

Hello Brian! Thanks for all the help! I tested your new version for the issue but I'm still facing the same problem. I think I could find the exact log when trying to record (receive the message). Hope it can help you:

Jan 15 09:34:18 iPhone assertiond[74] <Notice>: Updating PowerAssertion on QuietShare:5449 Jan 15 09:34:18 iPhone SpringBoard(FrontBoard)[3910] <Notice>: immediate edge swipe: failed Jan 15 09:34:18 iPhone assertiond[74] <Notice>: -[BKAssertion dealloc] - <0x102332850> Jan 15 09:34:18 iPhone tccd[121] <Notice>: PID[27] is checking access for target PID[5449] Jan 15 09:34:18 iPhone SpringBoard(FrontBoard)[3910] <Notice>: immediate edge swipe: failed Jan 15 09:34:18 iPhone mediaserverd(AudioToolbox)[27] <Notice>: 4400: { "action":"set_play_state", "session":{"ID":"0x35f5f","PID":5449,"name":"QuietShare"}, "details":"entry" } Jan 15 09:34:18 iPhone mediaserverd(CoreMedia)[27] <Notice>: -CMSUtilities- CMSUtility_SetIsRecording: CMSession: Client sid:0x35f5f, QuietShare(5449), 'prim' has started recording Jan 15 09:34:18 iPhone mediaserverd(AudioToolbox)[27] <Notice>: 4549: { "action":"set_play_state", "session":{"ID":"0x35f5f","PID":5449,"name":"QuietShare"}, "details":{"IOs":[1,1,0,0,0],"IsRecording":true,"active":true,"modes":"Input","player":"0x15422de00","state":"Started","type":"Queue"} } Jan 15 09:34:18 iPhone mediaserverd(AudioToolbox)[27] <Error>: 1107: AudioConverterNew returned -50 Jan 15 09:34:18 iPhone mediaserverd(AudioToolbox)[27] <Notice>: 4400: { "action":"set_play_state", "session":{"ID":"0x35f5f","PID":5449,"name":"QuietShare"}, "details":"entry" } Jan 15 09:34:18 iPhone mediaserverd(CoreMedia)[27] <Notice>: -CMSUtilities- CMSUtility_SetIsRecording: CMSession: Client sid:0x35f5f, QuietShare(5449), 'prim' has stopped recording Jan 15 09:34:18 iPhone mediaserverd(AudioToolbox)[27] <Notice>: 4549: { "action":"set_play_state", "session":{"ID":"0x35f5f","PID":5449,"name":"QuietShare"}, "details":{"IOs":[0,1,0,0,0],"IsRecording":false,"active":true,"modes":"Input","player":"0x15422de00","state":"Stopped","type":"Queue"} } Jan 15 09:34:18 iPhone assertiond[74] <Notice>: [SpringBoard:3910] Attempting to acquire assertion for QuietShare:5449: <BKProcessAssertion: 0x10224bd60; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&EBA95D1D5429> Jan 15 09:34:18 iPhone assertiond[74] <Notice>: [QuietShare:5449] Add assertion: <BKProcessAssertion: 0x10224bd60; id: 3910-5E1DFAE4-3426-4A0B-99CE-EBA95D1D5429; name: com.apple.UIKit.KeyboardManagement.message; state: active; reason: finishTask; duration: 180.0s> {

  • owner = <BSProcessHandle: 0x102338c30; SpringBoard:3910; valid: YES>;* flags = preventSuspend, preventThrottleDownUI, preventThrottleDownCPU, preventSuspendOnSleep; } Jan 15 09:34:18 iPhone assertiond[74] <Notice>: [QuietShare:5449] Activate assertion: <BKProcessAssertion: 0x10224bd60; "com.apple.UIKit.KeyboardManagement.message" (finishTask:180s); id:\M-b\M^@\M-&EBA95D1D5429>

Atenciosamente,

Carlos Guedes

On Sat, Jan 13, 2018 at 10:53 PM, Brian Armstrong [email protected] wrote:

@carlosguedes https://github.com/carlosguedes I was able to reproduce the behavior you saw. I have made a change to QuietModemKit that seems to fix this issue for me. I made a new release, so if you just run carthage update from the QuietShare repo, you should get the new code.

If you're curious, here's the fix I made bbc4486 https://github.com/quiet/QuietModemKit/commit/bbc44860806ef9ab369d9e5727a142298a9fed5c

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-357479804, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxB7BOPtvbRaAdgYyDOfvGpA7i6vKks5tKU_tgaJpZM4Mhsr- .

carlosguedes avatar Jan 15 '18 11:01 carlosguedes

Maybe I can help you providing my src. Hope can't make it clear for you. Thank you for everything. QuietShare-master-2.zip

carlosguedes avatar Jan 15 '18 14:01 carlosguedes

@carlosguedes I had a look at your zip, and it seems the new code I added is not present here (QuietShare-master-2/Carthage/Checkouts/QuietModemKit/QuietModemKit/QMFrameReceiver.m is still the old version). I tried running carthage update from QuietShare-master-2 and confirmed it did update to the new version, so please run that and try again.

brian-armstrong avatar Jan 15 '18 20:01 brian-armstrong

Ohh, Im so sorry. Maybe I made some mistake. I had even copied by hand the new code inside the qmframereceiver.m and possibly made some mistake. So sorry. I will try again. Thanks

On Mon, 15 Jan 2018 at 18:30 Brian Armstrong [email protected] wrote:

@carlosguedes https://github.com/carlosguedes I had a look at your zip, and it seems the new code I added is not present here ( QuietShare-master-2/Carthage/Checkouts/QuietModemKit/QuietModemKit/QMFrameReceiver.m is still the old version). I tried running carthage update from QuietShare-master-2 and confirmed it did update to the new version, so please run that and try again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-357782638, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxNB9xygOWP2lb1oRatpMCGBab8Rdks5tK7VdgaJpZM4Mhsr- .

-- Atenciosamente,

Carlos Guedes

carlosguedes avatar Jan 15 '18 20:01 carlosguedes

@carlosguedes No worries, maybe it was just the .zip that didn't have the new code? Let me know if you have any more questions about it.

brian-armstrong avatar Jan 16 '18 07:01 brian-armstrong

Brian! How are you?? Thank you very much!!! IT WORKED as a charm!!! I think that the example I created with send / receive don't work very well... it seems that maybe because some lack of threading it can't send and receive at the same time... when I got to quiet-js example, it worked perfectly. So... I think the problem is now solved... wow! You are great! Is there anything I can do to support your project? Thanks

Atenciosamente,

Carlos Guedes

On Mon, Jan 15, 2018 at 6:30 PM, Brian Armstrong [email protected] wrote:

@carlosguedes https://github.com/carlosguedes I had a look at your zip, and it seems the new code I added is not present here ( QuietShare-master-2/Carthage/Checkouts/QuietModemKit/ QuietModemKit/QMFrameReceiver.m is still the old version). I tried running carthage update from QuietShare-master-2 and confirmed it did update to the new version, so please run that and try again.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/quiet/QuietModemKit/issues/4#issuecomment-357782638, or mute the thread https://github.com/notifications/unsubscribe-auth/ABwQxNB9xygOWP2lb1oRatpMCGBab8Rdks5tK7VdgaJpZM4Mhsr- .

carlosguedes avatar Jan 16 '18 13:01 carlosguedes

@carlosguedes Awesome, glad that got it, and sorry it was broken for you for a while. Now go make something awesome, and tell people about it :)

brian-armstrong avatar Jan 16 '18 18:01 brian-armstrong

Also regarding send and receiving at the same time, that should be fine. I'd be interested in seeing the code that wasn't working for that.

brian-armstrong avatar Jan 17 '18 01:01 brian-armstrong

@carlosguedes I have facing same problem, receiveCallback method not called, what I have to do for fixing this issue.

Inderpal610 avatar Jul 11 '18 06:07 Inderpal610

@brian-armstrong @winster @carlosguedes Hello. Thanks for your nice hints on this chat.

I just cloned winster's repository and tried to test app. I am able to hear some sounds when I click "transmit", but receivercallback never called.

I also tried Carlos 's "master-2.zip" which was discussed on above chat, but same issue.

May you explain a bit more? Please help me. Thanks.

perfectdeveloper53 avatar Nov 08 '18 08:11 perfectdeveloper53

For anyone who faced the same issue as @carlosguedes, I believe the problem was caused by the device dismissing the recording session when accessing the speakers. Anyway, with swift 5, iphone6s, and iOS 13.1 I was able to solve it by adding try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playAndRecord, mode: AVAudioSession.Mode.videoRecording, options: AVAudioSession.CategoryOptions.mixWithOthers) to my app on startup Cheers

NAolERr avatar May 07 '20 16:05 NAolERr

@NAolERr Would you be kind to show me your source code for receiving ultrasonic frequency? I could not get it working in my Swift 5 project (Swift UI)

@brian-armstrong or if you have any idea?

Happy to help contribute once I get this working

Thanks! Brandon

brandex007 avatar Jul 16 '20 16:07 brandex007

Hi @brandex007

I will send you whatever I have together, It is a bit of a mess as I have put this aside for now. some pointers: send date now button sends the data through sound. the rotating wheel starts the continuous microphone access. (it cannot be turned off) use two phones to test it out. the green light is only used to detect if the phone heard itself and the delay

if you feel you have the knowhow to do, there was one thing I was trying to figure out. I'm trying to save the sound that is being played so that I can use it again without processing it through the library. maybe save it in a local variable as data and play it again.

QuietShare-master.zip

NAolERr avatar Jul 21 '20 11:07 NAolERr