Page 2 of 3

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

Posted: Sat Apr 30, 2016 7:17 pm
by uwe.fetzer
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.

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

Posted: Sat Apr 30, 2016 8:09 pm
by kai.timofejew
That works.

So my taks will be to solve the SSL issue.

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

Posted: Sun May 01, 2016 9:54 am
by philip.mallon
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

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

Posted: Sun May 01, 2016 5:47 pm
by uwe.fetzer
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

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

Posted: Mon May 02, 2016 10:49 am
by philip.mallon
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

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

Posted: Wed May 04, 2016 6:14 pm
by uwe.fetzer
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.

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

Posted: Thu May 05, 2016 8:02 am
by philip.mallon
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

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

Posted: Fri May 06, 2016 6:04 pm
by uwe.fetzer
Instructions updated due to a compile error (see last chapter). Maybe the Wio/Grove team have a look at this issue...

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

Posted: Tue Jun 14, 2016 8:12 pm
by r_sangsari
Thanks uwe.fetzer,
Is this method compatible with Raspberry Pi 2 ?
What is the lean_server.py files ?

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

Posted: Tue Jun 14, 2016 8:29 pm
by uwe.fetzer
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)