Author Topic: wifi questions, where am i choosing the network?  (Read 15736 times)

contractorwolf

  • Newbie
  • *
  • Posts: 7
wifi questions, where am i choosing the network?
« on: November 25, 2013, 06:22:44 pm »
I see several examples in such as the ping example but cant figure out where I am putting in my wifi info (which network, username/password). What am i missing here? Thanks!
James

dougal

  • Sr. Member
  • ****
  • Posts: 289
Re: wifi questions, where am i choosing the network?
« Reply #1 on: November 25, 2013, 07:45:20 pm »

contractorwolf

  • Newbie
  • *
  • Posts: 7
Re: wifi questions, where am i choosing the network?
« Reply #2 on: November 25, 2013, 08:04:22 pm »
yeah, i finally figured that out. I went through the instructions and seem to have bricked the wifi and now I dont see the Digix from my phone or laptops wifi. I know that there is a reset function that should reset the username/password and features for connecting to it but I cant seem to find any details on how to do that, got any idea how to reset it?

contractorwolf

  • Newbie
  • *
  • Posts: 7
Re: wifi questions, where am i choosing the network?
« Reply #3 on: November 25, 2013, 08:50:08 pm »
nevermind, now I was able to get it to reset and set my wifi username and password but it 1) doesnt have a way to test it while in I am connected to it as an AP and 2) doesnt seem to actually save the password (everytime it reboots it sets it to 1234567).  Running the "basic" sketch just has it outputting:
"Re-checking for link build up
+ok=off"
over and over

any guesses?

dbell

  • Newbie
  • *
  • Posts: 44
Re: wifi questions, where am i choosing the network?
« Reply #4 on: November 26, 2013, 07:48:34 pm »
OK, another noob here! I also seem to have killed my wifi, trying to set it to reside on my home network.
Tried every combination of Reset, Erase, power off/on I can think of, to no avail.

How do I get 10.10.100.254 backs?!?

Dave

contractorwolf

  • Newbie
  • *
  • Posts: 7
Re: wifi questions, where am i choosing the network?
« Reply #5 on: November 26, 2013, 09:25:51 pm »
I think I held the reset button while plugging it back in, used my phone to see if it appears on my Wifi list.  I still cant get it online though.

dbell

  • Newbie
  • *
  • Posts: 44
Re: wifi questions, where am i choosing the network?
« Reply #6 on: November 26, 2013, 09:37:31 pm »
That got it, I think!

Thanks!

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: wifi questions, where am i choosing the network?
« Reply #7 on: November 27, 2013, 11:55:37 pm »
nevermind, now I was able to get it to reset and set my wifi username and password but it 1) doesnt have a way to test it while in I am connected to it as an AP and 2) doesnt seem to actually save the password (everytime it reboots it sets it to 1234567).  Running the "basic" sketch just has it outputting:
"Re-checking for link build up
+ok=off"
over and over

any guesses?

We're you able to solve this?

I'm not sure I understand the question - if you leave the module in STA+AP mode then you can access it on the DigiX network to change settings, but it will also connect to the network you setup in STA mode.

dbell

  • Newbie
  • *
  • Posts: 44
Re: wifi questions, where am i choosing the network?
« Reply #8 on: November 28, 2013, 08:38:29 am »
No, I have not resolved this. Rather confused, actually.
Where is there some documentation that describes the functions and differences of STA, AP, and AP+STA modes?

Initially, the DigiX came up as specified on IP 10.10.100.254, and I could reach the Settings pages with my iPhone.

I believe (can't check it now, because I can't access it) I set it to AP+STA.
Then in the STA Settings screen, entered a free IP address on my local network (192.168.1.222) .
I left the Gateway and DNS Server addresses alone, and DHCP enabled.
After Restart, I still couldn't access the server from a connected PC.

My iPhone sees the DIGIX wifi network, which shows IP address 192.168.1.150 with Gateway and DNS addresses 192.168.1.222.
Note: not what I attempted to set.
Using the phone's Safari browser, I cannot connect to ...150 (or to ...222).
Can't ping either address from the PC, either.

All attempts to reset to defaults have so far failed. (Erase, Reset, Reset while plugging in, etc.)

