Alle Beiträge von Christian Brüssow

Für weitere Informationen: s. Profil.

How to connect your Blackberry z10 with Sachesi running on openSUSE 13.1

Sachesi and openSUSE’s Qt5 packages

First of all download Sachesi for Linux.

Note For me, the current version 1.3.0 did not work with the Qt5 packages from the openSUSE 13.1 repositories, but 1.2.1 did.

With 1.3.0 the start-up failed with the following error message:

./Sachesi: /lib64/libcrypto.so.1.0.0: no version information available (required by ./Sachesi)
This application failed to start because it could not find or load the Qt platform plugin „xcb“.

Available platform plugins are: linuxfb, minimal, offscreen, xcb.

Reinstalling the application may fix this problem.

I have installed the complete set of Qt5 packages, but that did not change anything. If you search for the „xcb“ and „Qt5“, you will find some articles about that. It looks as a newer build of Qt5 would have fixed it, but I was too lazy to do that.

So I downloaded Sachesi 1.2.1 from the download archive.

In short: The following was only tested with Sachesi 1.2.1 on openSUSE 13.1.

Phone settings

At first Sachesi failed to find the USB device representing the z10 connected to my PC.

After some fiddeling with the settings, the following did the trick.

  1. If not already done, set a deivce password under Settings > Security and Privacy > Device Password > Change Device Password
  2. If enabled, disable the USB Mass Storage mode under Settings > Storage and Access.
  3. Disable the Development Mode under Settings > Security and Privacy
  4. Set the access method to the device’s memory explicitly to MS Windows mode under Settings > Storage and Access. The automatic mode did not work for me.

PC settings

Connect the z10 to your PC via a USB cable.

In the system logs you should see something like the following (Tip: Enter dmesg on the commandline to see the output):

