<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[RemoteXY community — Registering HM-10 on iOS app]]></title>
	<link rel="self" href="https://forum.remotexy.com/extern.php?action=feed&amp;tid=588&amp;type=atom" />
	<updated>2018-11-10T06:31:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.remotexy.com/viewtopic.php?id=588</id>
		<entry>
			<title type="html"><![CDATA[Re: Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1874#p1874" />
			<content type="html"><![CDATA[<p>Thanks for the information. Recently I update my IOS operating system on my Macbook and I have faced an issue on my iTunes account that is <a target="_blank" href="http://www.ipadsupportnumber.com/blog/how-to-fix-ipad-error-code-1671/">iTunes error 1671</a> and I am looking for the support if anyone has any idea then please suggest me.</p>]]></content>
			<author>
				<name><![CDATA[teleworm]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=756</uri>
			</author>
			<updated>2018-11-10T06:31:23Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1874#p1874</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1843#p1843" />
			<content type="html"><![CDATA[<p>That code works just fine, unaltered ..... <a target="_blank" href="https://www.dropbox.com/s/sahdbkj2gyin7bc/2018-10-11%2010.56.47.mov?dl=0">https://www.dropbox.com/s/sahdbkj2gyin7 … 7.mov?dl=0</a></p><p>How are you connecting the HM-10 to the arduino pins 2 &amp; 3 ?</p><p>The HM-10 uses 3.3V level signals, the Arduino uses 5V.&nbsp; You can safely connect the HM-10 Tx pin directly to the Nano&#039;s Rx pin 2, but the Nano&#039;s Tx pin 3 should go via a logic level converter (or a voltage divider : Nano_TX : 1K : HM-10_RX : 2K : GND) to the HM-10 Rx pin</p><br /><p>Check your HM-10 configuration using this sketch....</p><div class="codebox"><pre><code>#include &lt;SoftwareSerial.h&gt;

SoftwareSerial BTSerial(2, 3);  // Rx, Tx

void setup() {
  Serial.begin(9600);  
  BTSerial.begin(9600);
  while(!Serial);
  Serial.println(&quot;AT Commands: okay &quot;);
}

void loop() {
  // read from the HM-10 and print to Serial
  if(BTSerial.available())
    Serial.write(BTSerial.read());

  //read from serial and write to the HM-10
  if(Serial.available())
    BTSerial.write(Serial.read());
}</code></pre></div><p>Using the serial monitor screen, set to &quot;Both NL &amp; CR&quot;, and &quot;9600 baud&quot;</p><p>You should see &quot;AT Commands: okay&quot;</p><p>If you don&#039;t, try different baud rates on the serial monitor until you do.&nbsp; It might be that the HM-10 has been configured at a different baud rate. </p><p>If you find a baud rate that works, you can either modify the &quot;Interface&quot; section of your RemoteXY app to match, or reset it to 9600 with the AT command &quot;AT+BAUD4&quot;, It should respond with &quot;+BAUD=9600&quot;, then &quot;OK&quot; on next line.</p>]]></content>
			<author>
				<name><![CDATA[Daba]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=630</uri>
			</author>
			<updated>2018-10-11T09:47:45Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1843#p1843</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1842#p1842" />
			<content type="html"><![CDATA[<p>Hi <strong>Daba</strong></p><p>Thank you for the very quick response.</p><p>I made the changes to my sketch and uploaded it to the Nano board but no luck. Still having the same error when trying to register with RemoteXY app.</p><p>Could you please look at the sketch below and let me know if there&#039;s anything else I could do?</p><div class="codebox"><pre><code>/*
   -- New project --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 2.3.3 or later version 
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.1.1 or later version;
     - for iOS 1.2.1 or later version;
    
   This source code is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.    
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__SOFTSERIAL
#include &lt;SoftwareSerial.h&gt;

#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,0,0,13,0,8,13,0,
  1,0,42,26,12,12,2,31,88,0 };
  
// this structure defines all the variables of your control interface 
struct {

    // input variable
  uint8_t button_1; // =1 if button pressed, else =0 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_BUTTON_1 13

SoftwareSerial MySerial(REMOTEXY_SERIAL_RX, REMOTEXY_SERIAL_TX);   //init the serial protocol, define the RX and TX pins

void setup() 
{
  MySerial.begin(REMOTEXY_SERIAL_SPEED);
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_1, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer


}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Trilobite]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=729</uri>
			</author>
			<updated>2018-10-09T17:26:24Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1842#p1842</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1841#p1841" />
			<content type="html"><![CDATA[<p>You haven&#039;t created a SoftwareSerial &quot;instance&quot; for your interface...</p><p>Before your void setup(); you need ...</p><div class="codebox"><pre><code>SoftwareSerial MySerial(REMOTEXY_SERIAL_RX, REMOTEXY_SERIAL_TX);   //init the serial protocol, define the RX and TX pins</code></pre></div><p>That creates the instance &quot;MySerial&quot; (can be any name), using pins defined in the RemoteXY configurate....</p><p>You also need to start the softserial comms and specify the Baud rate...&nbsp; inside void setup(); you need ...</p><div class="codebox"><pre><code>MySerial.begin(REMOTEXY_SERIAL_SPEED);</code></pre></div><p>Try that and see if that helps....</p>]]></content>
			<author>
				<name><![CDATA[Daba]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=630</uri>
			</author>
			<updated>2018-10-08T21:13:52Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1841#p1841</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1840#p1840" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Daba wrote:</cite><blockquote><div class="quotebox"><cite>Trilobite wrote:</cite><blockquote><p>Hi</p><p>I am using &quot;RemoteXY for iOS&quot; for a simple project to communicate with a relay via HM-10 bluetooth module (DX-BT05).</p><p>When I tried to add a new device via the app I can see my module is there but when I hit to connect it the app is trying to &quot;Register&quot; the module but return an error as &quot;Device not reply&quot;.</p><p>Can someone help me to sort this issue please?</p><p>My bluetooth module appear under the connected devices in the iPhone iOS 12.0</p><p>Many thanks</p></blockquote></div><p>You have to have a running sketch on your micro....</p><p>&quot;Registering&quot; is when the app is trying to receive the configuration data from your controller sketch.</p><p>Have you got all the required stuff in it&nbsp; .....</p><p>The Configuration Block - copy/paste this from the editor &quot;Get Source Code&quot;<br />A RemoteXY_Init() statement in void setup()<br />A RemoteXY_Handler() statement in void loop()</p><p>Have you got the Serial port setup correctly in your sketch, and have you &quot;started&quot; it ?</p><p>What comms are you using to talk to the HM-10, Hard Serial, or SoftSerial ?</p><p>Post your code (all of it, inside </p><div class="codebox"><pre><code> </code></pre></div><p> tags), ans &quot;Share&quot; your RemoteXY project.</p></blockquote></div><br /><p>Thank you for the reply. Please bear with me if I sounds like I dont know what I am talking about. This is my very first project. </p><p>I managed to upload the sketch to the Nano. So, I think that answers your query whether I have a running sketch on my micro.</p><p>I completed the circuit with all the other pieces and I can see the BLE module&#039;s LED stop blinking and stay solid when it connect with my iPhone (as a bluetooth device).</p><p>Please see below for the Configuration block (I think that&#039;s what it is)</p><div class="codebox"><pre><code>void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_1, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer


}</code></pre></div><br /><p>I am not sure whether the Serial port setup correctly or started it properly. So, I&#039;ll copy the full sketch below.</p><div class="codebox"><pre><code>/*
   -- New project --
   
   This source code of graphical user interface 
   has been generated automatically by RemoteXY editor.
   To compile this code using RemoteXY library 2.3.3 or later version 
   download by link http://remotexy.com/en/library/
   To connect using RemoteXY mobile app by link http://remotexy.com/en/download/                   
     - for ANDROID 4.1.1 or later version;
     - for iOS 1.2.1 or later version;
    
   This source code is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.    
*/

//////////////////////////////////////////////
//        RemoteXY include library          //
//////////////////////////////////////////////

// RemoteXY select connection mode and include library 
#define REMOTEXY_MODE__SOFTSERIAL
#include &lt;SoftwareSerial.h&gt;

#include &lt;RemoteXY.h&gt;

// RemoteXY connection settings 
#define REMOTEXY_SERIAL_RX 2
#define REMOTEXY_SERIAL_TX 3
#define REMOTEXY_SERIAL_SPEED 9600


// RemoteXY configurate  
#pragma pack(push, 1)
uint8_t RemoteXY_CONF[] =
  { 255,1,0,0,0,13,0,8,13,0,
  1,0,42,26,12,12,2,31,88,0 };
  
// this structure defines all the variables of your control interface 
struct {

    // input variable
  uint8_t button_1; // =1 if button pressed, else =0 

    // other variable
  uint8_t connect_flag;  // =1 if wire connected, else =0 

} RemoteXY;
#pragma pack(pop)

/////////////////////////////////////////////
//           END RemoteXY include          //
/////////////////////////////////////////////

#define PIN_BUTTON_1 13


void setup() 
{
  RemoteXY_Init (); 
  
  pinMode (PIN_BUTTON_1, OUTPUT);
  
  // TODO you setup code
  
}

void loop() 
{ 
  RemoteXY_Handler ();
  
  digitalWrite(PIN_BUTTON_1, (RemoteXY.button_1==0)?LOW:HIGH);
  
  // TODO you loop code
  // use the RemoteXY structure for data transfer


}</code></pre></div><br /><p>I am using a SoftSerial. </p><p>I am using macOS High Sierra to upload my Sketch and I successfully installed the drivers for the nano board and managed to upload the sketch at the end.</p>]]></content>
			<author>
				<name><![CDATA[Trilobite]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=729</uri>
			</author>
			<updated>2018-10-08T17:38:14Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1840#p1840</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1838#p1838" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Trilobite wrote:</cite><blockquote><p>Hi</p><p>I am using &quot;RemoteXY for iOS&quot; for a simple project to communicate with a relay via HM-10 bluetooth module (DX-BT05).</p><p>When I tried to add a new device via the app I can see my module is there but when I hit to connect it the app is trying to &quot;Register&quot; the module but return an error as &quot;Device not reply&quot;.</p><p>Can someone help me to sort this issue please?</p><p>My bluetooth module appear under the connected devices in the iPhone iOS 12.0</p><p>Many thanks</p></blockquote></div><p>You have to have a running sketch on your micro....</p><p>&quot;Registering&quot; is when the app is trying to receive the configuration data from your controller sketch.</p><p>Have you got all the required stuff in it&nbsp; .....</p><p>The Configuration Block - copy/paste this from the editor &quot;Get Source Code&quot;<br />A RemoteXY_Init() statement in void setup()<br />A RemoteXY_Handler() statement in void loop()</p><p>Have you got the Serial port setup correctly in your sketch, and have you &quot;started&quot; it ?</p><p>What comms are you using to talk to the HM-10, Hard Serial, or SoftSerial ?</p><p>Post your code (all of it, inside </p><div class="codebox"><pre><code> </code></pre></div><p> tags), ans &quot;Share&quot; your RemoteXY project.</p>]]></content>
			<author>
				<name><![CDATA[Daba]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=630</uri>
			</author>
			<updated>2018-10-08T14:10:07Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1838#p1838</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Registering HM-10 on iOS app]]></title>
			<link rel="alternate" href="https://forum.remotexy.com/viewtopic.php?pid=1836#p1836" />
			<content type="html"><![CDATA[<p>Hi</p><p>I am using &quot;RemoteXY for iOS&quot; for a simple project to communicate with a relay via HM-10 bluetooth module (DX-BT05).</p><p>When I tried to add a new device via the app I can see my module is there but when I hit to connect it the app is trying to &quot;Register&quot; the module but return an error as &quot;Device not reply&quot;.</p><p>Can someone help me to sort this issue please?</p><p>My bluetooth module appear under the connected devices in the iPhone iOS 12.0</p><p>Many thanks</p>]]></content>
			<author>
				<name><![CDATA[Trilobite]]></name>
				<uri>https://forum.remotexy.com/profile.php?id=729</uri>
			</author>
			<updated>2018-10-07T09:50:13Z</updated>
			<id>https://forum.remotexy.com/viewtopic.php?pid=1836#p1836</id>
		</entry>
</feed>
