Pandora Urjaman's Pandora/bluetooth/dev Stuff


urjaman

"I Know. We're going for a ride."
Joined
Jan 6, 2009
Messages
1,111
Age
33
Location
Finland
Website
urja.dev
Hi,

1. Has anyone noticed that angstrom-distribution.org seems quite down? (Waiting on them for my gcc :/) EDIT works now

2. There's something iffy with bluetooth:
bluetooth ppp fail, kmsg:
<6>[ 5817.484497] hci_h4p hci_h4p: BT hci up and running.
<6>[ 5943.178222] PPP generic driver version 2.4.2
<6>[ 5951.780761] PPP MPPE Compression module registered
<6>[ 5951.988250] PPP BSD Compression module registered
<6>[ 5952.199432] PPP Deflate Compression module registered
<3>[ 6057.988769] hci_h4p hci_h4p: Receive timed out, 261 done, 83 left, LSR=61, IER=05
<3>[ 6057.996429] hci_h4p hci_h4p: Unknown H4 packet type 0xdf
<3>[ 6058.002838] l2cap_recv_acldata: Unexpected continuation frame (len 337)
<3>[ 6058.090148] hci_h4p hci_h4p: Receive timed out, 261 done, 83 left, LSR=61, IER=05
<3>[ 6058.097839] hci_h4p hci_h4p: Unknown H4 packet type 0xd5
<3>[ 6058.104217] l2cap_recv_acldata: Unexpected continuation frame (len 337)
<3>[ 6058.253936] hci_h4p hci_h4p: Receive timed out, 269 done, 120 left, LSR=61, IER=05
<3>[ 6058.261688] hci_h4p hci_h4p: Unknown H4 packet type 0x92
<3>[ 6058.267242] hci_h4p hci_h4p: Unknown H4 packet type 0xa1
<3>[ 6058.277587] l2cap_recv_acldata: Unexpected continuation frame (len 292)
<3>[ 6058.363494] hci_h4p hci_h4p: Receive timed out, 87 done, 302 left, LSR=61, IER=05
<3>[ 6058.371185] hci_h4p hci_h4p: Unknown H4 packet type 0x4c
<3>[ 6058.376770] hci_h4p hci_h4p: Unknown H4 packet type 0xc0
<3>[ 6058.382385] hci_h4p hci_h4p: Unknown H4 packet type 0x1b
<3>[ 6058.388000] hci_h4p hci_h4p: Unknown H4 packet type 0xd8
<3>[ 6058.393585] hci_h4p hci_h4p: Unknown H4 packet type 0x69
<3>[ 6058.399200] hci_h4p hci_h4p: Unknown H4 packet type 0x54
<3>[ 6058.404846] hci_h4p hci_h4p: Unknown H4 packet type 0x41
<3>[ 6058.410461] hci_h4p hci_h4p: Unknown H4 packet type 0x4c
<3>[ 6058.416015] hci_h4p hci_h4p: Unknown H4 packet type 0x4a
<3>[ 6058.421630] hci_h4p hci_h4p: Unknown H4 packet type 0x9a
<3>[ 6058.427276] hci_h4p hci_h4p: Unknown H4 packet type 0x6f
<3>[ 6058.432830] hci_h4p hci_h4p: Unknown H4 packet type 0x14
<3>[ 6058.438446] hci_h4p hci_h4p: Unknown H4 packet type 0xa8
<3>[ 6058.444061] hci_h4p hci_h4p: Unknown H4 packet type 0xbb
<3>[ 6058.449676] hci_h4p hci_h4p: Unknown H4 packet type 0x14
<3>[ 6058.455261] hci_h4p hci_h4p: Frame too long or can't determine size.
<3>[ 6058.461944] hci_h4p hci_h4p: Unknown H4 packet type 0x0b
<3>[ 6058.467559] hci_h4p hci_h4p: Unknown H4 packet type 0x90
<3>[ 6058.473144] hci_h4p hci_h4p: Unknown H4 packet type 0x37
<3>[ 6058.478729] hci_h4p hci_h4p: Unknown H4 packet type 0x69
<3>[ 6058.484344] hci_h4p hci_h4p: Unknown H4 packet type 0xb7
<3>[ 6058.489959] hci_h4p hci_h4p: Unknown H4 packet type 0x95
<3>[ 6058.495544] hci_h4p hci_h4p: Unknown H4 packet type 0xdb
<3>[ 6058.501159] hci_h4p hci_h4p: Unknown H4 packet type 0x32
<3>[ 6058.506774] hci_h4p hci_h4p: Unknown H4 packet type 0xa5
<3>[ 6058.512390] hci_h4p hci_h4p: Unknown H4 packet type 0x23
<3>[ 6058.517974] hci_h4p hci_h4p: Frame too long or can't determine size.
<3>[ 6058.524627] hci_h4p hci_h4p: Unknown H4 packet type 0x76
<3>[ 6058.530242] hci_h4p hci_h4p: Unknown H4 packet type 0xb1
<3>[ 6058.535827] hci_h4p hci_h4p: Unknown H4 packet type 0x24
<3>[ 6058.541442] hci_h4p hci_h4p: Unknown H4 packet type 0x8f
<3>[ 6058.547058] hci_h4p hci_h4p: Unknown H4 packet type 0xe6
<3>[ 6058.552673] hci_h4p hci_h4p: Unknown H4 packet type 0x12
<3>[ 6058.558319] hci_h4p hci_h4p: Unknown H4 packet type 0x52
<3>[ 6058.563873] hci_h4p hci_h4p: Unknown H4 packet type 0x6d
<3>[ 6058.569488] hci_h4p hci_h4p: Unknown H4 packet type 0xcb
<3>[ 6058.575134] hci_h4p hci_h4p: Unknown H4 packet type 0x0f
<3>[ 6058.580688] hci_h4p hci_h4p: Unknown H4 packet type 0x52
<3>[ 6058.586334] hci_h4p hci_h4p: Unknown H4 packet type 0x00
<3>[ 6058.591949] hci_h4p hci_h4p: Unknown H4 packet type 0xdc
<3>[ 6058.597534] hci_h4p hci_h4p: Unknown H4 packet type 0x8a
<3>[ 6058.603118] hci_h4p hci_h4p: Unknown H4 packet type 0x2c
<3>[ 6058.608734] hci_h4p hci_h4p: Unknown H4 packet type 0x3f
<3>[ 6058.614379] hci_h4p hci_h4p: Unknown H4 packet type 0x82
<3>[ 6058.619934] hci_h4p hci_h4p: Unknown H4 packet type 0x4e
<3>[ 6058.625549] hci_h4p hci_h4p: Unknown H4 packet type 0x41
<3>[ 6058.631195] hci_h4p hci_h4p: Unknown H4 packet type 0x05
<3>[ 6058.636810] hci_h4p hci_h4p: Unknown H4 packet type 0x59
<3>[ 6058.642364] hci_h4p hci_h4p: Unknown H4 packet type 0x4c
<3>[ 6058.647979] hci_h4p hci_h4p: Unknown H4 packet type 0xa0
<3>[ 6058.653625] hci_h4p hci_h4p: Unknown H4 packet type 0x10
<3>[ 6058.659179] hci_h4p hci_h4p: Unknown H4 packet type 0x54
<3>[ 6058.664825] hci_h4p hci_h4p: Unknown H4 packet type 0x1a
<3>[ 6058.670440] hci_h4p hci_h4p: Unknown H4 packet type 0x01
<3>[ 6058.676055] hci_h4p hci_h4p: Unknown H4 packet type 0x00
<3>[ 6058.681610] hci_h4p hci_h4p: Unknown H4 packet type 0x29
<3>[ 6058.687255] hci_h4p hci_h4p: Unknown H4 packet type 0x76
<3>[ 6058.692871] hci_h4p hci_h4p: Unknown H4 packet type 0xbe
<3>[ 6058.698455] hci_h4p hci_h4p: Unknown H4 packet type 0xe4
<3>[ 6058.704071] hci_h4p hci_h4p: Unknown H4 packet type 0xc0
<3>[ 6058.709686] hci_h4p hci_h4p: Unknown H4 packet type 0x38
<3>[ 6058.715301] hci_h4p hci_h4p: Unknown H4 packet type 0x19
<3>[ 6058.720886] hci_h4p hci_h4p: Unknown H4 packet type 0xf4
<3>[ 6058.726501] hci_h4p hci_h4p: Unknown H4 packet type 0x5c
<3>[ 6058.732116] hci_h4p hci_h4p: Unknown H4 packet type 0x00
<3>[ 6058.737670] hci_h4p hci_h4p: Unknown H4 packet type 0x1a
<3>[ 6058.743286] hci_h4p hci_h4p: Unknown H4 packet type 0xdd
<3>[ 6058.748901] hci_h4p hci_h4p: Unknown H4 packet type 0xac
<3>[ 6058.754516] hci_h4p hci_h4p: Unknown H4 packet type 0x14
<3>[ 6058.760101] hci_h4p hci_h4p: Unknown H4 packet type 0x3a
<3>[ 6058.765716] hci_h4p hci_h4p: Unknown H4 packet type 0x3e
<3>[ 6058.771331] hci_h4p hci_h4p: Unknown H4 packet type 0x77
<3>[ 6058.776916] hci_h4p hci_h4p: Unknown H4 packet type 0xf5
<3>[ 6058.782531] hci_h4p hci_h4p: Unknown H4 packet type 0xb1
<3>[ 6058.788146] hci_h4p hci_h4p: Unknown H4 packet type 0xa2
<3>[ 6058.793731] hci_h4p hci_h4p: Unknown H4 packet type 0x72
<3>[ 6058.799316] hci_h4p hci_h4p: Unknown H4 packet type 0xc6
<3>[ 6058.804931] hci_h4p hci_h4p: Unknown H4 packet type 0xf9
<3>[ 6058.810546] hci_h4p hci_h4p: Unknown H4 packet type 0xb4
<3>[ 6058.816131] hci_h4p hci_h4p: Unknown H4 packet type 0xa0
<3>[ 6058.821716] hci_h4p hci_h4p: Unknown H4 packet type 0x00
<3>[ 6058.827331] hci_h4p hci_h4p: Unknown H4 packet type 0x64
I'm guessing that the pandora might be losing bytes from the bluetooth serial input, will debug.
My bt mouse works ok, and others have said that headsets work too, so I'm thinking that this happens only when trying to burst a lot of data to the pandora over bt.

