Author Topic: DigiX WiFi not connecting to my AP  (Read 3429 times)

exeng

  • Sr. Member
  • ****
  • Posts: 445
DigiX WiFi not connecting to my AP
« on: January 16, 2017, 10:59:25 am »
With some reluctance I'm appealing to those who have success using DigiX Wifi.  I'm currently battling with the DigiX to get it to connect to my AP and run the BasicClient example as proof that it is working.

Haven't used the DigiX for a few years and recently decided to put it in service for a project that will among other things access Thingspeak to pull down some cloud data that is posted by my Oaks.

Here is the thing. I know that I had DigiX wifi working in the past (3 years ago) as I did run BasicClient and even had it emulating a Lifix bulb that controlled an RGB. So it was working in the past.  Basically I'm getting the impression (evidence suggests) that it's not getting an IP address from my router. That is one thing that has changed (different router).

Am I correct that once configured as STA mode (actully AP+STA so I can see the configuration screens) with the proper credentials, I should see an assigned IP address in the configuration (@10.10.100.254) System screen once it connects?

I can access the DigiX AP, reset Wifi, configre things, but can't seem to get and IP. I tried another standalone router and could see the DigiX connected it (MAC showed up) but no IP listed.

Any help / pointers to things to try would be helpful. I just want it to be a client on my net accessing the internet.

Powering via USB, JACK, JACK+USB does not seem to make a difference.


PeterF

  • Hero Member
  • *****
  • Posts: 871
Re: DigiX WiFi not connecting to my AP
« Reply #1 on: January 17, 2017, 12:53:31 am »
Oh fine... I had to dig out the DigiX to get you to settle ;-) (never mind the fact it was sat on a shelf in the cupboard about 3m away from my computer table as it had been pulled out recently for something else...  ;D)

So... I tried the WiFi... and I had pretty much the same experience as you... the WiFi signal strengh kept flapping around like a flag in the wind, and I got a super great IP of 0.0.0.0...  :'(

I then went back into the STA settings, and realised that 1) the encryption was wrong, and 2) it had decided that the SSID was "" (blank). I typed it in instead of using the scan button, and set the encryption again, saved it, rebooted, and now have a valid 192.168.0.x address on my network. It is pingable, and is finally visible of my router, so all seems good.The WiFi signal strength is still hopping around a bit between 75-90%, but stays in the high 80s most of the time.

Maybe that will give you some hope for when you get the magic smoke back into the DigiX. btw, this was when powered via microUSB with a roughly 5.1v input voltage... I don't feel the need to smoke test my DigiX just yet! :o


exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP
« Reply #2 on: January 17, 2017, 10:55:51 am »
Pete, thanks. Part(s) (3) are on order. If I get it down correctly on the first try, I can try my hand at making a Buck converter.

I guess I can try typing the SSID instead of scanning for the SSID but that seems like a long shot. Oh well, let's hope for the best.

I'm thinking that the smoke may have been a result of some high in rush current has instead of unplugging and plugging the PS at the wall, I was simply plugging and unplugging at the barrel jack. Just a guess. In any case that PS will never get near my DigiX again.

exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP
« Reply #3 on: January 28, 2017, 12:43:51 pm »
So while I'm waiting to build the courage and experience to put a new SAM MCU on my DigiX, I've been looking at the WiFi issue that I was chasing before the board fried the buck converter, regulator and MCU. The WiFi chip survived but it is still exhibiting the problem on not connecting to my AP when in AP+STA mode with proper credentials. For the record this was happening before the fry incident while the board was complete and working.

It does not seem to connect to my main router which is not the same router I had a few years ago when DigiX WiFi was working just fine as far as I can tell. I have a second Netgear router that I tried and I can see the MAC on the router but no IP address assigned. I have one more router to try on (the one that it worked on in the past), but I won't be able to access it until, Monday.

