[HowTo] [updated] Install the WIO Server on Raspberry Pi 3

Simplify IoT Development.

Moderators: violet, yexiaobo, seth.welday

User avatar
uwe.fetzer
Pre-kindergarten
Pre-kindergarten
Posts: 36
Joined: Sun Apr 17, 2016 6:06 am
Location: Neuss, Germany
Contact:

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by uwe.fetzer » Sat Apr 30, 2016 7:17 pm

Seems you node is really not connected to the server ("online" : false).
Please try to delete the node:

Code: Select all

POST http://[your IP]:8080/v1/nodes/delete?access_token=[you access toke]&node_sn=[the serial number of the node, see last response]
In the App logout your user. Change the custom IP address to the none SSL type ("http://[your IP]:8080") and login again.
Try to register the node again.

kai.timofejew
Pre-kindergarten
Pre-kindergarten
Posts: 5
Joined: Fri Apr 15, 2016 11:01 pm

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by kai.timofejew » Sat Apr 30, 2016 8:09 pm

That works.

So my taks will be to solve the SSL issue.

philip.mallon
Pre-kindergarten
Pre-kindergarten
Posts: 34
Joined: Fri Oct 31, 2014 12:32 pm
Contact:

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by philip.mallon » Sun May 01, 2016 9:54 am

Hello uwe.fetzer, under Configure SSL when you say "Make sure, that you enter your (local) domain name at “Common name (FQDN), for example “*.se38.local” " where do you get your (local) domain name? Do you need a real FQDN? My server on a BBB is just local and only has an IP address with a local name. Everything I did will be at home and behind a firewall so I dont understand this step. Also you do not mention Steps 2.4 to 2.6.

I have a problem with 2.4 The command "supervisor" is to run the server at startup with the config file esp8266_server.conf. This file refers to " directory=/root/esp8266_iot_node/"
& "command=python /root/esp8266_iot_node/server.py". In the whole process up to this stage this directory was never created. Using ubuntu command find / -name "esp8266*" -type d, the only files containing "esp8266*". These are:
/opt/xtensa-lx106-elf/bin/Wio_Link/esp8266_arduino
/opt/xtensa-lx106-elf/bin/Wio_Link/esp8266_sdk
/usr/local/bin/Wio_Link/esp8266_arduino
/usr/local/bin/Wio_Link/esp8266_sdk

There is no directory at /root/esp8266_iot_node/. What is the correct directory? The command
"sudo supervisorctl start esp8266" fails.

Did you include the step, "2.6 Block 8080 port"? I can not get the command "supervisorctl restart esp8266" to work.
Thanks
Philip

User avatar
uwe.fetzer
Pre-kindergarten
Pre-kindergarten
Posts: 36
Joined: Sun Apr 17, 2016 6:06 am
Location: Neuss, Germany
Contact:

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by uwe.fetzer » Sun May 01, 2016 5:47 pm

Hello Philip,

some development environments check the requested URL against the FQDN in the certificate. In this case you will get an error message, if you just call the server via IP address. Just enter a domain name of your choice into the /etc/hosts (or \Windows\System32\drivers\etc\hosts on a Windows machine) of your client machine where you want to call the server.
Also you do not mention Steps 2.4 to 2.6.
Because you don't need these steps if you follow my solution. The server starts automatically because of the last step (the entry in file /etc/rc.local)

Hope this helps
Uwe

philip.mallon
Pre-kindergarten
Pre-kindergarten
Posts: 34
Joined: Fri Oct 31, 2014 12:32 pm
Contact:

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by philip.mallon » Mon May 02, 2016 10:49 am

Hello Uwe, thanks for you help. I was able to progress one extra step and I think I am nearly there! Local server is working and was able to connect wiolink computer to it. I was able to assemble hardware on the WioLink ports and accessed the APIs. Only problem was it did not Update and deliver the firmware to the WioLink computer but gave me an error message on both the server and the Android app.
On the server:
I 160502 12:24:47 handlers:555] get current node, id: 100, name: Wio05
rm -f *.elf *.hex *.d *.o *.a *.dump *.S
[E 160502 12:24:48 handlers:1332] /opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: 1: /opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: Syntax error: Unterminated quoted string