and yeah the ppp link was ok until i tried to use it, just to show what it looked like from mplayer:
pandora:~$ mplayer http://u10.di.fm:80/di_classiceurodance_aacplus
MPlayer SVN-r30165-4.3.3 (C) 2000-2009 MPlayer Team

Playing http://u10.di.fm:80/di_classiceurodance_aacplus.
Resolving u10.di.fm for AF_INET6...
Couldn't resolve name for AF_INET6: u10.di.fm
Resolving u10.di.fm for AF_INET...
Connecting to server u10.di.fm[72.26.204.35]: 80...
Name : Classic EuroDance - D I G I T A L L Y - I M P O R T E D - Finest imported cheese on the net!
Genre : Electronic Eurodance HiNRG Italo
Website: http://www.di.fm
Public : no
Bitrate: 32kbit/s
Cache size set to 320 KBytes
Cache fill: 0.00% (0 bytes)
ICY Info: StreamTitle='Rob Mayth - Can I Get A Witness';
Cache fill: 3.45% (11289 bytes)
AAC file format detected.
==========================================================================
Forced audio codec: mad
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)

Unsupported LATM configuration: 11 programs/ 53 subframes, 3 layers, allstreams: 1
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 22050 Hz, 2 ch, s16le, 128.0 kbit/18.14% (ratio: 16000->88200)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [oss] 22050Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
FAAD: error: Maximum number of scalefactor bands exceeded, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: Failed to decode frame: Unable to find ADTS syncword
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: error: Unable to find ADTS syncword, trying to resync!
FAAD: Failed to decode frame: Unable to find ADTS syncword
A: 1.5 (01.5) of 0.0 (unknown) 6.1% 0%

