Using iOS GameKit's "Bluetooth Bonjour" with other platforms - ios

I'm interested in connecting to iOS-based devices over Bluetooth. I can see that the "Local Network" service is exposed, but I cannot find any extra information about it. Property stored under key 0x0204 looks like a Bonjour key.
Which protocol is used? How can one talk to the iOS device using Linux, Mac or one's own embedded device equipped with a Bluetooth chip?
Here's SDP data extracted using Bluetooth Explorer under OS X while the iOS device runs Gameloft's Star Battalion.
{
0x0000 = uint32(1330188565),
0x0200 = uint32(2),
0x0202 = string(004wD7l1A..0|0|0|ivucic-À'),
0x030a = uint32(0),
0x0009 = { { uuid16(11 15), uint16(256) } },
0x0201 = string(_657o30a6rmst07À),
0x0005 = { uuid16(10 02) },
0x0100 = string(Local Network),
0x0001 = { uuid16(11 15) },
0x0203 = string(004wd7l1a..0|0|0|ivucic-_657o30a6rmst07À
0xf000 = uint8(2),
0x0204 = string( txtvers=1state=A),
0x0008 = uint8(255),
0x0006 = { uint16(25966), uint16(106), uint16(256), uint16(26226), uint16(106), uint16(272), uint16(25701), uint16(106), uint16(288), uint16(27233), uint16(106), uint16(304) },
0x0004 = { { uuid16(01 00), uint16(15) }, { uuid16(00 0f), uint16(256), { uint16(2048), uint16(2054) } } },
0x0002 = uint32(0)
},
Other partially relevant questions:
PAN with Linux, iOS, Bluetooth, Bonjour, GameKit — Possible? - Person can solve problem using Wi-Fi. Not solution here because embedded device will not have the way more expensive Wi-Fi chip.
Bonjour over bluetooth WITHOUT Gamekit? - Best answer does not end up providing technical details
iOS bluetooth without GameKit - Provides a solution for a jailbroken device, which is not applicable here.
Researching further with Apple's Bluetooth Explorer in OS X and sdptool in GNU/Linux, I have discovered that key 0x0001 (standing for "protocol class"), containing value of 0x1115, stands for the "PANU" variant of "PAN" - a peer2peer variant. It is notable that OS X does not provide service-side ('hosting') support for this protocol, despite supporting creation of a 0x1116 network, which is the "NAP" variant of "PAN" - a client/server variant.
This might be good news, but only if GameKit's session protocol does not have to be used. Hijacking the media-layer connection established by GameKit in order to send other UDP traffic would be ideal.
I'll still have to research whether or not this GameKit connection really is 0x1115; that is, if it really is "PANU". Does anyone have any further information?
Note while Bonjour automatically announced this Bluetooth service after iOS 3, this has changed with iOS 5. See the answer I posted on how to establish Bluetooth connection without GameKit, where I handily documented information from Apple's Technical Q&A QA1753.
A small amount of research with GNU/Linux did not result in a successful connection. It may be due to lack of knowledge on how to properly use pand. It may also be due to Bluetooth MAC based blocking. I'd love info anyone may have to offer. If I research this further and stumble upon something interesting, I'll update this answer.
Results under Ubuntu. The service appears only when Bluetooth Bonjour is active.
ivucica#ivucica-MacBook:~$ sdptool browse $ADDR #relevant data only
Browsing ADDRESS_HERE ...
Service Name: Local Network
Service RecHandle: 0x4f491115
Service Class ID List:
"PAN User" (0x1115)
Protocol Descriptor List:
"L2CAP" (0x0100)
PSM: 15
"BNEP" (0x000f)
Version: 0x0100
SEQ8: 0 6
Language Base Attr List:
code_ISO639: 0x656e
encoding: 0x6a
base_offset: 0x100
code_ISO639: 0x6672
encoding: 0x6a
base_offset: 0x110
code_ISO639: 0x6465
encoding: 0x6a
base_offset: 0x120
code_ISO639: 0x6a61
encoding: 0x6a
base_offset: 0x130
Profile Descriptor List:
"PAN User" (0x1115)
Version: 0x0100
... and so on ...
Here's the attempt to connect:
ivucica#ivucica-MacBook:~$ pand --connect $ADDR -n
pand[3237]: Bluetooth PAN daemon version 4.98
pand[3237]: Connecting to ADDRESS_HERE
pand[3237]: Connect to ADDRESS_HERE failed. Connection refused(111)
Is some sort of authorization required? Enabling encryption, authentication, secure connection and forcing becoming a master doesn't seem to make any difference (-AESM options in various combinations).
Anyone has any ideas?
Huh!
ivucica#ivucica-MacBook:~$ sudo hcidump
HCI sniffer - Bluetooth packet analyzer ver 2.2
device: hci0 snap_len: 1028 filter: 0xffffffff
HCI Event: Command Status (0x0f) plen 4
Create Connection (0x01|0x0005) status 0x00 ncmd 1
> HCI Event: Role Change (0x12) plen 8
status 0x00 bdaddr ADDRESS_HERE role 0x01
Role: Slave
> HCI Event: Connect Complete (0x03) plen 11
status 0x00 handle 12 bdaddr ADDRESS_HERE type ACL encrypt 0x00
HCI Event: Command Status (0x0f) plen 4
Read Remote Supported Features (0x01|0x001b) status 0x00 ncmd 1
> HCI Event: Read Remote Supported Features (0x0b) plen 11
status 0x00 handle 12
Features: 0xbf 0xfe 0x8f 0xfe 0x9b 0xff 0x79 0x83
HCI Event: Command Status (0x0f) plen 4
Read Remote Extended Features (0x01|0x001c) status 0x00 ncmd 1
> HCI Event: Max Slots Change (0x1b) plen 3
handle 12 slots 5
> HCI Event: Read Remote Extended Features (0x23) plen 13
status 0x00 handle 12 page 1 max 1
Features: 0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x00
HCI Event: Command Status (0x0f) plen 4
Remote Name Request (0x01|0x0019) status 0x00 ncmd 1
> HCI Event: Remote Name Req Complete (0x07) plen 255
status 0x00 bdaddr ADDRESS_HERE name 'Evil iPad'
HCI Event: Command Status (0x0f) plen 4
Authentication Requested (0x01|0x0011) status 0x00 ncmd 1
> HCI Event: Link Key Request (0x17) plen 6
bdaddr ADDRESS_HERE
HCI Event: Command Complete (0x0e) plen 10
Link Key Request Reply (0x01|0x000b) ncmd 1
status 0x00 bdaddr ADDRESS_HERE
> HCI Event: Auth Complete (0x06) plen 3
status 0x00 handle 12
HCI Event: Command Status (0x0f) plen 4
Set Connection Encryption (0x01|0x0013) status 0x00 ncmd 1
> HCI Event: Encrypt Change (0x08) plen 4
status 0x00 handle 12 encrypt 0x01
HCI Event: Number of Completed Packets (0x13) plen 5
handle 12 packets 1
> ACL data: handle 12 flags 0x02 dlen 16
L2CAP(s): Info rsp: type 2 result 0
Extended feature mask 0x02a8
Enhanced Retransmission mode
FCS Option
Fixed Channels
Unicast Connectless Data Reception
HCI Event: Number of Completed Packets (0x13) plen 5
handle 12 packets 1
> ACL data: handle 12 flags 0x02 dlen 20
L2CAP(s): Info rsp: type 3 result 0
Fixed channel list 0x00000006
L2CAP Signalling Channel
L2CAP Connless
HCI Event: Number of Completed Packets (0x13) plen 5
handle 12 packets 1
> ACL data: handle 12 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 2 status 0
Connection refused - PSM not supported
> HCI Event: Disconn Complete (0x05) plen 4
status 0x00 handle 12 reason 0x13
Reason: Remote User Terminated Connection
This?
> ACL data: handle 12 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0000 scid 0x0040 result 2 status 0
Connection refused - PSM not supported

According to this interesting site :
http://code.google.com/p/btstack/wiki/iPhoneBluetooth Apple are using a special chip besides their Bluetooth RF chip which denies any connection for a device without that chip - this means its a lock on the hardware level.

Maybe a bit delayed, but technologies have evolved since so there is certainly new info around which draws fresh light on the matter...
The traditional GameKit has been replaced by Multiper Connectivity together with introducing support for WiFi Direct on iOS, however the framework still remains iOS only. I assume there is proprietary stuff going on in there.
Also, as iOS has yet to open up a direct API for WiFi Direct I believe the best way to approach this is to use BLE, which is supported by both platforms (some better than others).
On iOS a device can act both as a BLE Central and BLE Peripheral at the same time, on Android the situation is more complex as not all devices support the BLE Peripheral state. Also the Android BLE stack is very unstable (to date).
If your use case is feature driven, I would suggest to look at Frameworks and Libraries that can achieve cross platform communication for you, without you needing to build it up from scratch.
For example: http://p2pkit.io or google nearby
Disclaimer: I work for Uepaa, developing p2pkit.io for Android and iOS.

Related

Unable to maintain BLE connection - BlueZ Linux <-> iOS

Setup:
I'm running BlueZ 5.48 on an embedded Linux platform, with the Python example-gatt-server as a peripheral. I enable advertising with hciconfig hci0 leadv 0.
I am trying to connect using nRF Connect from an iPhone (iOS v12.1.4).
The devices are both on my desk, measuring about -40dBm RSSI, so signal levels should be good.
Issue(s):
I'm aware of several issues, and will list them in priority order (highest first).
a) In nRF Connect on the iPhone, I can see the device and connect, but after 30-60 seconds something causes a disconnect. It never asks me for permission to pair or enter a PIN.
b) In Linux, I see Bluetooth: SMP security requested but not available printed repeatedly as long as the iPhone is connected.
c) On the iPhone, I cannot see my peripheral device in the regular Bluetooth Devices list...ever. (This is a lesser issue...although I'd like to try pairing this way if possible.)
What I've tried:
1) I removed the TestService with secure / encrypted characteristics from the example-gatt-server Python code, so all that remain are Heartrate and Battery services. The iPhone nRF Connect app still disconnects after 30-60 seconds.
2) To determine the cause of disconnect, I looked at the journal for bluetooth.service in Linux:
Mar 15 18:44:57 sn0010 bluetoothd[775]: src/gatt-database.c:send_notification_to_device() GATT server sending notification
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/adapter.c:dev_disconnected() Device MAC_ADDR_HERE disconnected, reason 1
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/adapter.c:adapter_remove_connection()
Mar 15 18:44:58 sn0010 bluetoothd[775]: plugins/policy.c:disconnect_cb() reason 1
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr MAC_ADDR_HERE type 1 status 0xe
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/device.c:device_bonding_failed() status 14
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/adapter.c:resume_discovery()
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/device.c:att_disconnected_cb()
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/device.c:att_disconnected_cb() Connection timed out (110)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/service.c:change_state() 0x20d080: device MAC_ADDR_HERE profile batt-profile state changed: connected -> disconnecting (0)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/service.c:change_state() 0x20d080: device MAC_ADDR_HERE profile batt-profile state changed: disconnecting -> disconnected (0)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/service.c:change_state() 0x20d638: device MAC_ADDR_HERE profile deviceinfo state changed: connected -> disconnecting (0)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/service.c:change_state() 0x20d638: device MAC_ADDR_HERE profile deviceinfo state changed: disconnecting -> disconnected (0)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/service.c:change_state() 0x20ca00: device MAC_ADDR_HERE profile gap-profile state changed: connected -> disconnecting (0)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/service.c:change_state() 0x20ca00: device MAC_ADDR_HERE profile gap-profile state changed: disconnecting -> disconnected (0)
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/gatt-client.c:btd_gatt_client_disconnected() Device disconnected. Cleaning up.
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/device.c:att_disconnected_cb() Automatic connection disabled
Mar 15 18:44:58 sn0010 bluetoothd[775]: attrib/gattrib.c:g_attrib_unref() 0x21e968: g_attrib_unref=0
Mar 15 18:44:58 sn0010 bluetoothd[775]: src/gatt-database.c:att_disconnected()
This seems to say a timeout occurred (reason 1).
3) I altered the default conn_min_interval=24, conn_max_interval=40, supervision_timeout=42 values in Linux sysfs to match the Apple compatibility guidelines. (Values were changed to 12, 24, and 200 explicitly.) Rebooting and restarting Bluetooth with this didn't make any difference.
4) I tried issuing btmgmt bredr off and btmgmt bondable off before hciconfig hci0 leadv 0, but no change.
5) I ran nRF Sniffer but it didn't seem to capture disconnect events. I can tell my peripheral is advertising by filtering on its BD addr as shown below:
6) I disabled the example-gatt-server altogether. nRF Connect is still able to connect, but disconnects after 30-60 seconds again. This seems to isolate the issue within the iOS app, the BlueZ stack, or lower Linux driver layers/configuration.
7) Connecting using nRF Connect for Android works fine and maintains a steady connection as long as I wish.
Question
Does anyone have advice for what to try next?
EDIT 1:
Per comment, I have run btmon on the Linux host while the iPhone is connected. I enabled notify for Heartrate characteristic on the iPhone. The log shows a disconnect due to timeout.
< ACL Data TX: Handle 128 flags 0x00 dlen 7 #4792 [hci0] 105.414362
ATT: Read Request (0x0a) len 2
Handle: 0x0016
> ACL Data RX: Handle 128 flags 0x02 dlen 9 #4793 [hci0] 105.466957
ATT: Error Response (0x01) len 4
Read Request (0x0a)
Handle: 0x0016
Error: Insufficient Authentication (0x05)
> HCI Event: Number of Completed Packets (0x13) plen 5 #4794 [hci0] 105.467019
Num handles: 1
Handle: 128
Count: 1
< ACL Data TX: Handle 128 flags 0x00 dlen 7 #4795 [hci0] 105.474721
ATT: Read Request (0x0a) len 2
Handle: 0x0016
< ACL Data TX: Handle 128 flags 0x00 dlen 11 #4796 [hci0] 105.564168
ATT: Handle Value Notification (0x1b) len 6
Handle: 0x000c
Data: 0e7d6400
< ACL Data TX: Handle 128 flags 0x00 dlen 9 #4797 [hci0] 106.558967
ATT: Handle Value Notification (0x1b) len 4
Handle: 0x000c
Data: 0665
> HCI Event: Number of Completed Packets (0x13) plen 5 #4798 [hci0] 106.877481
Num handles: 1
Handle: 128
Count: 3
> HCI Event: Disconnect Complete (0x05) plen 4 #4799 [hci0] 106.877698
Status: Success (0x00)
Handle: 128
Reason: Connection Timeout (0x08)
# MGMT Event: Device Disconnected (0x000c) plen 8 {0x0001} [hci0] 106.877764
LE Address: 71:68:0B:72:0F:E9 (Resolvable)
Reason: Connection timeout (0x01)
# MGMT Event: Device Disconnected (0x000c) plen 8 {0x0002} [hci0] 106.877764
LE Address: 71:68:0B:72:0F:E9 (Resolvable)
Reason: Connection timeout (0x01)
I believe my issue is solved by using values in accordance with the Apple design guidelines. I edited and rebuilt the kernel so default Bluetooth params are as follows:
$ cat /sys/kernel/debug/bluetooth/hci0/conn_min_interval
12
$ cat /sys/kernel/debug/bluetooth/hci0/conn_max_interval
12
$ cat /sys/kernel/debug/bluetooth/hci0/supervision_timeout
500
This appears to maintain a BLE connection between Linux and the iPhone for as long as I wish.
Note: In attempting to edit these parameters via sysfs before, I believe the settings were lost upon reboot...or otherwise did not get applied like I thought. I had also used slightly different values (conn_max_interval = 24 vs 12 now).
I notice your btmon logs have:
Error: Insufficient Authentication (0x05)
As per Bluez: pairing issue with iOS. Presumably this is still the case after you fix with the new params?
(BTW iOS only shows BREDR enabled devices that are discoverable or previously paired in the OS Devices list)