[ 2528.510081] usb 2-2: new high-speed USB device number 7 using xhci_hcd
[ 2528.523906] usb 2-2: New USB device found, idVendor=0fca, idProduct=8012
[ 2528.523912] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2528.523915] usb 2-2: Product: RIM Network Device
[ 2528.523918] usb 2-2: Manufacturer: Research In Motion, Ltd.
[ 2528.523920] usb 2-2: SerialNumber: ???????????????????????????????? < ----- here you should see the S/N of your device [ 2528.544672] usbcore: registered new interface driver cdc_ether [ 2528.552948] rndis_host 2-2:1.0: rndis media connect [ 2528.576139] rndis_host 2-2:1.0 usb0: register 'rndis_host' at usb-0000:00:14.0-2, RNDIS device, 42:6f:??:??:??:?? <----- that is the MAC of your device [ 2528.576194] usbcore: registered new interface driver rndis_host [ 2528.584145] cfg80211: Calling CRDA to update world regulatory domain [ 2528.586039] usbcore: registered new interface driver rndis_wlan [ 2528.586668] cfg80211: World regulatory domain updated: [ 2528.586671] cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp) [ 2528.586673] cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 2528.586676] cfg80211: (2457000 KHz - 2482000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 2528.586677] cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm) [ 2528.586679] cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 2528.586681] cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm) [ 2528.599262] systemd-udevd[27128]: renamed network interface usb0 to enp0s20u2 [ 2529.178247] xhci_queue_intr_tx: 84 callbacks suppressed [ 2529.178661] IPv4: martian source 169.254.77.251 from 169.254.77.249, on dev enp0s20u2 [ 2529.178684] ll header: 00000000: ff ff ff ff ff ff 42 6f 2a ef ea 39 08 00 45 00 ......Bo*..9..E. [ 2529.178693] ll header: 00000010: 00 60 cc 3d 00 00 40 11 be 5e a9 fe 4d f9 a9 fe .`.=..@..^

There are two line, that are of special interest for us. The first one is the one stating a rename of the USB device: renamed network interface usb0 to enp0s20u2.

The second one is the IPv4 martian source log line. It shows the IPv4 address of the device. Sadly this changes everytime I am reconnecting the device.

Now open yast2 as root and configure the network device settings (Network Devices > Network Settings) for the new device called enp0s20u2. The following must be set for that device:

  1. For the device itself DHCP4 only is mandatory; all other modes did not work for me.
  2. The device should only be activated On Hotplug.
  3. Under the non-device specific settings, open the Routing tab and enable the Enable IP Forwarding option. Without that, Sachesi will not be able to communicate with the network the phone’s USB-network device is a member of. At least for me, that was the hidden feature to get things going.

Leave yast2 by applying the above changes.

From the second log line, we now the IPv4 address of the device, so as root enter the following – insert the first IPv4 address shown in your log – on the command line:

ifconfig 169.254.77.251 enp0s20u2 up

Again: You must use the first IPv4 from your log output; the IP address used here is only an example based upon the log shown above.

Now e.g. switch to the Backup tab of Sachesi and enter your phones password in the password fiedl. After a short time, Sachesi should be able to connect to your phone.

What worked for me

With the above method, openSUSE 13.1 (x64) and Sachesi 1.2.1, I have

ROBOPro and Fischertechnik ROBO TX via USB cable with openSUSE 13.1 (wine)

With openSUSE 13.1 I successfully managed to estabilsh a USB cable connection between the Fischertechnik ROBO TX Controller and the ROBO Pro Software running under Wine.

Note: Although I have used openSUSE 13.1 for the following, I think it can work with other Linux distros as well, when using the correct Wine packages.

This worked out-of-the-box after

  1. adding the user starting the ROBO Pro software via Wine to the system’s dialout group and
  2. adding the device for the ROBO TX to the so called DOS devices of the Wine emulator.

For Wine I have installed the following packages:

  • wine (at the time of writing, version 1.7.2-2.1)
  • wine-32bit
  • wine-gecko
  • wine-mp3 (at the time of wirting version 1.1.39-12.55)

As a GUI for configuration tasks I have found q4wine handy. So I have installed that package, too.

Connecting the the TX controller to my PC shows the following messages in the system’s log:

[ 4530.329465] usb 2-2: new full-speed USB device number 16 using xhci_hcd
[ 4535.340053] usb 2-2: New USB device found, idVendor=221d, idProduct=1000
[ 4535.340062] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4535.340067] usb 2-2: Product: ROBO TX Controller
[ 4535.340071] usb 2-2: Manufacturer: fischertechnik
[ 4535.340075] usb 2-2: SerialNumber: 0123456789AF
[ 4535.340844] cdc_acm 2-2:1.0: This device cannot do calls on its own. It is not a modem.
[ 4535.340888] cdc_acm 2-2:1.0: ttyACM0: USB ACM device

So the OS recognizes the TX controller is an ACM and not a USB device and links it to /dev/ttyACM0 on my machine. For the difference between ACM and USB devices see the articel at rfc1149.net.

That device is linked under $HOME/.wine/dosdevices/ as com3 – without a period at the end of the file name.

The com-port, com3 on my system, must be added to the registry. You can follow the instructions shown in the previous article concerning ROBO Pro, ROBO TX and Linux. Be carefull to use the correct names for the entries and edit them to match to your environment.

How to allow Fischertechnik RoboPro and the Robo TX controller to work under Linux with Wine

Install the bluez bluetooth stack for Linux. The following assumes you are using Bluez 4.X. For Bluez 5.X some things have changed, e.g. the pin codes are no longer stored as clear text. I will write a follow-up for Bluez 5.X in the near future.

Note: A shell prompt of „#“ means to execute the command as the root user. „$“ means to execute the commands as a normal user.

Get the ID aka „bdaddr“ of the ROBO TX Controller with:

# hcitool scan

The output should be similar to the following:

Scanning …
00:12:34:56:78:9A ROBO TX-633

That should be the same number as can be seen under „Info“–>“Bluetooth“ on the ROBO TX Controller itself.

Edit the file /etc/bluetooth/rfcomm.conf to set the ID as the device address for a rfcomm device. I am using the rfcomm0 as the device on the Linux side, so my rfcomm.conf looks like the following:

#
# RFCOMM configuration file.
#
rfcomm0 {
# Automatically bind the device at startup
bind no;

# Bluetooth address of the device
device 00:12:34:56:78:9A;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment „Fischertechnik ROBO TX Controller“;
}

Then add the Bluetooth PIN to the local bluetooth device configuration for the ID of the ROBO TX. In case the bluetooth device of the Linux host is working correctly, there should be a directory under /var/lib/bluetooth/ with its name being identical to the address of the local bluetooth device, e.g.:

/var/lib/bluetooth/98:76:54:32:10:FF/

If not present add, if present, extend a file named „pincodes“ (one word) below that directory to hold the PIN of the ROBO TX Controller. The files should have an entry like the following:

00:12:34:56:78:9A 1234

The part after the ID from the ROBO TX Controller is the PIN.

Now try to connect the rfcomm device with the ROBO TX Controller by executing the following command:

# rfcomm connect 0

In the example the rfcomm device will be /dev/rfcomm0.

The output should be something like:

Connected /dev/rfcomm0 to 00:13:7B:48:B5:EE on channel 1
Press CTRL-C for hangup

For the following, the connection should not be terminated as the rfcomm device will not exist below „/dev/“ if not connected.

Now add a symbolic link to the rfcomm device below ~/.wine/dosdevices named e.g. „com1“:

$ ln -s /dev/rfcomm0 com1

Note: I had not to add a colon after „com1“ for the name of the link on my installation.

Check the permissions of the rfcomm device. The account using ROBOPro via Wine should be able to read and write to the rfcomm device. On my machine I have added that account to the „dialout“ group and the persmission of the rfcomm device are ug+rw (= 660):

$ ls /dev/rfcomm0
crw-rw---- 1 root dialout 216, 0  4. Jan 00:30 /dev/rfcomm0

Start regedit with wine:

$ wine regedit

And add a key for the com port below [HKEY_LOCAL_MACHINE\System\CurrentControlSet\Enum]

The key path must be

[...\Enum\SERIAL\COM1\COM1]

In case you have defined a different comport than COM1, you must use its number and not 1 (one) for the registry entries and all of the following.

Under the last COM1 key add the following three text entries:

ClassGUID = {4D36E978-E325-11CE-BFC1-08002BE10318}
FriendlyName = Serial Port 1 (COM1)
PortName = COM1

Here is a screenshot showing the registry entries described above:

regedit screenshot com1
Screenshot of COM1 registry entries to allow Fischertechnik RoboPro to access the COM1 port under Linux and Wine.

The ClassGUI (GUI = Globally Unique Identifier) is the GUID for serial ports (see, e.g. List of Device Class GUID)

Now start ROBOPro with Wine and open the COM/USB settings dialog. Select the „ROBO TX Controller“ under „Interface“ and select „USB/Bluetooth“ under „Port“. Clicking „OK“ shoud open a new dialog named „Select USB device“. Select the „Bluetooth“ option under „Connection type“ and activate the „Show all COM ports“ option under „Bluetooth port:“. You should now be able to select „COM1“. After selecting „COM1“ close the dialog clicking on „OK“. Do not forget to test the connection.

I was able to programm and update the firmware of the ROBO TX Controller via Wine under Linux with the settings described above.