0

I have done the following exactly as below without configuring any other thing.

  1. Downloaded a fresh copy of wso2 emm 2.0.1 from wso2.com/products/enterprise-mobility-manager/
  2. Unzipped it in C: drive.
  3. Changed the email settings with my organisation settings.
  4. Downloaded mysql and mysqlconnector.
  5. Closed skype for safer side, Started the mysqld server and created regdb user, with the script which is in [EMM_HOME]/dbscripts/mysql.sql
  6. Downloaded the Android source code from Git https://github.com/wso2/product-emm/tree/master/modules/mobile-agents/android/client , I have imported client folder alone in my Android studio. Not sure if I also need any other folders. Also changed some code as it was showing me errors as startServiceAsUser() -> changed to startService();
  7. Changed the API_SERVER_PORT = "9763" from the Constants.java file.
  8. Started the carbon server from bin -> wso2server.bat using cmd.
  9. Logged in to carbon and the to emm console and added a policy a role and a user, got the mail with user name password.
  10. Run the android code on S3, I am able login to wso2 emm server in my same network machine and the user is authenticated from below urls from the log:. From my local machinehttp://172.24.145.14:9763/dynamic-client-web/register & also this from my local machinehttp://172.24.145.14:9763/oauth2/token
  11. Now in the getLicenseFromServer() method in the AuthenticationActivity class I am getting a 302 response code, when accessing this url http://172.24.145.14:9763/api/device-mgt/android/v1.0/configuration/license

I want to run the server and run the app in my mobile for POC purposes. I do not want any certificates or to access it from HTTPS. What exactly I am doing wrong ?

Also if I am hittinghttp://172.24.145.14:9763/api/device-mgt/android/v1.0/configuration/license link from my chrome it is automatically redirecting to the login page of carbon.

Community
  • 1
  • 1
Uzair
  • 91
  • 2
  • 9
  • Your question is a bit unclear. Do you want to enrol a device and install a mobile application to the enrolled device? Or anything else? – madawa Nov 08 '16 at 16:15
  • Yes, I want to enroll a new device to the wso2 platform. Also I noticed that to enroll a device I need to create a GCM(Google Cloud Messaging) API key and load it in the source code. But since GCM has been replaced with FCM(Firebase Cloud Messaging) I can only create a FCM API key. Which I guess cannot be used with the Android app that wso2 provides. Because the whole source code is written in GCM code base. – Uzair Nov 11 '16 at 03:40
  • Did you follow https://docs.wso2.com/display/EMM210/End-user+Registering+an+Android+Device and still failed to enrol a device? Creating a GCM key is not mandatory. You can use the LOCAL notifier type instead. – madawa Nov 11 '16 at 09:31
  • Hi Madawa, Sorry for late reply. I tried all the steps as mentioned in the wso2 documents. I just want to make it work on my local network so I haven't created any bks file or any certificates. I have my server powered up. Can you tell me where to set up LOCAL notifier. Also as I mentioned in my question point 11. I am getting a 302 response code when ever my mobile device asks for licences to the server. – Uzair Nov 16 '16 at 03:21
  • You don't have to set up a LOCAL notifier. It's the default one. GCM is an advanced use case. Could you tell me where exactly you got stuck in this [documentation](https://docs.wso2.com/display/EMM210/End-user+Registering+an+Android+Device). I'm not clear why do you access the endpoint given in 11 manually. – madawa Nov 16 '16 at 04:24
  • Also, I would like to recommend you to use the latest version. https://github.com/wso2/product-emm/releases/tag/v2.2.0-RC1 – madawa Nov 16 '16 at 04:28
  • I am not accessing the endpoint manually, I am stuck at the PIN generation step number 10 in the document. I never reach till that screen. My spinner keeps loading, and in the log from the android studio I see that there is a 302 error - cannot reach the url i mentioned above. Also I am downloading the latest release as you mentioned will try my luck with that also. – Uzair Nov 16 '16 at 10:36
  • Logs For further reference 11-16 16:21:04.036 2302-2302/org.wso2.emm.agent D/DynamicClientManager: {"client_name":"asd_866941020926315","callback_url":"","client_id":"elNff1FNmltzNAMOzLpUi91OpK8a","client_secret":"NySDfwOiIy_5Q064LzAwnMAXgn0a"} 11-16 16:21:04.146 2302-2951/org.wso2.emm.agent E/Volley: [666] BasicNetwork.performRequest: Unexpected response code 302 for http://172.24.145.14:9763/api/device-mgt/android/v1.0/configuration/license 11-16 16:21:04.226 2302-2302/org.wso2.emm.agent E/APIController: com.android.volley.ServerError – Uzair Nov 16 '16 at 11:07

0 Answers0