<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62083/how-can-nrf51822-make-2-4g-communication-and-ble-communication-arbitrary-switch</link><description>how can nrf51822 make 2.4G communication and BLE communication arbitrary switch?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 05 Jun 2020 01:00:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62083/how-can-nrf51822-make-2-4g-communication-and-ble-communication-arbitrary-switch" /><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253398?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 01:00:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39fe9c77-de76-48a3-a5f3-d9a785e0e315</guid><dc:creator>Martinchen</dc:creator><description>&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;void ble_stack_stop(void)
{
    uint32_t err_code;

    err_code = softdevice_handler_sd_disable();
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253397?ContentTypeID=1</link><pubDate>Fri, 05 Jun 2020 00:59:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98ec9055-f682-4c7f-abb8-c1981886e1d2</guid><dc:creator>Martinchen</dc:creator><description>&lt;p&gt;yes，I know the example of &amp;quot;\examples\multiprotocol\ble_app_gzll&amp;quot;,but i have some troubles when i&amp;nbsp;transplant to my project of &amp;quot;ble_uart_app&amp;quot;.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt; // Enter main loop.
    for (;;)
    {
			power_manage();
			//pinvalue = nrf_gpio_pin_read(switch_24toble);   //pinvalue = 0
			if (pinvalue == 1)     
			{
				running_mode = BLE;
			}
			else
			{
				running_mode = GHZ;
			}
			
			if (running_mode != previous_mode)
			{
				previous_mode = running_mode;
				if (running_mode == BLE)
				{
						AppTx_stop(); 
						ble_stack_init();
						ble_app_cfg_start();
				}
				else if (running_mode == GHZ)
				{
					//ble_app_cfg_stop();
					ble_stack_stop(); 
					
					esb_tx_init();		
					ret = AppTx_Send((uint8_t *)buf,5);			
					if (ret &amp;lt; 0)
					{
						ret = 0;
					}
					
					if (TxRxPacket.TxFlage == 1) 
					{
							TxRxPacket.TxFlage = 0;  
						 // Toggle one of the LEDs.
							nrf_gpio_pin_write(LED_TXS, 1);
							nrf_delay_us(100000);
							nrf_gpio_pin_write(LED_TXS, 0);
							nrf_delay_us(100000);
					}
				}
			}
			&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;first,the code dehind of &amp;quot;power_manage()&amp;quot; is not running when the &amp;quot;power_manage();&amp;quot;has executed. when i put him somewhere else the softdevice is not close(sd_softdevice_disable() running will lead to program go into &amp;quot;while (loop);&amp;quot; in the &amp;quot;app_error.c&amp;quot;).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253259?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 11:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cc28684-a72f-4166-b1d6-b15ad182a9da</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Check out&amp;nbsp;\examples\multiprotocol\ble_app_gzll&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253224?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 09:39:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5cf71ff-aced-485b-a253-bc38b59db8e3</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&amp;quot;2.4GHz&amp;quot; is just a frequency&lt;/p&gt;
&lt;p&gt;BLE operates at 2.4GHz&lt;/p&gt;
&lt;p&gt;So &amp;quot;&lt;span&gt;switching between BLE and 2.4GHZ&amp;quot; means nothing.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You mean, &amp;quot;switching between BLE and&lt;em&gt;&amp;nbsp;a proprietary protocol&lt;/em&gt;&amp;quot;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253151?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 03:49:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49c63401-6820-40f3-8a1a-e63f9a66d98e</guid><dc:creator>Martinchen</dc:creator><description>&lt;p&gt;&lt;span&gt;I got idea for switching between BLE and 2.4GHZ.But when i was disabled to softdevice using &amp;quot;sd_softdevice_disable()&amp;quot;,the program come in &amp;quot;while (loop);&amp;quot;. If i want to&amp;nbsp; close the softdevice, what am i going to do?&amp;nbsp; My&amp;nbsp; idea is this code for&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;switching between BLE and 2.4GHz.&lt;/span&gt;&lt;pre class="ui-code" data-mode="text"&gt;	nrf_gpio_cfg_output(LED_BLE);		//ble&amp;#177;&amp;#234;&amp;#214;&amp;#190;
			nrf_gpio_pin_write(LED_BLE, 0); //&amp;#179;&amp;#245;&amp;#202;&amp;#188;&amp;#215;&amp;#180;&amp;#204;&amp;#172;&amp;#181;&amp;#231;&amp;#198;&amp;#189;&amp;#192;&amp;#173;&amp;#181;&amp;#205;&amp;#202;&amp;#185;&amp;#214;&amp;#174;&amp;#178;&amp;#187;&amp;#193;&amp;#193;
			
			nrf_gpio_cfg_output(LED_TXS);		//2.4G&amp;#177;&amp;#234;&amp;#214;&amp;#190;
			nrf_gpio_pin_write(LED_TXS, 0); //&amp;#179;&amp;#245;&amp;#202;&amp;#188;&amp;#215;&amp;#180;&amp;#204;&amp;#172;&amp;#181;&amp;#231;&amp;#198;&amp;#189;&amp;#192;&amp;#173;&amp;#181;&amp;#205;&amp;#202;&amp;#185;&amp;#214;&amp;#174;&amp;#178;&amp;#187;&amp;#193;&amp;#193;
			
			nrf_gpio_cfg_input(switch_24toble,NRF_GPIO_PIN_NOPULL);
			
			ble_stack_init();
			ble_app_cfg_start();
			
    // Enter main loop.
    for (;;)
    {
			
			pinvalue = nrf_gpio_pin_read(switch_24toble);
			if (pinvalue == 1)
			{
				running_mode = BLE;
			}
			else
			{
				running_mode = GHZ;
			}
			
			 power_manage();
			
			if (running_mode != previous_mode)
			{
				previous_mode = running_mode;
				if (running_mode == BLE)
				{
						AppTx_stop(); //&amp;#205;&amp;#163;&amp;#214;&amp;#185;&amp;#183;&amp;#162;&amp;#203;&amp;#205;&amp;#163;&amp;#172;&amp;#191;&amp;#170;&amp;#202;&amp;#188;ble
						ble_stack_init();
						ble_app_cfg_start();
				}
				else if (running_mode == GHZ)
				{
					//ble_app_cfg_stop();
					ble_stack_stop(); //&amp;#205;&amp;#163;&amp;#214;&amp;#185;ble&amp;#163;&amp;#172;&amp;#215;&amp;#162;&amp;#210;&amp;#226;&amp;#205;&amp;#163;&amp;#214;&amp;#185;&amp;#203;&amp;#179;&amp;#208;&amp;#242;&amp;#163;&amp;#187;&amp;#191;&amp;#170;&amp;#202;&amp;#188;2.4GHZ
					
					
					esb_tx_init();		//&amp;#179;&amp;#245;&amp;#202;&amp;#188;&amp;#187;&amp;#175;&amp;#183;&amp;#162;&amp;#203;&amp;#205;&amp;#197;&amp;#228;&amp;#214;&amp;#195;
					ret = AppTx_Send((uint8_t *)buf,5);			//&amp;#183;&amp;#162;&amp;#203;&amp;#205;&amp;#210;&amp;#187;&amp;#214;&amp;#161;&amp;#185;&amp;#204;&amp;#182;&amp;#168;&amp;#214;&amp;#161;&amp;#163;&amp;#172;&amp;#178;&amp;#226;&amp;#202;&amp;#212;&amp;#211;&amp;#195;
					if (ret &amp;lt; 0)
					{
						ret = 0;
					}
				}
				
void ble_stack_stop(void)
{
    uint32_t err_code;

    err_code = softdevice_handler_sd_disable();
    APP_ERROR_CHECK(err_code);
}

uint32_t softdevice_handler_sd_disable(void)
{
    uint32_t err_code = sd_softdevice_disable();
#if 1
    if (err_code == NRF_SUCCESS)
    {
        m_softdevice_enabled = false;
        nrf_drv_clock_on_sd_disable();
    }
#else
    m_softdevice_enabled = !(err_code == NRF_SUCCESS);
#endif
    return err_code;
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253150?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 03:48:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc96d686-7f26-425e-b424-2703765c987b</guid><dc:creator>Martinchen</dc:creator><description>&lt;p&gt;I got idea for switching between BLE and 2.4GHZ.But when i was disabled to softdevice using &amp;quot;sd_softdevice_disable()&amp;quot;,the program come in &amp;quot;while (loop);&amp;quot;. If i want to&amp;nbsp; close the softdevice, what am i going to do?&amp;nbsp; My&amp;nbsp; idea is this code for&amp;nbsp; &lt;span&gt;switching between BLE and 2.4GHz.&lt;pre class="ui-code" data-mode="text"&gt;			nrf_gpio_cfg_output(LED_BLE);		//ble&amp;#177;&amp;#234;&amp;#214;&amp;#190;
			nrf_gpio_pin_write(LED_BLE, 0); //&amp;#179;&amp;#245;&amp;#202;&amp;#188;&amp;#215;&amp;#180;&amp;#204;&amp;#172;&amp;#181;&amp;#231;&amp;#198;&amp;#189;&amp;#192;&amp;#173;&amp;#181;&amp;#205;&amp;#202;&amp;#185;&amp;#214;&amp;#174;&amp;#178;&amp;#187;&amp;#193;&amp;#193;
			
			nrf_gpio_cfg_output(LED_TXS);		//2.4G&amp;#177;&amp;#234;&amp;#214;&amp;#190;
			nrf_gpio_pin_write(LED_TXS, 0); //&amp;#179;&amp;#245;&amp;#202;&amp;#188;&amp;#215;&amp;#180;&amp;#204;&amp;#172;&amp;#181;&amp;#231;&amp;#198;&amp;#189;&amp;#192;&amp;#173;&amp;#181;&amp;#205;&amp;#202;&amp;#185;&amp;#214;&amp;#174;&amp;#178;&amp;#187;&amp;#193;&amp;#193;
			
			nrf_gpio_cfg_input(switch_24toble,NRF_GPIO_PIN_NOPULL);
			
			ble_stack_init();
			ble_app_cfg_start();
			
    // Enter main loop.
    for (;;)
    {
			
			pinvalue = nrf_gpio_pin_read(switch_24toble);
			if (pinvalue == 1)
			{
				running_mode = BLE;
			}
			else
			{
				running_mode = GHZ;
			}
			
			 power_manage();
			
			if (running_mode != previous_mode)
			{
				previous_mode = running_mode;
				if (running_mode == BLE)
				{
						AppTx_stop(); //&amp;#205;&amp;#163;&amp;#214;&amp;#185;&amp;#183;&amp;#162;&amp;#203;&amp;#205;&amp;#163;&amp;#172;&amp;#191;&amp;#170;&amp;#202;&amp;#188;ble
						ble_stack_init();
						ble_app_cfg_start();
				}
				else if (running_mode == GHZ)
				{
					//ble_app_cfg_stop();
					ble_stack_stop(); //&amp;#205;&amp;#163;&amp;#214;&amp;#185;ble&amp;#163;&amp;#172;&amp;#215;&amp;#162;&amp;#210;&amp;#226;&amp;#205;&amp;#163;&amp;#214;&amp;#185;&amp;#203;&amp;#179;&amp;#208;&amp;#242;&amp;#163;&amp;#187;&amp;#191;&amp;#170;&amp;#202;&amp;#188;2.4GHZ
					
					
					esb_tx_init();		//&amp;#179;&amp;#245;&amp;#202;&amp;#188;&amp;#187;&amp;#175;&amp;#183;&amp;#162;&amp;#203;&amp;#205;&amp;#197;&amp;#228;&amp;#214;&amp;#195;
					ret = AppTx_Send((uint8_t *)buf,5);			//&amp;#183;&amp;#162;&amp;#203;&amp;#205;&amp;#210;&amp;#187;&amp;#214;&amp;#161;&amp;#185;&amp;#204;&amp;#182;&amp;#168;&amp;#214;&amp;#161;&amp;#163;&amp;#172;&amp;#178;&amp;#226;&amp;#202;&amp;#212;&amp;#211;&amp;#195;
					if (ret &amp;lt; 0)
					{
						ret = 0;
					}
				}
				
void ble_stack_stop(void)
{
    uint32_t err_code;

    err_code = softdevice_handler_sd_disable();
    APP_ERROR_CHECK(err_code);
}

uint32_t softdevice_handler_sd_disable(void)
{
    uint32_t err_code = sd_softdevice_disable();
#if 1
    if (err_code == NRF_SUCCESS)
    {
        m_softdevice_enabled = false;
        nrf_drv_clock_on_sd_disable();
    }
#else
    m_softdevice_enabled = !(err_code == NRF_SUCCESS);
#endif
    return err_code;
}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/253128?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 19:09:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9236c085-5ce8-4ea5-b810-4e6cc5fa8274</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Sligthly old blog post, but in principle should still be valid:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/running-micro-esb-concurrently-with-ble"&gt;https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/running-micro-esb-concurrently-with-ble&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/252973?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 11:19:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b73cf4fb-f64a-4f56-ac16-50ba9197aad1</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;I asked you before if you meant switching&amp;nbsp;&lt;span&gt;between BLE and some other protocol and you said, &amp;quot;&lt;strong&gt;NO&lt;/strong&gt;&amp;quot;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Now you&amp;#39;re saying that you &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;do&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; want to&amp;nbsp;switching&amp;nbsp;between BLE and some other protocol ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/252969?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 11:09:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4608bb9-2ee0-4644-8d67-d615f11a0eb6</guid><dc:creator>Martinchen</dc:creator><description>&lt;p&gt;what is the meaning of&amp;nbsp; &amp;quot;makes no sense - BLE is 2.4GHz&amp;quot;?&amp;nbsp; I mean the function of BLE and 2.4GHz&amp;nbsp; can used to work together. The example of &amp;quot;/proprietary_rf/esb_ptx&amp;quot; in SDK12.1 can used&amp;nbsp; in the&amp;nbsp; &amp;nbsp;example of &amp;quot;ble_uart_app&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/252943?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 09:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8fce663f-e60e-4125-ba1e-31b2d28bd285</guid><dc:creator>awneil</dc:creator><description>[quote userid="90674" url="~/f/nordic-q-a/62083/how-can-nrf51822-make-2-4g-communication-and-ble-communication-arbitrary-switch/252941"]switching between BLE and 2.4G[/quote]
&lt;p&gt;that makes no sense - BLE &lt;span style="text-decoration:underline;"&gt;&lt;em&gt;&lt;strong&gt;is&lt;/strong&gt;&lt;/em&gt;&lt;/span&gt; 2.4GHz.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#Technical_details"&gt;https://en.wikipedia.org/wiki/Bluetooth_Low_Energy#Technical_details&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/252941?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 09:29:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d6a7348-693d-45ee-a54b-926d6bdde7cb</guid><dc:creator>Martinchen</dc:creator><description>&lt;p&gt;No, the nRF5 always work at BLE，then i&amp;nbsp; want to switch the 2.4G any time。I mean switching between BLE and 2.4G.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how can nrf51822  make 2.4G communication and BLE communication arbitrary switch?</title><link>https://devzone.nordicsemi.com/thread/252914?ContentTypeID=1</link><pubDate>Wed, 03 Jun 2020 08:16:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd6dcc93-961d-4dd4-b7b4-206a947b6bf8</guid><dc:creator>awneil</dc:creator><description>[quote userid="90674" url="~/f/nordic-q-a/62083/how-can-nrf51822-make-2-4g-communication-and-ble-communication-arbitrary-switch"]2.4G communication[/quote]
&lt;p&gt;The nRF5 always work at 2.4GHz - do you mean switching between BLE and some other protocol (both at 2.4GHz) ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>