NDEF format for WiFI Pairing Data

I have derived the WiFI Authentication and Encryption data format by writing it and then reading it from an application running on microcontroller.
Can some one please tell me the macros or values for the Authentication type (WPA-Personel,Shared,WPA2-Enterprise,WpA2-Enterprise,WPA2-Personel)fields and Encryption type fields (None,WEP,TKIP,ES,AES/TKIP).
I have figured out for WPA/WPA2-Personel authentication type and AES encryption type so far as below .
52 0x10 0x03 2 Attribute ID: Authentication Type
54 0x00 0x02 2 Attribute Length: 2 octets
56 0x00 0x20 2 Authentication Type: WPA2-Personal
58 0x10 0x0F 2 Attribute ID: Encryption Type
60 0x00 0x02 2 Attribute Length: 2 octets
62 0x00 0x08 2 Encryption Type: AES
Any official documentation will be highly appreciated.

CBPeripheral writeValue to send 40 bytes by with CBCharacteristicWriteWithResponse send 18, 18 & 2

I am writing/sending 40 bytes to a peripheral using CBCharacteristicWriteWithResponse (BLE112 using BGLib) I would have expected it to arrive in two blocks of 20 bytes.
Instead it is arriving in three blocks 18, 18 & 4.
Any idea why I am seeing this behaviour?
I have been sniffing the initial exchange after a connection.
Via an ATT_Exchange_MTU_Req the iDevice says it can support MTU of 135 bytes! (0x0087) the BLE112 then responds with an ATT_Exchange_MTU_Rsp of 23 bytes. iOS remembers and uses this value as the basis of future comms with the peripheral (the whole point of ATT_Exchange_MTU_Req/Rsp)
In the BTSpec4.0.pdf section 3.4.6.1 Prepare Write Request it says that the Part Attribute value has ATT_MTU-5 = 23 - 5 = 18 bytes to use contain a part of the value.
Had this confirmed by a BLE guru # Apple so reasonably sure this is correct.

