Intel® Makers
Intel® Edison, Intel® Joule™, Intel® Curie™, Intel® Galileo
Announcements
Welcome - This is a Peer-to-Peer Forum only. Intel has discontinued these products but you may find support from other customers on this Forum
9872 Discussions

Set Homepage of Intel Edison

HLI35
Novice
1,125 Views

I'm working on a project to build a web server based on flask on intel Edison. I'm wondering if it possible that the flask will run automatically when the edison connects to wifi. That means I want the original home page on intel edison is replaced by my web page.

Thank you guys in advanced.

0 Kudos
1 Solution
KMill10
Valued Contributor II
222 Views

**EDIT ** Added an example unit file.

To permanently stop the existing Edison web page from starting at boot:

1. Log onto your edison using SSH or a serial terminal.

2. Enter the following command:

systemctl disable edison_config.service

systemctl stop edison_config.service

Then create a 'unit' file with all the instructions necessary to start your Flask web server. Lets say you call the unit file "my_web.service" then you would save it in /lib/systemd/system and then run these commands:

systemctl enable my_web.service

systemctl start my_web.service

Now your Flask server will start every time edison boots.

For details on writing a "unit" file see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_... here.

As an example, here is the unit file that I use to start my can-processor on my Edison:

[Unit]

Description=Daemon to handle mercury CAN Bus Interface.

After=network.target

[Service]

Type=idle

ExecStart=/usr/local/bin/spider_can

Restart=on-failure

[Install]

WantedBy=multi-user.target

View solution in original post

4 Replies
KMill10
Valued Contributor II
223 Views

**EDIT ** Added an example unit file.

To permanently stop the existing Edison web page from starting at boot:

1. Log onto your edison using SSH or a serial terminal.

2. Enter the following command:

systemctl disable edison_config.service

systemctl stop edison_config.service

Then create a 'unit' file with all the instructions necessary to start your Flask web server. Lets say you call the unit file "my_web.service" then you would save it in /lib/systemd/system and then run these commands:

systemctl enable my_web.service

systemctl start my_web.service

Now your Flask server will start every time edison boots.

For details on writing a "unit" file see https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_... here.

As an example, here is the unit file that I use to start my can-processor on my Edison:

[Unit]

Description=Daemon to handle mercury CAN Bus Interface.

After=network.target

[Service]

Type=idle

ExecStart=/usr/local/bin/spider_can

Restart=on-failure

[Install]

WantedBy=multi-user.target

idata
Community Manager
222 Views

Hi Mozzie,

 

 

Do you still need assistance with this case?

 

 

-Sergio A

 

HLI35
Novice
222 Views

Sorry for the delay. Temporary not. Thank you very much.

idata
Community Manager
222 Views

You're welcome! Don't hesitate to contact us again if help is needed. We'd be happy to help.

 

 

Regards,

 

-Sergio A

 

Reply