Exiting... (End of file)

3. The pandora is great, i have nothing to add to the other reviews. Regarding my one-nubber: left nub wont go up, but otherwise ok. Can use right nub=mouse, left=mbuttons quite fine.

4. i want time to full on the battery gauge back, please where's the source? :p

5. anyone mind sharing a boot.txt that will boot a custom kernel (only) from sd? EDIT: no need anymore

So yeah, this was my status dump, back to hacking when i get da fraking gcc...
 
@notaz:
Code:
+       /* there hould be no rx in progress at this point */
+       if (info->rx_skb != NULL) {
+               dev_err(info->dev, "Receive timed out, %i done, %li left, "
+                       "LSR=%02x, IER=%02x\n", info->rx_skb->len + 1,
+                       info->rx_count, hci_h4p_inb(info, UART_LSR),
+                       hci_h4p_inb(info, UART_IER));
+               info->rx_timed_out = 1;
+       }

Could you share your rationale for that comment in drivers/bluetooth/hci_h4p/core.c? (Oh and there's a typo, too :p )

EDIT: Asking this because commenting that block out changed status of bluetooth (for me) from unusable (can receive ~20-500kB of data before ppp connection halting) to fully working - used to have big problems playing 32kbps AAC stream (max 2 min), now already 4 mins of 96kbps, but i still think we need some receive timeout mechanism, but this one (as it currently stands) doesnt work.

EDIT2: Oh, why console=ttyS0,115200n8 in the command line by default? Isn't ttyS0==UART1==bluetooth? Just in case I changed that to ttyS2 (should be UART3==ext port?) in my boot.txt
 
urjaman said:
Could you share your rationale for that comment in drivers/bluetooth/hci_h4p/core.c? (Oh and there's a typo, too :p )
I don't really remember, it was more than 1.5 years ago. That driver is a hack, will need to review it, does it work stable with that code removed?

urjaman said:
EDIT2: Oh, why console=ttyS0,115200n8 in the command line by default? Isn't ttyS0==UART1==bluetooth? Just in case I changed that to ttyS2 (should be UART3==ext port?) in my boot.txt
Because only UART3 is managed by kernel serial driver, UART1 is managed by BT driver and UART2 is never initialized, so it's ttyS0.
 
Last edited by a moderator:
notaz said:
urjaman said:
Could you share your rationale for that comment in drivers/bluetooth/hci_h4p/core.c? (Oh and there's a typo, too :p )
I don't really remember, it was more than 1.5 years ago. That driver is a hack, will need to review it, does it work stable with that code removed?
For the non-IRC people:
urjaman on IRC said:
(22:47:45) urjaman: notaz: about stability: i'm on irc atm with that driver, its been playing internet radio for a few hours without problems now, but i don know for sure.
(22:48:00) urjaman: *dont know
(22:50:11) urjaman: my logic: if the serial port _never_ misses a byte it should be ok - IMO scary without some receive timeout, but works for me
 
Last edited by a moderator:
Firstly, i hacked the xfce battery plugin to show time to full when on AC.
Binary Here. Goes to /usr/libexec/xfce4/panel-plugins. Remember to backup old one. Try at your own risk. Reload by remove from panel + add to panel (loses settings, though), or switch GUI (i think so) or surely by reboot.
Source Here.

Secondly, added middle button support to nubs mouse button mode:
Code:
diff --git a/drivers/input/misc/vsense.c b/drivers/input/misc/vsense.c
index b390f11..6b4f81e 100644
--- a/drivers/input/misc/vsense.c
+++ b/drivers/input/misc/vsense.c
@@ -61,7 +61,7 @@ static void vsense_work(struct work_struct *work)
 	struct vsense_drvdata *ddata;
 	int ax = 0, ay = 0, rx = 0, ry = 0;
 	signed char buff[4];
-	int ret, l, r;
+	int ret, l, r, m;
 
 	ddata = container_of(work, struct vsense_drvdata, work.work);
 
@@ -99,7 +99,7 @@ dosync:
 		input_report_rel(ddata->input, REL_WHEEL, ay);
 		break;
 	case VSENSE_MODE_MBUTTONS:
-		l = r = 0;
+		m = l = r = 0;
 		if (ax <= -ddata->mbutton_threshold)
 			l = 1;
 		else if (ax >= ddata->mbutton_threshold)
@@ -117,8 +117,12 @@ dosync:
 			}
 		} else
 			ddata->mbutton_stage = 0;
+		if (ay <= -ddata->mbutton_threshold)
+			m = 1;
+
 		input_report_key(ddata->input, BTN_LEFT, l);
 		input_report_key(ddata->input, BTN_RIGHT, r);
+		input_report_key(ddata->input, BTN_MIDDLE, m);
 		break;
 	default:
 		input_report_abs(ddata->input, ABS_X, ax * 8);
@@ -191,6 +195,7 @@ static int vsense_input_register(struct vsense_drvdata *ddata, int mode)
 		/* add fake buttons to fool X that this is a mouse */
 		input_set_capability(input, EV_KEY, BTN_LEFT);
 		input_set_capability(input, EV_KEY, BTN_RIGHT);
+		input_set_capability(input, EV_KEY, BTN_MIDDLE);
 	} else {
 		input->evbit[BIT_WORD(EV_ABS)] = BIT_MASK(EV_ABS);
 		input_set_abs_params(input, ABS_X, -256, 256, 0, 0);
 
Back
Top