If you reflow the Omega 2S+ off the board and hook the GND, D+, D- up to a computer are you able to see the BG95 then? It just makes sense to check the hardware out and ensure the BG95 is up and doing what you expect before trying to chase down issues on the Omeag2S+
Posts made by Jeff Seese
-
RE: Omega2S+ USB driver for Quectel BG95-M4
-
RE: Momentary Switch Circuit for Omega2
I you are using 3.3v then the schematic I sent you will work if you leave out R2.
-
RE: Momentary Switch Circuit for Omega2
So, I don't think that circuit is going to do what you want.
I see you have a voltage divider comprised of 51K and 5.1k.
What will happen is the higher GPIO input resistance makes it possible for much higher then 3.3v to be present at the GPIO pin, especially when no current is flowing.
What you want to do is create a voltage divider to ground configured in such a way that the voltage to the pin will never exceed 3.3v, but really anything over 2.8v is good enough.
Something more like this drawing.
Also, take care with the pins you hook up to, many of the GPIO need to be left floating at boot.
It might make more sense to use a MCP23008 DIO expander to monitor the inputs instead of direct to the Onion.
-
RE: Can no longer boot from external storage after update to OpenWRT18
Just to verify you are able to reboot after these steps and see a larger overlay with df -h?
What is the command you are using to try and set up you swap file?
-
RE: Can no longer boot from external storage after update to OpenWRT18
I have several Omega2S+ on OpenWRT 18, Omegea-ware 0.3.2 b218 booting from external storage using exactly this set of commands.
opkg update opkg install kmod-usb-storage-extras e2fsprogs kmod-fs-ext4 block-mount umount /tmp/mounts/SD-P1 echo -e "y" | (mkfs.ext4 /dev/mmcblk0p1) mkdir /mnt/mmcblk0p1 mount /dev/mmcblk0p1 /mnt/mmcblk0p1 block detect > /etc/config/fstab uci set fstab.@mount[0].target=/overlay uci set fstab.@mount[0].enabled=1 uci commit mount /dev/mmcblk0p1 /mnt/ ; tar -C /overlay -cvf - . | tar -C /mnt/ -xf - ; umount /mnt/
then
reboot now & exit
log back in and check
df -h.
-
RE: OpenWRT 18.06 & Nodejs installing onoff node module [ solved ]
Oh one thing I forgot to mention, after I got all this working I was able to tar the node_modules directory up and move it to an Omega2S+ with no SD card.
After updating it to OpenWRT18, the nodejs install is small enough no external boot is necessary and there is no need for NPM on the production boards since they will never install a package. So that is nice to be able to eliminate the SD card.
-
OpenWRT 18.06 & Nodejs installing onoff node module [ solved ]
After upgrading to the latest OpenWRT per this blog post OpenWRT 18 available for omega2 & omega2+ I had some issues getting past working nodejs apps to work.
The root cause was the old onoff-node located at /usr/bin/onoff-node is no longer available via opkg install onoff-node. It is now possible to use the standard onoff module via npm.
However, to get there is a combination of several steps so I am going to explain the steps I went through to get it to work.
In short, make and gcc need to be installed so that npm can compile the onoff module. To be able to do that it's necessary to point opkg to the OpenWRT LEDE repos so they can be installed via opkg.
To compile onoff the omega will run out of ram so it's necessary to enable a swap file.
The Omega2S+ that I was working on didn't have enough room for python, nodejs and npm so I used an external SD card.
- upgrade to the latest OS. OpenWRT 18 available for omega2 & omega2+
oupgrade --latest
After this finishes and you log back in you should see something like this.
Ω-ware: 0.3.2 b218
- boot from the SD card. Booting from external storage
opkg update opkg install kmod-usb-storage-extras e2fsprogs kmod-fs-ext4 block-mount umount /tmp/mounts/SD-P1 echo -e "y" | (mkfs.ext4 /dev/mmcblk0p1) mkdir /mnt/mmcblk0p1 mount /dev/mmcblk0p1 /mnt/mmcblk0p1 block detect > /etc/config/fstab uci set fstab.@mount[0].target=/overlay uci set fstab.@mount[0].enabled=1 uci commit mount /dev/mmcblk0p1 /mnt/ ; tar -C /overlay -cvf - . | tar -C /mnt/ -xf - ; umount /mnt/
now reboot, and log back in. You should see a large overlay in your df -h output, something like this for an 8G SD carrd.
df -h overlayfs:/overlay 7.2G 480.8M 6.4G 7% /
- Create a swap file and activate it. Extending Omegas Available Memory
opkg update; opkg install swap-utils
Make a swap file, I made min in my root directory since I now have additional space by mounting the SD card.
dd if=/dev/zero of=/root/swap.page bs=1M count=256
Turn on the swap file
swapon /tmp/mounts/USB-A1/swap.page
I didn't permanently mount mine I only need the swap file for this instance. To check the swap file sue the free command.
free total used free shared buffers cached Mem: 124920 71360 53560 8 6888 40624 -/+ buffers/cache: 23848 101072 Swap: 262140 2560 259580
You should see the Swap: line
- Install python, nodejs, npm.
opkg install python nodejs node-npm
- install node-gyp https://docs.onion.io/omega2-docs/node-red-article.html#
node --max_old_space_size=512 $(which npm) install -g node-gyp
- Switch back to LEDE packages so that make and gcc can be installed. https://docs.onion.io/omega2-docs/using-opkg.html#using-opkg-switch-to-lede-repos
This is what my /etc/opkg/distfeeds.conf ended up looking like.
src/gz openwrt_core http://downloads.openwrt.org/releases/18.06-SNAPSHOT/targets/ramips/mt76x8/packages src/gz openwrt_base http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/base src/gz openwrt_luci http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/luci src/gz openwrt_onion http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/onion src/gz openwrt_packages http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/packages src/gz openwrt_routing http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/routing src/gz openwrt_telephony http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/telephony src/gz omega2_core http://repo.onioniot.com/omega2/packages/core src/gz omega2_base http://repo.onioniot.com/omega2/packages/base src/gz omega2_packages http://repo.onioniot.com/omega2/packages/packages src/gz omega2_routing http://repo.onioniot.com/omega2/packages/routing src/gz omega2_onion http://repo.onioniot.com/omega2/packages/onion
basically I just uncommitted everything.
- Install make and gcc https://docs.onion.io/omega2-docs/node-red-article.html#
opkg update opkg install make gcc ar -rc /usr/lib/libpthread.a
Go get a cup of coffee, this will take a few minutes.
- Finally ready to install npm onoff This will take a few minutes.
node --max_old_space_size=512 $(which npm) install onoff
That's it. You should see onoff in your node_modules directory now.
I verified that it works with a quick test .js to toggle a GPIO.
-
RE: NodeJS version 6+ ?
Is there a solution for OpenWRT 18.06, and onoff-node?
Version: Ω-ware: 0.3.2 b218
After upgrading this no longer works.
opkg install onoff-node Unknown package 'onoff-node'. Collected errors: * opkg_install_cmd: Cannot install package onoff-node.
I figured it out. onoff-node is gone now that npm onoff is available. Here are steps I went through to get it working. OpenWRT 18.06 & Nodejs installing onoff node module [ solved ]
-
RE: Omega2 as a LoRaWAN node
Thanks for all you guys do to constantly keep the Omega development moving forward.
This is pretty cool. I know this is a bit off topic but if a developer wanted to use python/spi-dev, would the Omega2 be able to correctly read the SX1276 config registers with out any data errors?
Is this project using hspi or bit-bang spi?
-
Omega2S Reset Pin C21 shutdown instead of reset
I am having a problem with the Omega2S/Omega2S+ Reset pin C21.
Per the documentation C21 is the power on reset.
My boards have a 10k Pullup on that pin with a momentary pushbutton to ground.
Grounding C21 does cause the Omega2S to shut down, but it does not boot back up with out a power cycle.
The desired functionality is a full reset of the Omega2S with out a power cycle.
Does anybody else have similar results or a real hard reset solution?
-
RE: I2C Detect Slave Method?
In case any body else is looking for this.
If for example you wanted two I2C busses, you would do that like this.
Example: using GPIO 14 for the second SDA and GPIO 16 for the 2nd SCL
insmod i2c-gpio-custom bus0=1,5,4 bus1=2,14,16
and you can then verify them with
i2cdetect -y 1
and
i2cdetect -y 2
-
RE: Disable Omega 2+ i2c so that arduino dock can be i2c master
If you are trying to convert the Omega2 I2C pins back to standard GPIO there are instructions in the docs.
Specifically if you are trying to return the I2C SDA/SCL pins from default configuration as I2C back to standard GPIO use this command.
omega2-ctrl gpiomux set i2c gpio
and then configure them for desired GPIO function as you would any other GPIO.
-
RE: how to designate a private key file is to be used?
So here is how you do it.
I am assuming that you have your key stored at /root/.ssh/id_rsa with proper chmod 600 permissions.
make sure you have installed these as well.
opkg install git-http opkg install ca-bundle
then do this, to configure git to use your key.
git config core.sshCommand 'ssh -i /root/.ssh/id_rsa'
that should do it.
-
RE: Zero-Touch Provisioning on Boot
I have a jig that I use to set up a few hundred Omega2+ with.
Everything you do from the Onion html setup page from upgrading the omega firmware to resetting it via firstboot -y etc can be automated from the command line.
The jig is a custom PCB I have designed that has an ethernet port and built in FTDI for the Omega Serial Port 0.
You could accomplish the same thing using the Omega2+ expansion doc that has the CP2102 on it.
https://onion.io/store/expansion-dock/
Star by plugging in an out of the box Omega into the programmer PCB.
Connecting through S0 which allows a direct connection to the Omega2+ with out needing to join it's adhoc wifi AP or provide login credentials.
The programming jig is connected to a Raspberry pi via USB cable.
A NodeJS script on the Pi connects using the serialport library and sends commands direct to the Omega2+.
The same thing could be accomplished using expect on the Pi instead of NodeJS it's really just what you are comfortable with. I have a web interface to the programmer so NodeJS made more sense.
The script first logs on by sending a new line and waiting for the bash prompt.
Once the Omega2+ boot process is complete and the script has received the bash prompt the script executes a series of setup commands.
One of the fist commands it does is to change the network interface ETH0 over to DHCP so that it can be used to download any repo files needed.
If you are using the expansion doc you would need to configure a WiFi connection from the command line, I do that through the uci utility.
Here is a very high level summary of how to do that with uci.
View the wireless settings.
uci show wireless
Change a setting by doing something like this.
uci set wireless.@wifi-config[0].ssid='YOURSSIDHERE' ... other wifi settings uci set wireless.@wifi-config[0].key='WIFIPASSWHERE'
Then you have to restart the network with
/etc/init.d/network restart
The script installs git and then downloads custom code from my repo.
git eats up a log of space. You could also just use wget to download source files directly to your Omega if space is an issue.
When it's all done the Pi does a few function tests on the Omega2+ and then toggles a buzzer on the programmer PCB to indicate the process is complete.
Here is a peek at what the web interface to the programmer looks like.
-
RE: Help getting Ethernet configuration correct [resolved]
It is a straight through connection.
-
RE: How use serial port0 on Omega 2 plus
Before you turned off the Kernel Echo did you get boot messages on ttyS0?
What happens if you do this from your Omega
echo "test" >> /dev/ttyS0
Do you have any kind of logic analyzer or like this https://www.saleae.com/ that you can put on the Omega RX/TX lines?
-
Nodejs Error "SerialPort is not a function...." with node-serialport-omega2
Re: Serial port communication using Node.js
@Steven-de-Salas Hello I am having some trouble getting the node-serialport-omega2 module to function.
To isolate the problem I have factory reset my Omega and only installed Nodejs and NPM.
I downloaded the node_modules from the above link
https://github.com/sdesalas/robotics/raw/master/omega2/node-serialport-v3.0.0.tar.gz
and SCP'd those files to the Omega.
Then checked it with npm ls, which reports several missing dependencies. I installed all depenencies until npm ls reports no errors ( Except for a version conflict with debug, however the error states that the serialport module will still load. )
I have a very minimal script.
var SerialPort = require('serialport'); var port = new SerialPort('/dev/ttyS0', { parser: SerialPort.parsers.readline('\n'), baudRate: 115200 });
when I run the script I get the following error.
var port = new SerialPort('/dev/ttyS0', ^ TypeError: SerialPort is not a function
If it will be of interest or help I can post my full npm ls here.
Thank you in advance for your help.
-
RE: [Resolved] Bricked Omega2: No IP address and no working serial
I think you have a few options.
-
Have you gotten screen working with your Omega2 already? If not, I would start with your setup there.
Be sure to use 115200 baud rate.
Ensure your RXin of FTDI is going to TXout of Omega, and visa versa.
Make sure you are using a 3.3v FTDI. If your FTDI has RX/TX LEDs on it then verify while you are in screen mode that pressing enter will flicker the TX LED on your FTDI.
Loop your FTDI TX into your FTDI RX and ensure characters typed are echoed in your screen.
The Expansion doc has series 1K resistors in the serial portion of the RX/TX lines between the CP2102 (USB to Serial adaptor) and the Omega.
After you startup screen have you tried a power cycle of the Omega you should get kernal/boot data. -
If all else fails the power doc has the factory reset button, per docs
https://docs.onion.io/omega2-docs/factory-reset.html
-
-
RE: Changing omega's name
From the command line, you can read the host name with
uci show system.@system[0].hostname
You can change the hostname with
uci set system.@system[0].hostname=your-host-name
Then restart the avahi if you are using the .local domain
/etc/init.d/avahi-daemon restart
Or just a reboot will come up with your new host name too.
reboot now
-
RE: Micro SD Card interface
Something like this might be an option to relocate the micro SD card slot