Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gateway won't start in AP mode #4

Open
bkenobi opened this issue Jan 1, 2017 · 2 comments
Open

Gateway won't start in AP mode #4

bkenobi opened this issue Jan 1, 2017 · 2 comments

Comments

@bkenobi
Copy link

bkenobi commented Jan 1, 2017

I am just getting started with the sketch, but it looks like I should just be able to upload it to the ESP and configure once it's started. I am able to load the sketch, compile, and upload to both NodeMCU v3 and Wemos D1 without issue. Once uploaded, the serial monitor does not provide much help.

`RFM69 WiFi Gateway
External System
e sketch, but it looks like I should just be able to upload it to the ESP and configure once it's started. I am able to load the sketch, compile, and upload to both NodeMCU v3 and Wemos D1 without issue. Once uploaded, the serial monitor does not provide much help.

With no router in the area:
`RFM69 WiFi Gateway
External System
connected
MDNS.begin failed
Connect to http://rfm69gw1.local or http://0.0.0.0

Listening at 915 91 MHz
Attempting MQTT connection...failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...`

It looks like the ESP is not starting in AP mode and failing to connect to a router. Other than attempting to rewrite code that I'm not overly familiar with, I'm not sure where to go.

@bkenobi
Copy link
Author

bkenobi commented Jan 1, 2017

It looks like going into AP mode requires uncommenting some lines of code in the wifi_setup function.

Now that that works, I'll have to figure out how to connect to it again to set up the RFM settings and whatnot. It's currently default (915MHz, etc) and needs changing. When I connect to the listed IP, it doesn't go.

`RFM69 WiFi Gateway
External System
*WM: settings invalidated
*WM: THIS MAY CAUSE AP NOT TO START UP PROPERLY. YOU NEED TO COMMENT IT OUT AFTER ERASING THE DATA.
*WM:
*WM: AutoConnect
*WM: Connecting as wifi client...
*WM: Using last saved values, should be faster
*WM: Connection result:
*WM: 0
*WM: SET AP STA
Entered config mode
192.168.4.1
RFM69-AP
*WM:
*WM: Configuring access point...
*WM: RFM69-AP
*WM: AP IP address:
*WM: 192.168.4.1
*WM: HTTP server started
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Handle root
*WM: Handle root
*WM: Request redirected to captive portal
*WM: Handle root
*WM: Scan done
*WM: Linksys_1
*WM: -76
*WM: Linksys_2
*WM: -77
*WM: Sent config page
*WM: Scan done
*WM: Linksys_2
*WM: -78
*WM: Linksys_1
*WM: -78
*WM: Sent config page
*WM: Sent config page
*WM: Info
*WM: Sent info page
*WM: Scan done
*WM: Linksys_1
*WM: -75
*WM: Linksys_2
*WM: -78
*WM: Sent config page
*WM: WiFi save
*WM: Sent wifi save page
*WM: Connecting to new AP
*WM: Connecting as wifi client...
*WM: Connection result:
*WM: 3
connected
MDNS responder started
Connect to http://rfm69gw1.local or http://192.168.0.48

Listening at 915 91 MHz
Attempting MQTT connection...failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...failed, rc=-2 try again in 2 seconds
Attempting MQTT connection...failed, rc=-2 try again in 2 seconds`

@boaschti
Copy link

Hi,
Look at Issue #2. There is a loop.
Or wait some days since I have uploaded to GitHub. I fixed many bugs.
Also I added a funktion to send from broker to node. And a funktion to get retained messages for the node from the broker (sleeping nodes).
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants