Skylark V1.0 - new Outernet Firmware!

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:)

regarding the wifi signal dropping to zero. Wireshark shows that it is re-“arping” when it gets in this state. It appears the arp table is getting purged sporadically. The only way I have been able to combat this behavior is to run a constant ping in the background to the outernet CHIP. Keeping the arp table populated with the route.

EDIT:
wifi signal dropping to zero would obviously cause the arp table of the host computer to show arp’s. ironically the pings in my situation has stopped “this” from happening. Does not make complete sense.

@Abhishek, the new rxOS for CHIP Version 4.2 flashed fine, and is working as it should with SNRs above 6 db on Americas 98 here at 39 deg N lat. I was wondering if there is a way for me to add an app to the top line collection to launch my Rachel Program files?

I have the full 32 GB Rachel Data Base on my USB stick (as @wsombeck) does on his rxOS 3.1, and would like a quick launch capability. I can launch it fine from within the File Manager, but it takes several steps.

Ken

this sounds like some wifi power management/saving functionality kicking in…

@kenbarbi

Hay Ken this is a simple hack, there may be better.

What you do is SSH into your Skylark. Then cd over to /mnt/downloads.

You are going to create a symlink here to the index file of your RACHEL data.

sudo ln -s “full path to rachel” Rachel.html

Replace the quoted part with the mount point of your stick.

You should end up with something like…

sudo ln -s /mnt/stick/Rachel/index.html Rachel.html

This created the link now you can log back out and go into the outernet desktop,

Once there right click the desktop and select show icons from the context menu.

All the folders will show up across the top of the desktop and your symlink to Rachel will be at the end.

Good Luck!

-Cecil
AA5CE

1 Like

Wow - - thank you Cecil, I’m going to try that. I’ll let you know how it works.

By the way (as you’ll see from, my next post), the Alpha Lantern that @Syed sent me has failed after 2 days. Separate issue thou, but we’ll need to figure that problem out as the system I have that failed was specially put together to replace my defective CHIP. Ken

OK guys - - whats happening. The Alpha Lantern replacement you sent (which I presume you verified as being good to go) has failed.

After 3 days, it powered off. My USB wall wart has show a continuous draw of 4 ac watts both powered up and in the failed off mode. Sounds familiar - - doesn’t it.

Any way, I pushed the CHIP restart button and started it up again successfully. I have to think there are some sort of power issues.

My house power has been continuous (no power glitches as my telephone answering machine would default if that happened) at 118 vac, and my temperatures here in Annapolis have hovered between 15 - 25 deg F. What do you think I should look for? Ken