How can I update the firmware of my Gravio USB Zigbee IoT Dongle? - usb

How can I update the firmware of my gravio.com IoT USB dongle on a macOS?

On macOS, the easiest is to use the HubKit firmwareupdate binary you can find in the /Applications/Gravio\ HubKit.app/Contents/Resources/gssosx/ folder.
Ensure that Gravio HubKit is not running
Plugin the USB dongle
List all devices using ls -l | grep cu which will give you the identifier of the USB dongle
Use the command sudo ./zigbeefirmwareupdate -f /path/to/firmware/file.bin -d /dev/cu.usbserial-Dxxxx
Wait for approximately 5 minutes for the program to finish

Related

Raspberry Pi is not able to subscribe to ros topic published from base PC but vice-verse is working?

I am using the ubiquityrobotics Raspberry Pi image for the RPi 3B+, which is Ubuntu Xenial and ROS Kinetic. My base computer is running Ubuntu 18.04 and has ROS Melodic installed.
I created subo_base workspace in the base PC and subo_rpi workspace in the RPi (assessing the RPi via ssh).
Then I created a package in both the base PC and RPi and added the Publisher and Subscriber (http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber%28python%29) files in each of the packages.
When I run the publisher from the RPi, the base PC is able to subscribe but when I publish from the base PC, the RPi does not show any output and remains stuck (even though the Topic is visible on RPi using rostopic list).
Base PC is able to subscribe to RPi
RPi unable to subscribe to topic from PC
Some of the code is used in base PC
aakash#aakash:~$ mkdir -p ~/subo_base/src
aakash#aakash:~$ cd ~/subo_base/
aakash#aakash:~/subo_base$ catkin_make
aakash#aakash:~/subo_base$ source devel/setup.bash
aakash#aakash:~/subo_base$ echo $ROS_PACKAGE_PATH
aakash#aakash:~/subo_base$ cd ~/subo_base/src/
aakash#aakash:~/subo_base/src$ catkin_create_pkg motion_plan std_msgs rospy roscpp
To connect to RPi
aakash#aakash:~/subo_base/src/motion_plan/scripts$ export ROS_MASTER_URI=http://ubiquityrobot.local:11311
aakash#aakash:~/subo_base/src/motion_plan/scripts$ export ROS_IP='hostname -I'
Further, I am able to transfer files from and to the base PC via ssh scp so I guess netwkr might not be the issue?
The issue is most likely the hostname resolution and/or ROS network variable configuration.
I dislike using the hostname in the variables, so I will give the examples using just IPs.
Also the 'hostname -I' is definitely not suitable for setting your ROS_IP variable in all cases. So that might also be one source of your problem.
From hostname man page
-I, --all-ip-addresses>
Display all network addresses of the host. This option enumerates all configured addresses on all network interfaces. The loop‐back interface and IPv6 link-local addresses are omitted. Contrary to option -i, this option does not depend on name resolution. Do not make any assumptions about the order of
the output.
You will want to use whatever specific ip address you need, so just use that or find a better way to determine which ip to set. echo $ROS_IP or printenv | grep ROS will tell you what your variables are currently set to so you can verify it is set correctly.
For minimal proof that things are working you could try the following:
Lets say your RPi ip is 192.168.0.2 and PC ip is 192.168.0.3
You will need to decide which machine will be the master, for this example I will assume the PC will be the master.
In a terminal on the PC run the following commands:
roscore
in a different terminal run (this is used instead of the subscriber/publisher node to test if things work)
rostopic pub /test/topic std_msgs/String 'Hello World from PC' -r 1
Now on the SSH terminal on the RPi run:
export ROS_MASTER_URI=http://192.168.0.3:11311 && export ROS_IP=192.168.0.2
now you should be able to echo the topic published on the PC from the SSH window.
rostopic echo /test/topic
ctrl+c out of the echo and you can try publishing some message on the RPi like:
rostopic pub /test2/topic std_msgs/String 'Hello World from RPi' -r 1
Now open a new terminal on the PC and try to echo the topic from RPi, any terminal sourced with the ROS installspace, usually source /opt/ros/kinetic/setup.bash, should work:
rostopic echo /test2/topic
ROS wiki page on running ROS on multiple machines
ROS answer regarding setting up multiple machines
ROS1
Machine1 [MASTER]:
Will run roscore, but don't run it yet till configurations are done.
Has an IP of 192.168.1.10.
1- Run the following in the terminal:
1.1- export ROS_MASTER_URI=http://192.168.1.10:11311.
1.2- export ROS_IP=192.168.1.10.
2- Now, run roscore.
Machine2 [SLAVE]
Will NOT run roscore.
Has and IP 192.168.1.15.
1- Run the following in the terminal:
1.1- export ROS_MASTER_URI=http://192.168.1.10:11311.
1.2- export ROS_IP=192.168.1.15.
2- Now, you are connected to the Master.
ROS2
ROS2 will populate the information on the LAN out of the box without any configuration.

