How to specify WLAN interface to apt-get install - raspberry-pi

In my raspberry pi I have two mobile dongles then my RP shows two WLAN interfaces, one of them is connected to the internet (wlan1) but the other (wlan0) doesn't because is connected to my computer via AD-HOC. I need to install some packages but my pi always tries to get the packages via wlan0.
How can I specify the interface to 'apt-get install'?
Thanks!

Related

RPI/Raspbian SocketCAN configuration issues

Python and RPi n00b here. Trying to get CANopen working on my RPI, and think I'm 8/10s of the way to communicating.
Target device is an RPi 3+ with fairly pedestrian install of Raspbian Buster and 5.4.51-v7+ linux kernel, attached to Kvaser Leaf USB CANopen adapter. CANopen adapter hardware is known to be good, works well with Windows software.
Relevant info:
-Installed can-utils
-Installed python-can 4.0.0
-Appear to have installed Kvaser drivers successfully (finally got make to complete without errors)
-vcan appears to work fine - have successfully transmitted and received test packets with this handy virtual can adapter using can-utils
I can set up the can socket initially:
sudo modprobe can
but when I try to initialize actual hardware, it fails and gets the following error:
sudo ip link add dev can0 type can
RTNETLINK answers:Operation not supported
Obviously I'm missing something, but cannot figure out what. I notice that others have had similar issues (though different hardware). Please advise of solutions and TIA.
You'll need to uninstall CANlib and then reboot for socketcan to work.
Follow this procedure:
Download the linuxcan tarball again if you no longer have it: http://www.kvaser.com/downloads
Extract linuxcan: tar -xf linuxcan.tar.gz
Inside of the linuxcan directory, run make to build everything which is required before you can uninstall
Now uninstall CANlib with sudo make uninstall
You should see something like the following:
Uninstalling pciefd
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling pcican2
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling pcican
Remove SocketCAN Kvaser PCI driver from blacklist.
Uninstalling virtualcan
Uninstalling usbcanII
Remove SocketCAN Kvaser USB driver from blacklist.
Uninstalling mhydra
Uninstalling leaf
Remove SocketCAN Kvaser USB driver from blacklist.
Uninstalling common
Now you can reboot and the ip link commands should work.
You need to uninstall "Kvaser Linux Drivers and SDK" and install "Kvaser SocketCAN device driver".

RPI Zero - software installation from SD card

I bought a RPI Zero for some projects. The problem is that this version of RPI does not have WIFI and only USB is used for keyboard.
Is it possible to install software like pip3 / guizero / ... via SD card?
You can use qemu static along with chroot on the root file system of your SD card as a preparation phase.
Here is a small script to do it:
cp /usr/bin/qemu-arm-static <sdcard>/usr/bin/
chroot <sdcard> bash -c "apt-get install ..."
rm <sdcard>/usr/bin/qemu-aarch64-static
You can also have a look at: https://wiki.debian.org/RaspberryPi/qemu-user-static
Yes, but I don't recommend it. You can download the .deb files, copy them to the sd card, and install them using
dpkg -i <package name>
But this has several disadvantages. You cannot use apt package manager without internet connection. You need to install all the dependencies as well, thus can be 10 packages or even much more. And you would need to update manually as well ... a nightmare.
Your options apart from this, you need an USB hub:
1) Get a cheap wifi stick (about $5)
2) If you have your mobile phone, you can enable USB Tethering. This will share your phones internet connection with the RPi.
Comment if you need my help to configure this. But it's easy.

Sip library for Raspberry PI

I have installed RASPBIAN Debian Wheezy on my raspberry pi.
I want to run a sip client on the pi, it should be able to register to a PBX (SIP Server), get a number, get calls and so on.
Is there any good sip library that is suitable to use in the raspberry pi?
thanks
liblinphone is a widely used open-source library for VoIP application development with API in C language. It also provides a python wrapper of SDK.

how to install firebird client only in raspberry pi

I'm new to Raspberry Pi. I have an application that uses a firebird database and i want to run my application in raspberry pi. The database is located on another machine on which firebird server is installed.
So on raspberry pi, I need only the firebird client. Can any one give instructions to install client only on raspberry pi? Do I need to install anything for firebird access from my application in Raspberry Pi?
You can use libfbclient2 from debian wheezy as Mark explained
http://packages.debian.org/wheezy/libfbclient2
apt-get install libfbclient2

trying to wget a file from the web on my beaglebone

I just got a beaglebone today, loaded with the angstrom distribution of linux, and have hit a wall. Here is what I have done since opening the box:
Downloaded and installed 64 bit windows driver from http://beagleboard.org/static/beaglebone/latest/README.htm to allow me to attach my beagleboard via USB.
Downloaded putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Set up putty with my COM (COM8) and a speed of 115200, then opened up my serial USB terminal to interface with the beagleboard.
At this point, whenever I do a wget command such as:
wget http://example.com/file.py
I get an error of:
wget: bad address 'example.com'
I am connected to the internet via wireless... is there a port I should be opening up or something? It seem as though wget just can't get to the web at all.
Am I limiting myself because I am not connected to the internet via ethernet? If that's the case, am I better off downloading the files to my windows box and transferring them manually?
The problem was, not surprisingly, the wireless connection.
My windows machine was connected to the beaglebone via USB, and to the ethernet via wireless.
Plugging an ethernet cable into the beaglebone solved the problem. Still, I would like to be able to do it through my windows box.