BTW, I can access the AP and do all the configuration stuff, so I'm pretty sure that the chip is working. So here is my question... If I configure the WiFi as AP+STA and give it the proper credentials to access my main AP, shouldn't it upon restart should in the config screen that the STA is connected and have an IP assigned? This is all without the DigiX MCU involved. Basically, with the WiFi chip configured and powered on, I'm expecting it to connect to my AP (not the chips AP).

Can any of you DigiX owners confirm or deny this?
« Last Edit: January 28, 2017, 10:18:50 pm by exeng »

PeterF

  • Hero Member
  • *****
  • Posts: 871
Re: DigiX WiFi not connecting to my AP
« Reply #4 on: January 28, 2017, 09:12:15 pm »
That's what I have (had)... once I got past the fact that it didn't seem to want to set the SSID/encryption properly in the first place. I'd picked it from the drop down list, but the SSID was missing on a reboot, so I typed it in manually, and re-picked the encryption type, and it behaved from then onwards. I can run it up again and load some screenshots if you want to see what it looks like on my setup in AP+STA mode...

exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP
« Reply #5 on: January 28, 2017, 10:30:15 pm »
Pete, yeah tried entering my AP SSID manually and not from the pick list, then entered the password, save/restart and still no luck. Just doesn't get an IP address. I'll be able to try this with the router that the DigiX worked with before on Monday (PST).

In the meantime, I have a Digispark Pro WiFi shield in the bag that I believe has a similar WiFi chip. I'll solder that up an see how it behaves. If you look at the Digispark Pro WiFI shield module first time setup http://digistump.com/wiki/digispark/tutorials/wififirstsetup it shows the IP assigned to it after going through the configuration setup and restart. We'll see what it does against my router.

PeterF

  • Hero Member
  • *****
  • Posts: 871
Re: DigiX WiFi not connecting to my AP
« Reply #6 on: January 29, 2017, 01:44:44 am »
Hm... since you reminded me about the Digispark Pro wifi... I double checked... and yes, I did get that... it was that and the GPS that interested me with the Pro, since it had extra flash and SRAM. So I just soldered it up, and yes, for me at least, it is doing exactly what it should do... i.e. there is an IP address after the reboot when in AP+STA mode. I'll send you a file  of the screen recording via PM, so you can see what happened... from the first boot of the wifi.


exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP
« Reply #7 on: January 29, 2017, 12:55:21 pm »
Pete, soldered up the Digispark Pro and Pro Wifi shield and was able to get an IP from my router. Interestingly though, when I connected the Digispark Pro to my PC via USB to upload it, I was getting flash write errors more often than not. When it did upload the blink program would not run. I thought, great another problem to chase. So I connected it to my laptop and no problem. I'm wondering if the power from my PC USB port is marginal.

OK, so now I'm go ahead and put the regulator on the DigiX so that I can power it from USB or barrel jack instead of the 3.3V rail and try different power sources. MCU is still off the board but it's not needed to configure the Wifi section.

UPDATE:
Yeah... It's a head scratch. Doesn't seem to make a difference. Does not get an IP address (while the Digispark Pro Wifi shield does.).  I feel, like I'm hearding cats. I guess I could replace the radio, but not before I get the MCU down.

 I put this aside for now and see what's up with the Digispark on my PC USB port. Always something to chase. Meanwhile my project sits and waits.
« Last Edit: January 29, 2017, 01:25:10 pm by exeng »

exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP
« Reply #8 on: January 29, 2017, 06:08:12 pm »
OK, Here is the latest in my attempt to figure out why I can't get an IP for the DigiX WIFI from my main router....

Did a test with another (spare) router where I set it up to have no security. This router with security would show the DigiX MAC but no IP when security was enabled. Without security got an IP no problem. So now I'm wondering what the problem could be. Pretty sure (very sure) that my WIFI credentials for the main router were correct. Used that same config to successfully connect the Digispark pro WIFI shield to the main router. So what the bleep is going on?