Boot firmware on router from RAM without flashing?

I have this router DIR 605L and I would like to test some firmwares that I have but without actually flashing device. Basicly Im in Bootloader CLI
<RealTek>?
----------------- COMMAND MODE HELP ------------------
HELP (?) : Print this help message
SIG: SIG <type><sig>
SIGR: Display signature and flag
LOADADDR: <Load Address>
J: Jump to <TargetAddress>
FLR: FLR <dst><src><length>
FLW <dst_ROM_offset><src_RAM_addr><length_Byte> <SPI cnt#>: Write offset-data to SPI from RAM
MDIOR: MDIOR <phyid> <reg>
MDIOW: MDIOW <phyid> <reg> <data>
PHYR: PHYR <PHYID><reg>
PHYW: PHYW <PHYID><reg><data>
PORT1: port 1 patch for FT2
<RealTek>
Does anyone know how to copy firmware to RAM and boot it using CLI ?
Here is explanation what mean what on RealTek CLI,
and to flash firmware here is what I did
Press 'Esc' key at boot to interrupt
Enter 'IPCONFIG'
Upload image by TFTP
> $ atftp -p -l fw.bin 192.168.1.6

install proxmox from usb device error

I try to install Proxmox using a USB, and when I click to install, I see the next error:
testing cdrom /dev/sr0
umount: can't umount /mnt: Invalid argument
testing again in 5 seconds
Finally:
no cdrom found - unable to continue (type exit or CTRL-D to reboot)
I prepare the USB using ImageUSB in Windows, and it does have the previous fail, then I try to prepare in Ubuntu using dd if=pve-cd.iso of=/dev/XYZ bs=1M, I don't know where is the problem.
For someone out there still having similar issue, use below method to create the installation media. That should help.
Instructions for Windows
Download Etcher from https://etcher.io , select the ISO and your USB Drive.
If this doesn’t work, alternatively use the OSForensics USB installer from http://www.osforensics.com/portability.html
Instructions for GNU/Linux
You can simply use dd on UNIX like systems. First download the ISO image, then plug in the USB stick. You need to find out what device name gets assigned to the USB stick (see below). Then run:
dd if=proxmox-ve_*.iso of=/dev/XYZ bs=1M
Note: Be sure to replace /dev/XYZ with the correct device name.
Caution: Be very careful, and do not overwrite the hard disk!
Instructions from: https://pve.proxmox.com/wiki/Install_from_USB_Stick

How to install linux on odroid-U3(or other odroid version)?