How to connect to beaglebone black

I've bought beaglebone black last day and tried to connect with it using USB. As i have read it comes with preinstalled Linux Distro which runs at 192.168.7.2 and we can access it using ssh. But i'm not able to connect. Using start.html provided with device, i have run the script (i'm using Linux not window) for driver installation which actually adds some udev rules. I found out that product id and vendor id provided in script isn't matching with that of device (i checked using lsusb). i'm attaching lsusb output of my device. You can find the online script for linux (driver installation) at http://beagleboard.org/static/Drivers/Linux/FTDI/mkudevrule.sh. Please let me know how can i connect with my device
========================lsusb=========================
Bus 002 Device 013: ID 1d6b:0104 Linux Foundation Multifunction Composite Gadget
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
idVendor 0x1d6b Linux Foundation
idProduct 0x0104 Multifunction Composite Gadget
bcdDevice 3.08
iManufacturer 2 Circuitco
iProduct 3 BeagleBoneBlack
iSerial 4 6A-0414BBBK1966
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 164
bNumInterfaces 5
bConfigurationValue 1
iConfiguration 5 Multifunction with RNDIS
bmAttributes 0xc0
Self Powered
MaxPower 2mA
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 0
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 6 Ethernet Networking
bFunctionProtocol 0
iFunction 9 RNDIS
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 255 Vendor Specific (MSFT RNDIS?)
iInterface 7 RNDIS Communications Control
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x00
bDataInterface 1
CDC ACM:
bmCapabilities 0x00
CDC Union:
bMasterInterface 0
bSlaveInterface 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0008 1x 8 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 8 RNDIS Ethernet Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Association:
bLength 8
bDescriptorType 11
bFirstInterface 2
bInterfaceCount 2
bFunctionClass 2 Communications
bFunctionSubClass 2 Abstract (modem)
bFunctionProtocol 1 AT-commands (v.25ter)
iFunction 12 CDC Serial
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 2 Communications
bInterfaceSubClass 2 Abstract (modem)
bInterfaceProtocol 1 AT-commands (v.25ter)
iInterface 10 CDC Abstract Control Model (ACM)
CDC Header:
bcdCDC 1.10
CDC Call Management:
bmCapabilities 0x00
bDataInterface 3
CDC ACM:
bmCapabilities 0x02
line coding and serial state
CDC Union:
bMasterInterface 2
bSlaveInterface 3
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x84 EP 4 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x000a 1x 10 bytes
bInterval 9
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 3
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 10 CDC Data
bInterfaceSubClass 0 Unused
bInterfaceProtocol 0
iInterface 11 CDC ACM Data
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 4
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 8 Mass Storage
bInterfaceSubClass 6 SCSI
bInterfaceProtocol 80 Bulk-Only
iInterface 1 Mass Storage
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x85 EP 5 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x03 EP 3 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0200 1x 512 bytes
bInterval 1
Device Qualifier (for other device speed):
bLength 10
bDescriptorType 6
bcdUSB 2.00
bDeviceClass 239 Miscellaneous Device
bDeviceSubClass 2 ?
bDeviceProtocol 1 Interface Association
bMaxPacketSize0 64
bNumConfigurations 1
Device Status: 0x0001
Self Powered
Its simple just open your web browser chrome or mozilla fire fox and enter the ip in the title bar. Thats it you will get onto it. And comming to ssh if you specify the command you entered i can provide you the resolution.
I have the same issue. Making an auto ethernet connection to eth1 will make it possible to connect most of the times (sometimes you have to disconnect and connect several times!), but the best way is to use screen command.
sudo screen /dev/ttyACM0 115200
(it can be ttyACM* or ttyUSB*, you have to check).
You can login and connect this way. Not sure if it solves your problem though. Let me know.
Actually you dont have to connect to ethernet. You can use ethernet over usb by connecting the mini usb to your system. Linux usually dont require any drivers to be installed..
After you connect just open your browser and go on 192.168.7.2(default)
Sometimes you have to hold the S2 button(closest to the memory card slot) before you plug the usb cable. Also remove ethernet connection.

reducing jitter of serial ntp refclock

I am currently trying to connect my DIY DC77 clock to ntpd (using Ubuntu). I followed the instructions here: http://wiki.ubuntuusers.de/Systemzeit.
With ntpq I can see the DCF77 clock
~$ ntpq -c peers
remote refid st t when poll reach delay offset jitter
==============================================================================
+dispatch.mxjs.d 192.53.103.104 2 u 6 64 377 13.380 12.608 4.663
+main.macht.org 192.53.103.108 2 u 12 64 377 33.167 5.008 4.769
+alvo.fungus.at 91.195.238.4 3 u 15 64 377 16.949 7.454 28.075
-ns1.blazing.de 213.172.96.14 2 u - 64 377 10.072 14.170 2.335
*GENERIC(0) .DCFa. 0 l 31 64 377 0.000 5.362 4.621
LOCAL(0) .LOCL. 12 l 927 64 0 0.000 0.000 0.000
So far this looks OK. However I have two questions.
What exactly is the sign of the offset? Is .DCFa. ahead of the system clock or behind the system clock?
.DCFa. points to refclock-0 which is a DIY DCF77 clock emulating a Meinberg clock. It is connected to my Ubuntu Linux box with an FTDI usb-serial adapter running at 9600 7e2. I verified with a DSO that it emits the time with jitter significantly below 1ms. So I assume the jitter is introduced by either the FTDI adapter or the kernel. How would I find out and how can I reduce it?
Part One:
Positive offsets indicate time in the client is behind time on the server.
Negative offsets indicate that time in the client is ahead of time on the server.
I always remember this as "what needs to happen to my clock?"
+0.123 = Add 0.123 to me
-0.123 = Subtract 0.123 from me
Part Two:
Yes the USB serial converters add jitter. Get a real serial port:) You can also use setserial and tell it that the serial port needs to be low_latency. Just apt-get setserial.
Bonus Points:
Lose the unreferenced local clock entry. NO LOCL!!!!

Resources