Smart Power 2 firmware with wifi client

Moderators: mdrjr, odroid

Smart Power 2 firmware with wifi client

Unread postby palich2000 » Fri Oct 20, 2017 6:03 am

Hello
After a little bit of distraction, I made a firmware version which can be both a client there and a WiFi server.
The algorithm is such that if at the moment of starting SmartPower2 the network with the same name as specified in the settings is found and the password is approached then the client wifi mode is started. If no SSID is found while searching, the AP mode is started. If the SSID was found but could not connect, then the AP mode is started, but the SSID is changed, ESP.getChipId () is added to it in hexadecimal.
Attachments
smartpower2.tar.gz
(121.22 KiB) Downloaded 13 times
palich2000
 
Posts: 16
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2

Re: Smart Power 2 firmware with wifi client

Unread postby lsc1117 » Fri Nov 24, 2017 2:23 pm

Hello palich2000,

I have uploaded your firmware to my SmartPower2.
But, the webserver didn't work.

I checked my network using the ping and it works well.
I don't know why the webpage doesn't show up.

Thank you.
lsc1117
 
Posts: 50
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Smart Power 2 firmware with wifi client

Unread postby palich2000 » Fri Nov 24, 2017 3:47 pm

Hello.
There is not enough information to help you.
Did you connect to SmartPower as an access point or connect it to your wireless network?
palich2000
 
Posts: 16
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2

Re: Smart Power 2 firmware with wifi client

Unread postby lsc1117 » Mon Nov 27, 2017 10:11 am

Hi,
I connected the SmartPower to my AP.
Then, I tried to see the web page of SmartPower.

Thank you.
lsc1117
 
Posts: 50
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Smart Power 2 firmware with wifi client

Unread postby palich2000 » Mon Nov 27, 2017 9:26 pm

Hi
This should help.

sudo platformio run -t uploadfs
palich2000
 
Posts: 16
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2

Re: Smart Power 2 firmware with wifi client

Unread postby lsc1117 » Tue Nov 28, 2017 3:06 pm

Hi,

I executed the instruction normally.
The SmartPower2 works well as AP.
And also The STA mode works well with another AP.
I can show the web page using my phone when I connect directly to SmartPower of AP mode.
So, I tried to access the web page via another AP When the Smartpower connects to the another AP as STA mode.
But, I can't access the web page.
I don't understand why I can't access.

Thank you.
lsc1117
 
Posts: 50
Joined: Thu Aug 22, 2013 12:46 am
Location: South Korea
languages_spoken: english

Re: Smart Power 2 firmware with wifi client

Unread postby palich2000 » Wed Nov 29, 2017 5:04 pm

Hi
The Web interface is built using websockets.
The websockets respond at port 81 and the web site at port 80.
Both these ports must be available for the correct operation. If you use nat, you need to use dnat for 80 and 81 ports on the router.

WBR Palich.
palich2000
 
Posts: 16
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2

Re: Smart Power 2 firmware with wifi client

Unread postby palich2000 » Wed Nov 29, 2017 5:51 pm

Hi

I forked the repository, and it shows what and where I changed in the project.

https://github.com/palich2000/smartpower2

WBR Palich
palich2000
 
Posts: 16
Joined: Tue Jan 03, 2017 10:30 pm
languages_spoken: ukrainian, english
ODROIDs: ODROID-C2


Return to Smart Power

Who is online

Users browsing this forum: No registered users and 2 guests