Read from MIDI UART with Alsa drivers

Hi,
I’ve installed the ALSA drivers (for my SBLive!).
Everything works well. Now I’m trying to program a Photon App wich will do
some stuff with my MidiUART. I can compile my program, which will get the
name of the SBLive! and the midiUART (that part works perfect, I see the
names in a PtLabel) But when I want to read from the UART’s port, I get an
error : operation not permitted.
Does anyone have experience with this?
Source code is included. This happens when you click on a button.
All help appreciated.
Tx Kasper


begin 666 OpenMidiClick.c
M+RH@62!O(‘4@<B @($0@92!S(&,@<B!I(’ @="!I(&@;B @(" @(" @(" @
M(" @(" @(" @(" @B-“B\J(” @(" @(" @(" @(" @(" @(" @(" @(" @
M($%P<$)U:6QD97(@4&AO=&]N($-O9&4@3&EB("HO#0HO
B @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @5F5R<VEO;B R+C Q(" J
M+PT*#0HOB!3=&%N9&%R9"!H96%D97)S(“HO#0HC:6YC;‘5D92 <W1D:6\N
M:#X-"B-I;F-L=61E(#QS=&1L:6(N:#X-"B-I;F-L=61E(#QU;FES=&0N:#X-
M"B-I;F-L=61E(#QS=’)I;F<N:#X-@T
+RH@3&]C86P@:&5A9&5R<R J+PT*
M(VEN8VQU9&4@(F%B;&EB<RYH(@T*(VEN8VQU9&4@(F%B:6UP;W)T+F@B#0HC
M:6YC;‘5D92 B<’)O=&\N:"(-"@T*#0II;G0-“D]P96Y-:61I0VQI8VLH(%!T
M5VED9V5T7W0@G=I9&=E=“P@07!);F9O7W0@F%P:6YF;RP@4’1#86QL8F%C
M:TEN9F]?=" J8V)I;F9O(“D-”@T
"7L-”@T
"2\J(&5L:6UI;F%T92 G=6YR
M969E<F5N8V5D)R!W87)N:6YG<R J+PT*“7=I9&=E=” ](’=I9&=E=“P@87!I
M;F9O(#T@87!I;F9O+”!C8FEN9F@/2!C8FEN9F[#0H-”@ER971U<FXH(%!T
67T-/3E1)3E5%(“D[#0H-@E]#0H-"@``
`
end

Sorry, I saw I attached the wrong file… :frowning:
When I’m at home I will post the right one…
Grz Groovy
“Groovy” <jv90@dds.nl> wrote in message news:995goo$q5e$2@inn.qnx.com

Hi,
I’ve installed the ALSA drivers (for my SBLive!).
Everything works well. Now I’m trying to program a Photon App wich will do
some stuff with my MidiUART. I can compile my program, which will get the
name of the SBLive! and the midiUART (that part works perfect, I see the
names in a PtLabel) But when I want to read from the UART’s port, I get an
error : operation not permitted.
Does anyone have experience with this?
Source code is included. This happens when you click on a button.
All help appreciated.
Tx Kasper

Groovy <jv90@dds.nl> wrote in message news:995goo$q5e$2@inn.qnx.com

Hi,
I’ve installed the ALSA drivers (for my SBLive!).
Everything works well. Now I’m trying to program a Photon App wich will do
some stuff with my MidiUART. I can compile my program, which will get the
name of the SBLive! and the midiUART (that part works perfect, I see the
names in a PtLabel) But when I want to read from the UART’s port, I get an
error : operation not permitted.
Does anyone have experience with this?
Source code is included. This happens when you click on a button.
All help appreciated.
Tx Kasper
\

begin 666 Buttons.c
M+RH@62!O(‘4@<B @($0@92!S(&,@<B!I(’ @="!I(&@;B @(" @(" @(" @
M(" @(" @(" @(" @B-“B\J(” @(" @(" @(" @(" @(" @(" @(" @(" @
M($%P<$)U:6QD97(@4&AO=&]N($-O9&4@3&EB("HO#0HO
B @(" @(" @(" @
M(" @(" @(" @(" @(" @(" @(" @(" @(" @(" @5F5R<VEO;B R+C Q(" J
M+PT*#0HOB!3=&%N9&%R9"!H96%D97)S(“HO#0HC:6YC;‘5D92 <W1D:6\N
M:#X-"B-I;F-L=61E(#QS=&1L:6(N:#X-"B-I;F-L=61E(#QU;FES=&0N:#X-
M"B-I;F-L=61E(#QS=’)I;F<N:#X-@T
(VEN8VQU9&4@/’-Y<R]A<V]U;F1L
M:6(N:#X-"@T*#0HOB!,;V-A;"!H96%D97)S(“HO#0HC:6YC;'5D92 B86)L
M:6)S+F@B#0HC:6YC;'5D92 B86)I;7!O<G0N:”(-“B-I;F-L=61E(”)P<F]T
M;RYH(@T
#0H-“FEN= T3W!E;DUI9&E#;&EC:R@@4’17:61G971?=" J=VED
M9V5T+"!!<$EN9F]?=" J87!I;F9O+"!0=$-A;&QB86-K26YF;U]T("IC8FEN
M9F@0T#0H)>PT
"6EN= D)“0D);E9A;‘5E.PT*"6-H87()"0D)G-.86UE
M0V%R9#L-"@E0=$%R9U]T"0D)87)G6S%=.PT
"6-H87()"0D)G-0<FEN=" ]
M(")%<G)O<B!I;B!/<&5N:6YG($UI9&E0;W)T(CL-"@E0=%=I9&=E=%]T"0DJ
M=U]L86)E;"PJ=U]087)E;G0L
G=?36ED:4QA8F5L.PT*"7-N9%]R87=M:61I
M7W0)“0DJ:$UI9&D[#0H)<VYD7W)A=VUI9&E?:6YF;U]T"0EH26YF;SL-”@EI
M;G0)"0D)“6-A<F0L9&5V:6-E+&5R<CL-”@EC:&%R"0D)“2IB=69F97([#0H)
M"0D)“0T*“7=?4&%R96YT(#T@07!‘971);G-T86YC92AW:61G970I.PT*"7=?
M;&%B96P@/2!!<$=E=%=I9&=E=%!T<BAW7U!A<F5N="Q!0DY?<&Q?3F%M94-A
M<F0I.PT*"7=?36ED:4QA8F5L(#T@07!‘9717:61G9710=’(H=U]087)E;G0L
M04).7TUI9&E,86)E;“D[#0H)#0H)+RH@96QI;6EN871E(”=U;G)E9F5R96YC
M960G(’=A<FYI;F=S(“HO#0H)=VED9V5T(#T@=VED9V5T+”!A<&EN9F@/2!A
M<&EN9F\L(&-B:6YF;R ](&-B:6YF;SL-”@D-”@D-”@EN5F%L=64@/2!S;F1?
M8V%R9’,H3L-"@EI9BAN5F%L=64@/3T@,“D-”@D)<F5T=7)N”!0=%]#3TY4
M24Y512 I.PT*“6Y686QU92 ](’-N9%]D969A=6QT<U]C87)D*“D[#0H)#0H)
M<VYD7V-A<F1?9V5T7VYA;64H;E9A;‘5E+"9S3F%M94-A<F0I.PT*"5!T4V5T
M07)G*"9A<F=;,%TL4’1?05)‘7U1%6%1?4U1224Y’+’-.86UE0V%R9"PP3L-
M"@E0=%-E=%)E<V]U<F-E<RAW7VQA8F5L+#$L87)G
3L-”@T*“6-A<F0@/2!S
M;F1?9&5F875L=’-?<F%W;6ED:5]C87)D*“D[#0H)9&5V:6-E(#T@<VYD7V1E
M9F%U;‘1S7W)A=VUI9&E?9&5V:6-E*"D[#0H)<’)I;G1F*”)C87)D.B E9”!D
M979I8V4Z(“5D7&XB+&-A<F0L9&5V:6-E3L-"@E0=%-E=$%R9R@F87)G6S!=
M+%!T7T%21U]415A47U-44DE.1RQS4’)I;G0L,"D[#0H)4’13971297-O=7)C
M97,H=U]-:61I3&%B96PL,2QA<F<I.PT
"6EF*&5R<B ](’-N9%]R87=M:61I
M7V]P96XH)FA-:61I+&-A<F0L9&5V:6-E+%-.1%]205=-241)7T]014Y?3U54
M4%543PP0T*“7L-”@D)<’)I;G1F*”)%<G)O<CH@)7-<;B(L<VYD7W-T<F5R
M<F]R*&5R<BDI.PT*“0ER971U<FXH4’1?0T].5$E.544I.PT*“7T-”@EP<FEN
M=&8H(D]P96YI;F<@3TM<;B(I.PD-”@D-”@EI9BAE<G(@/2!S;F1?<F%W;6ED
M:5]I;F9O*&A-:61I+“9H26YF;RD,“D-”@E[“0T*“0EP<FEN=&8H(D5R<F]R
M.B E<UQN(BQS;F1?<W1R97)R;W(H97)R2D[#0H)"7-N9%]R87=M:61I7V-L
M;W-E
&A-:61I3L-"@D)<F5T=7)N%!T7T-/3E1)3E5%3L-"@E]#0H)96QS
M90T
"7L-”@D)4’13971!<F<H)F%R9ULP72Q0=%]!4D=?5$585%]35%))3D<L
M:$EN9F\N;F%M92PP3L-"@D)4’13971297-O=7)C97,H=U]-:61I3&%B96PL
M,2QA<F<I.PT
"7T-”@D-”@EI9BAE<G(@/2!S;F1?<F%W;6ED:5]B;&]C:U]M
M;V1E*&A-:61I+#$I/# I#0H)>PT*“0EP<FEN=&8H(D-H86YG92!”;&]C:R!-
M;V1E7&XB3L-"@D)<’)I;G1F”)%<G)O<CH@)7-<;B(L<VYD7W-T<F5R<F]R
M*&5R<BDI.PT*“0ES;F1?<F%W;6ED:5]C;&]S92AH36ED:2D[#0H)“7)E=‘5R
M;BA0=%]#3TY424Y512D[#0H)?0T*"0T*"6)U9F9E<B ]("AC:&%R("HI;6%L
M;&]C*#8TC$P,C0I.PT"6EF*&5R<B ](’-N9%]R87=M:61I7W)E860H:$UI
M9&DL8G5F9F5R+#8TC$P,C0I/# I.PT"7L-”@D)<’)I;G1F*”)296%D(&9O
M<FT@36ED:5!O<G1<;B(I.PT*“0EP<FEN=&8H(D5R<F]R.B E<UQN(BQS;F1?
M<W1R97)R;W(H97)R2D[#0H)"7-N9%]R87=M:61I7V-L;W-E&A-:61I3L-
M"@D)<F5T=7)N
%!T7T-/3E1)3E5%3L-"@E]#0H)<’)I;G1F”(E9"!">71E
M<R!R96%D7&XB+&5R<BD[#0H)#0H)<VYD7W)A=VUI9&E?8VQO<V4H:$UI9&DI
<.PT*"7)E='5R;BA0=%]#3TY424Y512D[#0H)?0``
`
end

I think I found the problem (yeh, had to do it on my own, nobody
is helping me…:frowning: ) There was a “;” after an if statement. I tested it
with writing to the UART, and it WORKED !!! :slight_smile:
I’ll test with reading tonight (when I’m at home)

bye for now…

Gr KS
“Groovy” <jv90@dds.nl> wrote in message news:997o7s$7t5$1@inn.qnx.com

Groovy <> jv90@dds.nl> > wrote in message news:995goo$q5e$> 2@inn.qnx.com> …
Hi,
I’ve installed the ALSA drivers (for my SBLive!).
Everything works well. Now I’m trying to program a Photon App wich will
do
some stuff with my MidiUART. I can compile my program, which will get
the
name of the SBLive! and the midiUART (that part works perfect, I see the
names in a PtLabel) But when I want to read from the UART’s port, I get
an
error : operation not permitted.
Does anyone have experience with this?
Source code is included. This happens when you click on a button.
All help appreciated.
Tx Kasper


\