Not going to drop security on my main router.

Thoughts... ideas?

Solice

  • Newbie
  • *
  • Posts: 23
Re: DigiX WiFi not connecting to my AP
« Reply #9 on: January 29, 2017, 06:13:40 pm »
When you had issues, was the wifi SSID hidden?  I've never gotten a wireless microcontroller to connect to one.

exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP (SOLVED? NOT!)
« Reply #10 on: January 29, 2017, 06:20:28 pm »
It's not hidden. In fact I picked the SSID of my router in the config screen. Something about security that I does not like or handle properly. I'll keep scratching my head but at least this is progress.

UPDATE:
Reduced the password to 8 characters (was 10) and bam, got my IP address from the spare router. I guess I could change the PW on the main router but that stinks, as 1. I like having a long PW, and 2. If I change it, I'll have to update all of the connected devices. There are at least 11 connected devices that I can think of.

So, it's beginning to look like PW length is limited for the DigiX WIFI chip.

UPDATE2: Well I temporarily drop the PW on my main router to 8 characters. While this worked on the spare router, I still cannot connect to my main WiFi AP.
« Last Edit: January 29, 2017, 09:31:22 pm by exeng »

PeterF

  • Hero Member
  • *****
  • Posts: 871
Re: DigiX WiFi not connecting to my AP
« Reply #11 on: January 29, 2017, 10:08:52 pm »
My Digispark Pro WiFi was connecting to a WPA2-PSK network, with TKIP+AES, with a 8 character password, and wasn't having any issues, so that could why I flew under the radar on that one ;)

I'll try on a portable router, and set a 12 char passwd and see what happens. I also need to check the fw version of the two modules (one on the pro and on the DigiX), as I'll bet they are different...

exeng

  • Sr. Member
  • ****
  • Posts: 445
Re: DigiX WiFi not connecting to my AP
« Reply #12 on: January 30, 2017, 12:32:18 am »
Pete, Don't waste your time chasing this. I configured directly using AT commands on the serial  pins using my long password and walla it worked. Must be something  wrong with the HTML configuration page via WifI.

MORNING UPDATE:
So given what I seen with this, I don't know how I got it to work in the past. In any case, configuring directly using the AT command set seem to stick and allow it to connect to the AP and get an IP address. This suggests that there is something funky about the web config option that doesn't work properly. BTW, the chip reports it's VER as 1.4.4.

Hopefully when the MCU is put back everything will work as expected. I'll probably create (if one doesn't already exist) at sketch that simply sets WiFi credentials much like the DigiWifiReset utility sketch, only it (a config sketch) would set mode, security and credentials.

Also, anyone that wants to jump on the serial pins and talk directly to the chip would need a 3.3V compatible FTDI to USB board. The DigiX boards pin labelled TX2 connects to the FTDI TX and the RX2 to the FTDI RX. This is because the Wifi chip UART0_TX is connected a MCU RX pin that is brought out on the pin labelled TX2 and UART0_RX is connected to a MCU TX pin that is brought out on the pin lablled RX2. This is for the Kickstarter board, where the TX2 and RX2 silkscreen labels are actually wrong on the board and those pins are the physical TX1 and RX1 on the board.
See notes 11,12 here:http://digistump.com/wiki/_media/digix/tutorials/digix-pinout-beta-097.pdf

WARNING/CAUTION: I should mention that all this serial communication that I done directly to the Wifi chip was done without the MCU on the board. I do not recommend you do this with the MCU present. Better to be safe that sorry. Also, if the MCU is present and working you can always communicate with the chip via a sketch as it was meant to be. I did this because I had no other choice.

Hope this doesn't cause any confusion. Now back to contemplating how to get the SAM MCU down successfully.

P.S. I really need to start proof reading my long posts. Sometimes my brain fills in the missing words or loses context along the way like communicate vs. communication.
« Last Edit: January 30, 2017, 12:01:41 pm by exeng »