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

Delegate methods for Easylink are not being called in Demo App #6

Open
auprabh opened this issue Feb 13, 2018 · 2 comments
Open

Delegate methods for Easylink are not being called in Demo App #6

auprabh opened this issue Feb 13, 2018 · 2 comments

Comments

@auprabh
Copy link

auprabh commented Feb 13, 2018

Hi Guys, I am testing the Easylink Demo App and have come across an issue which I thought of clarifying with you.

We are testing with following steps:

  1. After opening EasyLink Demo we are on Home screen with text “Searching for MXCHIP Module…”
  2. Click on “+” button.
  3. Fill up all the fields SSID, Password, extra data, Select mode - EasyLink V2.
  4. Click on button “Start EasyLink V2 Mode”.
  5. Pop up “EasyLink V2 sending… Press EasyLink button on your device!”
  6. Click on “Stop” button of pop up , the delegate methods for EasyLink should be called to get devices which are found in “EasyLinkMainViewController.m”. (Line number - 719). But the methods are not called .
  7. Devices show on “BrowserViewController.m” (Home Screen) after pushing back screen, without calling delegates. I guess this is showing us because Bonjour is able to find the devices.
  8. According to demo devices should be show after calling delegates method for easyLink on “EasyLinkMainViewController.m”. But the delegates methods are not called.

It would be great if you can kindly advise if I am missing something here.

Thanks so much,

Kind regards,
Deep

@neooxu
Copy link
Member

neooxu commented Feb 17, 2018 via email

@auprabh
Copy link
Author

auprabh commented Feb 20, 2018

Hi @neooxu,

Thanks so much for replying! These are the steps which we are following:

  1. Setup EasyLink ( i.e. set delegate for EasyLink , get deviceIPConfig dictionary):

` var easylink_config: EASYLINK?
var deviceIPConfig = NSMutableDictionary()

easylink_config = EASYLINK.init(forDebug: true, withDelegate: self)

deviceIPConfig = (
deviceIPConfig["DHCP"] = true
deviceIPConfig["IP"] = EASYLINK.getIPAddress()
deviceIPConfig["NetMask"] = EASYLINK.getNetMask()
deviceIPConfig["GateWay"] = EASYLINK.getGatewayAddress()
deviceIPConfig["DnsServer"] = EASYLINK.getGatewayAddress()
) `

  1. Add WiFi details (SSID and Password).

  2. On Confirmation of Step 2 above, call startTransmitting(EASYLINK_V2) method. (Select EasyLink V2 Mode)

  3. Create dictionary "wlanConfig" ( SSID (encoding format), SSID Password, DHCP, IP, NetMask, GateWay, DnsServer ).

  4. Call:

easylink_config?.prepareEasyLink(wlanConfig , info: NSData(bytes: temp, length: Int(strlen(temp))) as Data!,mode:mode)

  1. Which in turn calls:

sendAction()

  1. Which in turn calls:

easylink_config?.transmitSettings()

Now this is where the call stack should go into Delegate Function, but it doesn't.

What we are doing here is that we call "Bonjour Service" (looking for ServiceType="_easylink._tcp" and Domain="local")

  1. Bonjour in above Step 7 is able to find out our Device but it doesn't connect to EasyLink.

Kindly advise if this looks okay, and thanks again so much for your kind help!

Warm regards
Deep

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

No branches or pull requests

2 participants