Help, please!!

Dave

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: wifi questions, where am i choosing the network?
« Reply #9 on: November 29, 2013, 12:43:23 am »
It sounds like something got entered on the wrong screen - as an IP can't be entered on the STA setting screen if DHCP is enabled. To have it connect to your local network you need to hit the Scan button at the top of the STA page, find your network, enter any security info and save.

What you describe sounds like the AP page was where this was all entered - the iPhone is seeing its IP as 192.168.1.150 when it is on the DigiX network, with the DigiX being the gateway at 192.168.1.122. If oyu connect to that network you should be able to load the admin page at 192.168.1.222 - but it seems like lots of things are confused here, so it is probably more important to just do a full reset.

To do a reset try uploading this:

Code: [Select]
#include <DigiFi.h>

DigiFi wifi;


void setup(){
   

    wifi.begin(9600);
    wifi.startATMode();
    wifi.reset();
    wifi.endATMode();

}

void loop(){}


Upload, let it run for 30 seconds+, then unplug the DigiX and plug it back in, see if you can connect to the DigiX network and get the admin page at 10.10.100.254

Let me know if that works - if it does we'll add it to the wiki for others

dbell

  • Newbie
  • *
  • Posts: 44
Re: wifi questions, where am i choosing the network?
« Reply #10 on: November 29, 2013, 10:18:32 am »
No, that didn't reset to 10.10.100.254
Still stuck at 192.168.1.222 and setup page not reachable from PC or iPhone
iPhone readily joins the DigiX network, but that's as far as it can go
I ran the sketch several times, tried Reset while plugging in again, but no luck...

Dave

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: wifi questions, where am i choosing the network?
« Reply #11 on: November 30, 2013, 12:19:29 am »
Try this instead:

Code: [Select]
#include <DigiFi.h>
DigiFi wifi;


void setup(){
   

    wifi.begin(9600);
    wifi.startATMode();
    wifi.factoryRestore();
    wifi.endATMode();

}

void loop(){}

That should do it - as that is the actual factory reset command (the last just rebooted the wifi - sorry got mixed up).

I just tested it on a DigiX (messing up the config in all kidns of ways first) and after running the DigiX shows up as HF-LPB network (factory default) which I can connect to and then go to 10.10.100.254

The one way this won't work is if the baud rate or error control (should be disabled) was changed on the "Other Setting" page

dbell

  • Newbie
  • *
  • Posts: 44
Re: wifi questions, where am i choosing the network?
« Reply #12 on: November 30, 2013, 11:12:43 am »
Success at last!
Thank you!

Here's a vaguely related question:
While trying everything I could think of to restore (not seeing there WAS a factoryRestore()), I considered using a sketch to "manually" set the various parameters ( setNetParams() ). Of course, I wanted READ the current params first ( getNetParams() ).
I needed to display the string returned by getNetParams(), so did Serial.begin(9600); and Serial.println("test"); in a loop, opening a Monitor window. No output...

A basic Serial sketch works fine, without Wifi enabled.

Seems I can't run Serial and Wifi at the same time?!?

Dave

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: wifi questions, where am i choosing the network?
« Reply #13 on: December 01, 2013, 02:51:38 am »
I run them both together all the time - can you share your code?

dbell

  • Newbie
  • *
  • Posts: 44
Re: wifi questions, where am i choosing the network?
« Reply #14 on: December 01, 2013, 10:12:59 am »
This produces no output in the Monitor window:
#include <DigiFi.h>
DigiFi wifi;

String params;
int i=0;

void setup(){
    wifi.begin(9600);
    wifi.startATMode();
    params = wifi.version();
    wifi.endATMode();
   
    Serial.begin(9600);
}

void loop(){
  Serial.print(i);
  Serial.println(params);
  i++;
  delay(500);
}

Removing all wifi code, I get a count:
//#include <DigiFi.h>
//DigiFi wifi;

String params;
int i=0;

void setup(){
//    wifi.begin(9600);
//    wifi.startATMode();
//    params = wifi.version();
//    wifi.endATMode();
   
    Serial.begin(9600);
}

void loop(){
  Serial.print(i);
  Serial.println(params);
  i++;
  delay(500);
}