Main Site Documentation

RN171 Wifi connected to a hotspot and TCP_Client


#1

Hello

I want to use a RN171 Wifi module on a CerbuinoBee and establish a connection with a hotspot and then create a TCP client to request a remote server but I do not found a sample to begin.

Actually I have not received my RN171 ordered module but I look for software.

I think use code like this:

wifi_RN171.JoinWirelessNetwork(“Hotspot_SSID”, “key”);
wifi_RN171.Initialize(Wifi_RN171.SocketProtocol.TCP_Client);

Then how to send a HttpRequest ?

There are sample to use RN171 Wifi module has Hotspot and initialize a TCP Server but no sample to connect to a hotspot and use as TCP Client.

Thanks for your help.


#2

@ ChristianJack - The module is sold to be interacted with as a HotSpot. Joining a HotSpot is possible, but will require editing the configuration of the RN171 itself. To do so, you will need to read the data sheet.

As for the request, it all works the same. You would just send the same HTTP request to the ip address of the RN171 once it is connected to the network.


#3

@ James - Thank you for the reply.

  1. I’ll look at the datasheet from Microchip. Is there a example to make this change? and that it is complicated?
  2. is that the RS21 Wifi module can be used in place of RN171 on CerbuinoBee in my case? Is more easier?

#4

@ ChristianJack - The RS21 can not be used by the Cerberus Family


#5

@ James - I have found RN171 microchip electric datasheet but no information to change settings http://ww1.microchip.com/downloads/en/DeviceDoc/70005171A.pdf

I have more questions (see pictures).

  1. Use case 1 with RN171 is documented by GHI https://www.ghielectronics.com/docs/178/wifi-rn171-module => OK

  2. Use case 2 & 3 with RN171 are not documented. Is it possible to realize these configurations and how to proceed

  3. More generally which modules are to be used for making wifi applications? What modules use to realized use case 2 and use case 3 ?
    [ul]3.1) For use case 2: is it necessary to use RS21 module with a Spider board ?[/ul][ul]3.2) For use case 3: is it necessary to use RN171 module on server side and a RS21 module on client side and always use Spider card ?[/ul]


#6

@ James - Other question

For use case 3: The better way is it not to use FEZ Cobra II with a RN171 on server side and FEZ Cobra II with a RS21 on client side ?


#7

Usage case 2 & 3 were not documented because that was not the target application. A good example of the target application is to use the RN171 module to control a Cerbot by directly connecting your Cell phone to the RN171.

However, all usage cases are possible, but not with the default configurations we apply. Here is the document with all information related to commands and settings:
http://ww1.microchip.com/downloads/en/DeviceDoc/rn-wiflycr-ug-v1.2r.pdf


#8

@ James - Thank you.

Finally to solve the problem, I prefer to use a G120HDR board and a Wifi RS21 module for my project.

Use case 3 must be done with:
Server side : G120HDR board and Wifi RN171 module
Client side: G120HDR board and Wifi RS21 module.