I have an odroid-U3, and I don't know how to install a linux on it, can anyone tell me how to do it? and I have another question, can odroid-U3 powered by USB port?
Grab the appropriate linux distro from:
http://os.archlinuxarm.org/os/
or follow the steps below which will use the U2 image which is the same for U3:
SD Card Creation
Replace sdX in the following instructions with the device name for the SD card as it appears on your computer.
Zero the beginning of the SD card:
dd if=/dev/zero of=/dev/sdX bs=1M count=8
Start fdisk to partition the SD card:
fdisk /dev/sdX
At the fdisk prompt, create the new partitions:
Type o. This will clear out any partitions on the drive.
Type p to list partitions. There should be no partitions left.
Type n, then p for primary, 1 for the first partition on the drive, and enter twice to accept the default starting and ending sectors.
Write the partition table and exit by typing w.
Create and mount the ext4 filesystem:
mkfs.ext4 /dev/sdX1
mkdir root
mount /dev/sdX1 root
Download and extract the root filesystem (as root, not via sudo):
wget http://archlinuxarm.org/os/ArchLinuxARM-odroid-u2-latest.tar.gz
bsdtar -xpf ArchLinuxARM-odroid-u2-latest.tar.gz -C root
Flash the bootloader files:
cd root/boot
./sd_fusing.sh /dev/sdX
cd ../..
Unmount the partition:
umount root
Insert the SD card into the board, connect ethernet, and apply 5V power.
Use the serial console (with a null-modem adapter if needed) or SSH to the IP address given to the board by your router.
Login as the default user alarm with the password alarm.
The default root password is root.
eMMC Module Creation
Attach the eMMC module to the micro SD adapter, and plug that into your computer.
Follow the above steps to install Arch Linux ARM, and boot the board with the eMMC still attached to micro SD adapter, plugged into the SD slot in the board.
Re-flash the bootloader to the protected boot area of the eMMC module:
cd /boot
./sd_fusing.sh /dev/mmcblk0
Power off the board:
poweroff
Remove the micro SD adapter, detach the eMMC module, and connect the eMMC module to its connector on the board.
Re-apply power the board.
Use the serial console (with a null-modem adapter if needed) or SSH to the IP address given to the board by your router.
Login as the default user alarm with the password alarm.
The default root password is root.
You can follow the official guide at archlinuxarm.org/platforms/armv7/samsung/odroid-u3
Note: If you stuck at step 7 when performed
cd root/boot
./sd_fusing.sh /dev/sdX
cd ../..
you can open the file sd_fusing.sh, change the line
#!/usr/bin/bash
into
#!/bin/bash

Unable to open a connection to an FTDI device

I'm working on a small OS X app that connects to an FTDI device. I've configured my project according to the answer in this question (I've added the .dylib file as a framework, and I added the ftd2xx.h, WinTypes.h, and ftd2xx.cfg files to my project).
I'm currently able to detect if/when the FTDI device is connected over USB:
DWORD deviceCount = 0;
FT_STATUS ftdiPortStatus = FT_ListDevices(&deviceCount, NULL, FT_LIST_NUMBER_ONLY)
if (ftdiPortStatus == FT_OK) {
// The debugger tells me the deviceCount is now 1
...
}
However, if I try to open a connection to the device using either of the following techniques:
ftdiPortStatus = FT_OpenEx("FT232R USB UART",FT_OPEN_BY_DESCRIPTION,deviceHandle);
// OR
ftdiPortStatus = FT_Open(0, deviceHandle);
the returned ftdiPortStatus is always 3 (FT_DEVICE_NOT_OPENED).
The answer here indicates that the problem might be a new driver that Apple added in OSX 10.9, however, if I attempt to unload that kext:
sudo kextunload -b com.apple.driver.AppleUSBFTDI
the OS indicates that no such kext was found. I'm on OSX 10.10, so maybe Apple repented of their ways and removed that driver from Yosemite(?) Either way, I'm still not able to connect... Does anyone have any idea what might be preventing the connection or have ideas for how I might track down the problem (the returned FT_STATUS isn't very helpful...)?
UPDATE:
The answer, below, solved the problem for me. If you are unsure as to whether you might have a second, non-Apple VCP driver installed, you can find the other drivers by running the following command in a terminal:
kextstat | grep FTDI
which will output something like this:
154 0 0xffffff7f831ee000 0x8000 0x8000 com.FTDI.driver.FTDIUSBSerialDriver (2.2.18) <96 16 5 4 3 1>
155 0 0xffffff7f831f6000 0x7000 0x7000 com.apple.driver.AppleUSBFTDI (1.0.1b12) <96 16 5 4 3>
No, that driver is still there on Yosemite. Running
sudo kextunload -b com.apple.driver.AppleUSBFTDI
still removes the relevant kext and frees the device for access via the D2XX library on this Yosemite system I just tested. The kext may be missing if you haven't yet connected your FTDI device to the system.
It may also be blocked by another virtual comm port driver. If you've installed FTDI's virtual comm port driver, that will also take control of the port and block the D2XX library from connecting. Certain Arduino dev kits also use virtual comm port drivers for the FTDI chips they use, so they may have installed their own driver. Check for that.
Finally, the device name of "FT232R USB UART" that I use in my example code may not be the name of your device. There are many FTDI variants, and you'd need to make sure you're using the name of your specific type of device. This can be obtained from the FT_ListDevices() command with the FT_LIST_BY_INDEX|FT_OPEN_BY_DESCRIPTION options. If you use the wrong device name, FT_OpenEx() can fail.