Skylark V1.0 - new Outernet Firmware!

What is the procedure to order a Skylark flashed CHIP board?

I have firm intentions to purchase a Lantern as soon as they are available. Should I wait for the Lantern to become available?

My CHIP just shutdown again after only 5 hours uptime. Does anyone have any ideas?

My CHIP is now randomly shutting down. Sometime in just a few minutes. I’ve tried different power supplies, they seem to be fine. When I bring it back up and log in, everything looks fine, it gets frame lock, everything seems to be running ok, then poof.

@ki4its

Yep that is the idea.

-C

I know in the CHIP ALPHA implementation that you could run “battery.sh” as root and get those details

For those interested the log file that generated the graph above was in python on windows 10.

Here is the code. Adjust the paths in the code to match where you want things.

import sys
import requests
import time

f = open(‘g:\Python2_6_7\log.txt’ , ‘a’)

localtime = time.asctime( time.localtime(time.time()) )

ts = requests.get(‘http://192.168.1.253/DIRECT/getTunerStatus’).json()

f.write("%s , %s , %s\n" %(localtime , ts[‘result’][‘rssi’]+125 ,ts [‘result’][‘snr’]))
f.close()

Then I added a task to windows task scheduler to look like this…

The Run Whenever and Highest privileges are important. And…

Actions, edit the paths to suit your system…

And no one on any forum mentioned that the task will not start correctly until you reboot windows. Wasted an hour on that mess.

Oh and some of you may be asking why I am shifting RSSI up by 125… Well it is just so you can more clearly see the relationship for the Signal strength to the SNR. Also sometimes I think it will go negative vs each other and you can use that to maybe do a bit of fine tuning for noise sources. Anyhow it is just to get them close on the graph. So if you really want the true rssi number sub out 125.

-Cecil

1 Like

FYI from HackADay. Register specs for the CHIP going into the wild.

-Cecil
AA5CE

Randomly under normal(ish) temperatures? Or in the cold wild?

@Kelso

Are you sure it is shutting down and you are not just loosing the link to it? Uptime is reset?

Are you having to do power button hold to reboot, or is it self rebooting?

-C

If you really want to see the status of the tuner from the CHIP command line you can…

wget 127.0.0.1//DIRECT/getTunerStatus
cat getTunerStatus

then parse out the parts you want to a local log file from SSH’ing into the node.

But there is not a real Cron available that I can see… so someone would need to parse the JSON and find a loop point to make the log file.

This should be easier than it is.

-Cecil

It is currently 18°F outside, but it was a lot colder than that last week and it was running just fine. It just shut down again about 15 minutes ago and I brought it inside, I will see if it stays running.
@CRCasey As I said earlier today I still have a red led on the LNA and my routers DHCP table still has a listing for skylark, but I am unable to access it in any way, and there is no power or status led lit. If I hold the power button for a couple seconds it turns on like normal.

@demandzm Sorry I lost/missed that earlier. My bad.

Yeah, that does sound like a hard crash and no auto reboot. No ideas at the moment, other than have you put a clip on ferrite choke between the CHIP and the SDR? Get an usb A/B extension and put 3-4 wraps in the core.

It solved most of my issues. Seems there is a lot of noise on the CHIP.

-C

I will try the choke. Could a usb hub cause a crash? It ran flawlessly for 3 days I cant imagine what could be causing this now. CHIP is receiving approximately 5.06v after power loss of the cable, and peak current draw of 440ma. That is why I was wondering if there was a way I could save the logs so I could hopefully see what it was doing before the crash.

I found a battery script that does get some results. Thanks to @ki4its.

#!/bin/sh
# This program gets the battery info from PMU
# Voltage and current charging/discharging
#
# Nota : temperature can be more than real because of self heating
#######################################################################
# Copyright (c) 2014 by RzBo, Bellesserre, France
#
# Permission is granted to use the source code within this
# file in whole or in part for any use, personal or commercial,
# without restriction or limitation.
#
# No warranties, either explicit or implied, are made as to the
# suitability of this code for any purpose. Use at your own risk.
#######################################################################

# force ADC enable for battery voltage and current
i2cset -y -f 0 0x34 0x82 0xC3

################################
#read Power status register @00h
POWER_STATUS=$(i2cget -y -f 0 0x34 0x00)
#echo $POWER_STATUS

BAT_STATUS=$(($(($POWER_STATUS&0x02))/2))  # divide by 2 is like shifting rigth 1 times
#echo $(($POWER_STATUS&0x02))
echo "BAT_STATUS="$BAT_STATUS
# echo $BAT_STATUS

################################
#read Power OPERATING MODE register @01h
POWER_OP_MODE=$(i2cget -y -f 0 0x34 0x01)
#echo $POWER_OP_MODE

CHARG_IND=$(($(($POWER_OP_MODE&0x40))/64))  # divide by 64 is like shifting rigth 6 times
#echo $(($POWER_OP_MODE&0x40))
echo "CHARG_IND="$CHARG_IND
# echo $CHARG_IND

BAT_EXIST=$(($(($POWER_OP_MODE&0x20))/32))  # divide by 32 is like shifting rigth 5 times
#echo $(($POWER_OP_MODE&0x20))
echo "BAT_EXIST="$BAT_EXIST
# echo $BAT_EXIST

################################
#read Charge control register @33h
CHARGE_CTL=$(i2cget -y -f 0 0x34 0x33)
echo "CHARGE_CTL="$CHARGE_CTL
# echo $CHARGE_CTL


################################
#read Charge control register @34h
CHARGE_CTL2=$(i2cget -y -f 0 0x34 0x34)
echo "CHARGE_CTL2="$CHARGE_CTL2
# echo $CHARGE_CTL2


################################
#read battery voltage	79h, 78h	0 mV -> 000h,	1.1 mV/bit	FFFh -> 4.5045 V
BAT_VOLT_MSB=$(i2cget -y -f 0 0x34 0x78)
BAT_VOLT_LSB=$(i2cget -y -f 0 0x34 0x79)

#echo $BAT_VOLT_MSB $BAT_VOLT_LSB
# bash math -- converts hex to decimal so `bc` won't complain later...
# MSB is 8 bits, LSB is lower 4 bits
BAT_BIN=$(( $(($BAT_VOLT_MSB << 4)) | $(($(($BAT_VOLT_LSB & 0x0F)) )) ))

BAT_VOLT=$(echo "($BAT_BIN*1.1)"|bc)
echo "Battery voltage = "$BAT_VOLT"mV"

###################
#read Battery Discharge Current	7Ch, 7Dh	0 mV -> 000h,	0.5 mA/bit	1FFFh -> 1800 mA
#AXP209 datasheet is wrong, discharge current is in registers 7Ch 7Dh
#13 bits
BAT_IDISCHG_MSB=$(i2cget -y -f 0 0x34 0x7C)
BAT_IDISCHG_LSB=$(i2cget -y -f 0 0x34 0x7D)

#echo $BAT_IDISCHG_MSB $BAT_IDISCHG_LSB

BAT_IDISCHG_BIN=$(( $(($BAT_IDISCHG_MSB << 5)) | $(($(($BAT_IDISCHG_LSB & 0x1F)) )) ))

BAT_IDISCHG=$(echo "($BAT_IDISCHG_BIN*0.5)"|bc)
echo "Battery discharge current = "$BAT_IDISCHG"mA"

###################
#read Battery Charge Current	7Ah, 7Bh	0 mV -> 000h,	0.5 mA/bit	FFFh -> 1800 mA
#AXP209 datasheet is wrong, charge current is in registers 7Ah 7Bh
#(12 bits)
BAT_ICHG_MSB=$(i2cget -y -f 0 0x34 0x7A)
BAT_ICHG_LSB=$(i2cget -y -f 0 0x34 0x7B)

#echo $BAT_ICHG_MSB $BAT_ICHG_LSB

BAT_ICHG_BIN=$(( $(($BAT_ICHG_MSB << 4)) | $(($(($BAT_ICHG_LSB & 0x0F)) )) ))

BAT_ICHG=$(echo "($BAT_ICHG_BIN*0.5)"|bc)
echo "Battery charge current = "$BAT_ICHG"mA"

###################
#read internal temperature 	5eh, 5fh	-144.7c -> 000h,	0.1c/bit	FFFh -> 264.8c
TEMP_MSB=$(i2cget -y -f 0 0x34 0x5e)
TEMP_LSB=$(i2cget -y -f 0 0x34 0x5f)

# bash math -- converts hex to decimal so `bc` won't complain later...
# MSB is 8 bits, LSB is lower 4 bits
TEMP_BIN=$(( $(($TEMP_MSB << 4)) | $(($(($TEMP_LSB & 0x0F)) )) ))

TEMP_C=$(echo "($TEMP_BIN*0.1-144.7)"|bc)
echo "Internal temperature = "$TEMP_C"c"

###################
#read fuel gauge B9h
BAT_GAUGE_HEX=$(i2cget -y -f 0 0x34 0xb9)

# bash math -- converts hex to decimal so `bc` won't complain later...
# MSB is 8 bits, LSB is lower 4 bits
BAT_GAUGE_DEC=$(($BAT_GAUGE_HEX))

echo "Battery gauge = "$BAT_GAUGE_DEC"%"

Ok the problem seems to be my usb hub. However I also noticed that auto boot on power works if I don’t plug anything into the usb port. @Abhishek might be interested in that. Does the sdr run that close to the max power of the usb port?

Hola.

En mi caso me fue imposible en maquinas con AMD, sin embargo en una maquina INTEL todo perfecto, lo reconoce bien, ¿has probado en una maquina con INTEL?

Translation:

Hi.

In my case it was impossible in AMD machines, however in an all-perfect INTEL machine, you recognize it well, have you tried a machine with INTEL?

Thanks for this. I find this kind of data collection and graphical reporting interesting and easier to get a handle on.

The CHIP is located inside so the temperatures are normal-ish. It would power off requiring me to press the power button on the CHIP to start it back up. Half a dozen times yesterday. It was stable all last night, so definitely inconsistent.

I’ve troubleshot different power sources. The only thing I’ve changed was the wifi settings and not leaving a browser open on the UI to reduce load to the CHIP. Not sure if it was crashing or being told to reboot from the SW and the CHIP was requiring me to press the button, or the CHIP itself has a flaky HW issue.

I have had all sorts of temperatures on mine, from -6C to +20C and it has never “stopped” working .
If you interrupt the power it stops and wont restart again till you push the button…
It took me a while to find a USB “charger” that was stable enough for it!
My Samsung 2amp ones would not keep it going… I think that they “test” the current drain by lowering the available current, which may actually be your problem…

It has run for 5 days solid… Currently I am away and it is outside running on mains and I will not get near it until late Friday night,… so I HOPE mine keeps going :slight_smile: (I can “see” it from the interwebs BTW)

(EDIT!!) I may have jinxed myself, as the outenet wifi has disappeared at my place in Winchester now ( A PC that I can operate remotely was connected to it…)
I have no way of knowing if the device is still powered up, and no way of “pressing the button” on it to restart it if there has been a powerspike .
@Abhishek It definitely does not boot by itself when powered up :frowning: .
Assuming it needs to be restarted, I will not see it again until late Friday night… that didn’t last long :frowning:

Wifi hostapd.conf bug on skylark V1.0, CHIP
First of all thanks for the nice work already done, love the project.
When trying to modify the wifi channel & country using the network GUI, I clicked apply and reboot.
After reboot no ‘outernet’ wifi signal was found.
/var/log/messages showed an entry 'hostapd can’t be started’
After looking into /etc/hostap.conf noticed that ssid, channel and country entries were on a different location in the conf file than before (below iso in the middle).
I modified the file to put ssid & channel back in the mid portion of the config file, dumped the country entry and rebooted… and…voila… outernet wifi signal came back up.
I guess network GUI app messes up the hostapd.conf file in a way that hostapd doesn’t like. I suggest to call it a bug :innocent:
(Also on the wifi topic, I noticed when monitoring the wifi, the wifi signal tends to drop to zero from time to time, changing to a RPI power supply increased the frequency of this behavior… if I have some time, I’ll take a look at this behavior :confused:)