[I 160502 12:24:48 handlers:1459] +++send ota state to app:('error', '/opt/xtens a-lx106-elf/bin/xtensa-lx106-elf-g++: 1: /opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: Syntax error: Unterminated quoted string\n')

I also got another previous error that related to "xtensa-lx106-elf/bin/xtensa-lx106-elf-g++":
1) in executing python ./build_firmware.py I get the error message:
/opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: 1: /opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: Syntax error: Unterminated quoted string
make: *** [Main.cpp.o] Error 2
/opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: 1: /opt/xtensa-lx106-elf/bin/xtensa-lx106-elf-g++: Syntax error: Unterminated quoted string"


Did you come across this problem? How are you using your system? Are you using the "International" server for creating APIs and serving them locally? Thanks again

User avatar
uwe.fetzer
Pre-kindergarten
Pre-kindergarten
Posts: 36
Joined: Sun Apr 17, 2016 6:06 am
Location: Neuss, Germany
Contact:

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by uwe.fetzer » Wed May 04, 2016 6:14 pm

Hi Philip,
sorry for beeing late, was on a business trip the last days.
And to answer your question: no, I haven't got these error messages yet.

Maybe you should test, whether the server, the grove drivers or the Android App got updates in the meantime.
Also check, whether you've selected the correct file:

Code: Select all

sudo wget http://arduino.esp8266.com/linuxarm-xtensa-lx106-elf-g46f160f.tar.gz
It has to be the ARM file for the Raspi.

philip.mallon
Pre-kindergarten
Pre-kindergarten
Posts: 34
Joined: Fri Oct 31, 2014 12:32 pm
Contact:

Re: [HowTo] Install the WIO Server on Raspberry Pi 3

Post by philip.mallon » Thu May 05, 2016 8:02 am

Hello uwe, thanks very much for your help. Your advice was spot on. Although I am using a BBG it is also ARM based and the file you quoted was the one I needed. After re-compiling and connecting everything works locally. That is fantastic and your help was the key. Interestingly the support from the official WioLink release seems to be incorrect, confusing and complex. It needs to be re-written. What is interesting is that there is a lack of response from the original author of "Server Deployment Guide" https://github.com/Seeed-Studio/Wio_Lin ... ment-Guide. I initially posted these issues on a separate post little response. This is disappointing. You departed from this procedure and I am interesting how you discovering the correct process and the correct files. Thanks again and now I can move on

Regards
Philip

User avatar
uwe.fetzer
Pre-kindergarten
Pre-kindergarten
Posts: 36
Joined: Sun Apr 17, 2016 6:06 am
Location: Neuss, Germany
Contact:

Re: [HowTo] [updated] Install the WIO Server on Raspberry Pi

Post by uwe.fetzer » Fri May 06, 2016 6:04 pm

Instructions updated due to a compile error (see last chapter). Maybe the Wio/Grove team have a look at this issue...

r_sangsari
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Jun 14, 2016 8:07 pm

Re: [HowTo] [updated] Install the WIO Server on Raspberry Pi

Post by r_sangsari » Tue Jun 14, 2016 8:12 pm

Thanks uwe.fetzer,
Is this method compatible with Raspberry Pi 2 ?
What is the lean_server.py files ?

User avatar
uwe.fetzer
Pre-kindergarten
Pre-kindergarten
Posts: 36
Joined: Sun Apr 17, 2016 6:06 am
Location: Neuss, Germany
Contact:

Re: [HowTo] [updated] Install the WIO Server on Raspberry Pi

Post by uwe.fetzer » Tue Jun 14, 2016 8:29 pm

It also should work on the Raspi2 because it's also an ARM processor. Just try it out.
(and forget about the lean_server.py, you don't need it with this solution)

Post Reply