This works:
from subprocess import call
call('reboot')
This works:
from subprocess import call
call('reboot')
If i'm right here is the answer.
Check what I wrote here:
https://community.onion.io/topic/3591/python3-modules-for-gpio-and-serial-port/2
@Pablo-Fonovich
if you use SSH and do opkg you will see the available commands.
then do opkg list (it displays all available, quite long list)
or simpler: opkg list | grep pyth (to limit and show only the part of the list that has 'pyth' in the text.
You will then see python and also python3 stuff.
I think that you have to use opkg install python3-light or python3 (i you want all)
then you need
then opkg install pyOnionGpio
I think it should be ok then.
Personnally i used also pyserial BUT:
I wanted only python3-light to limit the space used.
Then i used opkg install python-pyserial
BUT it installs python-base then python-light (based on python 2.7) then python-pyserial
but when my python script does import 'serial', it fails.
So finally i removed python3 and let python 2.7
I don't know how to use python3 and make it point to serial although pyserial is said to work with python3.
i have the same err message.
Also when i used dmesg i saw a lot of "warp core" logo and so on, (up to me it's the wifi driver restarting but not sure) , closely linked to a wifi hang and ssh link cut.
i followed what is said here https://community.onion.io/topic/3561/error-cntlenqueueforrecv-blockack-request-frame-length-size-44-incorrect/6
It did ok until "fsck.fat /dev/mmcblk0p1" that fail because there is no "mmcblk0p1" file.
But up to now no more "warp core" message nor ssh link loss.
But i stil have some "ERROR!!! CntlEnqueueForRecv: BlockAck Request frame length size = 44 incorrect" message sometimes.
i noticed i have this:
br-wlan: port 1(ra0) entered disabled state
due to...?
EDIT> finally i used factory revert and re installed all my stuff. Now it's clean.
No restart of wifi nor SSH cut since yesterday.
Hello,
it looks like i have the same problem.
Can you please explain the steps you did in order to solve the problem ?
That would be very helpful.
Thanks
Yann
isn't it the same behaviour than mine ?
See the post below and particularly mine from today June 3.
https://community.onion.io/topic/2073/wifi-disconnect/13
maybe you have same pb than me.
Not yet a solution but searching.
Köszönöm.
As i am a bit paranoid i modified some fields . I made some mistakes. That is why you can notice differences like c2c0 / c2c0.
Regarding eth0 i compared your result to "cat /etc/config/network" with mine.
The only difference is:
"config interface 'wan'
option ifname 'eth0.2' => here you have eth0
option proto 'dhcp'
"
Do you know what this " .2 " means ?
edit> i think i found the origin: the box has a lease time of 86400s (24h).
So i think that when it changes the lease the clients (like the onion e.g.) must do something to reconnect and actually do not.
where is this process buried... no idea.
Any specialist around ?
hello,
ping gives nothing as omega is not connected to the box. Nor does tracert, obviously.
My config below.
Looks like if i reboot the internet box omega does not reconnect back to the network automatically , un less i reboot it or take a manual action.
I believe there is a deamon that takes care of reconnecting when the wifi network disappears. How to check its status/output ?
Config:
i use: omega 2+, hw: 0.1.10, sw: b160
internet box |<== wifi link ==> Omega (192.168.0.12)
|
| <== wifi link ==> windows pc (..0.15)
root@Omega-4BC1:~# uci show wireless
wireless.ra0=wifi-device
wireless.ra0.type='ralink'
wireless.ra0.mode='9'
wireless.ra0.channel='auto'
wireless.ra0.txpower='100'
wireless.ra0.ht='20'
wireless.ra0.country='US'
wireless.ra0.disabled='0'
wireless.@wifi-iface[0]=wifi-iface
wireless.@wifi-iface[0].device='ra0'
wireless.@wifi-iface[0].network='wlan'
wireless.@wifi-iface[0].mode='ap'
wireless.@wifi-iface[0].encryption='psk2'
wireless.@wifi-iface[0].key='33333333'
wireless.@wifi-iface[0].ApCliAuthMode='WPA2PSK'
wireless.@wifi-iface[0].ApCliEncrypType='AES'
wireless.@wifi-iface[0].ApCliSsid='SFR-c3c0'
wireless.@wifi-iface[0].ApCliPassWord='blablablabla'
wireless.@wifi-iface[0].ssid='Omega-4BD1'
wireless.@wifi-iface[0].ApCliEnable='1'
wireless.@wifi-config[0]=wifi-config
wireless.@wifi-config[0].ssid='SFR-c3c0'
wireless.@wifi-config[0].encryption='WPA2PSK'
wireless.@wifi-config[0].key='blablablabla'
root@Omega-4BC1:~# uci show network
network.loopback=interface
network.loopback.ifname='lo'
network.loopback.proto='static'
network.loopback.ipaddr='127.0.0.1'
network.loopback.netmask='255.0.0.0'
network.globals=globals
network.globals.ula_prefix='ffff:ffff:ffff::/48'
network.wlan=interface
network.wlan.type='bridge'
network.wlan.ifname='eth0.1'
network.wlan.proto='static'
network.wlan.ipaddr='192.168.3.1'
network.wlan.netmask='255.255.255.0'
network.wlan.ip6assign='60'
network.wan=interface
network.wan.ifname='eth0.2'
network.wan.proto='dhcp'
network.wwan=interface
network.wwan.ifname='apcli0'
network.wwan.proto='dhcp'
root@Omega-4BC1:~# wifisetup list
{
"results": [
{
"ssid": "SFR-c2c0",
"encryption": "WPA2PSK",
"password": "blablablabla"
}
]
}
root@Omega-4BC1:~# cat /etc/config/wireless
config wifi-device 'ra0'
option type 'ralink'
option mode '9'
option channel 'auto'
option txpower '100'
option ht '20'
option country 'US'
option disabled '0'
config wifi-iface
option device 'ra0'
option network 'wlan'
option mode 'ap'
option encryption 'psk2'
option key '333333333'
option ApCliAuthMode 'WPA2PSK'
option ApCliEncrypType 'AES'
option ApCliSsid 'SFR-c3c0'
option ApCliPassWord 'BLABLABLABLA'
option ssid 'Omega-4BC1'
option ApCliEnable '1'
config wifi-config
option ssid 'SFR-c2c0'
option encryption 'WPA2PSK'
option key 'BLABLABLABLA
Hello,
i'm in trouble with wifi.
i use omega2+
I have setup access point also.
My Omega connects to my internet box using WPA2.
But after some time it loses the connexion and does not reconnect automatically.
Then the only way to connect to the omega is using the access point address provided by the omega. pc connects to it and then i can use ssh to get to 192.168.3.1 .
I do not know if it is due to the box or to the omega but i would like to investigate. I will use SSH.
By the same time a Raspberry Pi is connect to the same box and does not feature this problem.
What linux commands could i use to get info of the status the omega is when it is disconnected and does not recover.
Generally: what is the system used to reconnect when a connexion drops (due to disturbance or whatever) and the omega reconnects ?(so i can check if it is working properly) What process is involved etc.
Thanks for your help