AT cmds for Mirage Talon from MangoH Red board AT port

tftp is available on MangoH red board. On my android device there is tftpd. Also on android device there is ftpget and ftpput.

Trying to know if some method of file transfer other than scp can be used between the MangoH red board (WP76xx) and Android sytem.

Then you have tftp and tftpd, what do you want else

was not successful with it tftp on WP and tftpd on Android.

What is the reason?
Do you shutdown the firewall of wp module?
Have you captured the wireshark for debugging?

Ok, got it resolved. Had issues at android end too.

Wrote a at command server for reading commands on ttyGS1 port on the MangoH red board. It worked fine and was able to get wlan0 ip.

On customized board, with WP76xx + talon mirage wifi module, the same application fails when trying to run udhcpc.
It hits error when running the default.script, run-parts not found.

On the same custom board, when running thru command line using the steps given in 4119378_MangoHGreenTutorial-Wifi.pdf works fine.

Is there any permission required when running using popen () ?

Below is the part of the code :
fp=popen("/sbin/udhcpc -R -b -i wlan0", “r”);
if (fp == NULL) {
memset(fullScan,’\0’,sizeof(fullScan));
LE_ERROR(“Failed to run UHDCP command\n” );
return 1;
}
while(fgets(r_path3, sizeof(r_path3), fp) != NULL) {
LE_INFO(“UHDCP Output = %s”, r_path3);
}
pclose(fp);
if(strstr(r_path3,"/etc/udhcpc.d/50default: Adding DNS") || strstr(r_path3,"Lease of ")){
LE_INFO(“FOUND wlan id =%s \n”,r_path3);
for(i=0;i<35525;i++);
}else{

why don’t you use system() API?

Did try system() too but getting the same error.

Log :

Jan 6 00:01:52 swi-mdm9x28-wp user.info Legato: INFO | wifiService[919] | loop=2
Jan 6 00:01:52 swi-mdm9x28-wp user.info Legato: INFO | wifiService[919] | Connected to d8:07:b6:7b:27:da (on wlan0)
Jan 6 00:01:52 swi-mdm9x28-wp user.info Legato: INFO | wifiService[919]/daemon T=main | pa_wifi_client_ti.c pa_wifiClient_Connect() 1000 | WN
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerTest@0[1713]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Hand.
Jan 6 00:01:52 swi-mdm9x28-wp user.info Legato: INFO | wifiService[919]/daemon T=main | pa_wifi_client_ti.c FirstLayerWifiClientEventHandler0
Jan 6 00:01:52 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[919]/daemon T=main | le_wifiClient.c PaEventHandler() 125 | Event: 0
Jan 6 00:01:52 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[919]/daemon T=main | le_wifiClient.c FirstLayerWifiClientEventHandler() 0
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerTest@0[1713]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Hand.
Jan 6 00:01:52 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[919]/daemon T=main | le_wifiClient.c le_wifiClient_RemoveNewEventHandlerr
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerTest@0[1713]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handm
Jan 6 00:01:52 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[919]/daemon T=main | le_wifiClient.c CloseSessionEventHandler() 489 | se)
Jan 6 00:01:52 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[919]/framework T=main | le_wifiClient_server.c CleanupClientData() 148 |!
Jan 6 00:01:52 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[919]/framework T=main | le_wifiAp_server.c CleanupClientData() 148 | Cli!
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | /usr/share/udhcpc/default.script:
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | exec:
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | line 3:
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | run-parts: not found
Jan 6 00:01:52 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] |
Jan 6 00:01:52 swi-mdm9x28-wp user.info kernel: [ 109.977391] IPv6: wlan0: IPv6 duplicate address fe80::fa33:31ff:fe4b:4473 detected!
Jan 6 00:01:53 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | /usr/share/udhcpc/default.script:
Jan 6 00:01:53 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | exec:
Jan 6 00:01:53 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | line 3:
Jan 6 00:01:53 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] | run-parts: not found
Jan 6 00:01:53 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[925] |
Jan 6 00:01:53 swi-mdm9x28-wp user.err Legato: =ERR= | atServerTest@0[1713]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handm
Jan 6 00:01:53 swi-mdm9x28-wp user.info Legato: INFO | atServerWifiStart[925] | udhcpc (v1.24.1) started Sending discover… Sending select

Your log is missing a lot of content

Attaching the full log.
Error Log part :

Jan 6 00:03:19 swi-mdm9x28-wp user.debug Legato: DBUG | wifiService[907]/framework T=main | le_wifiAp_server.c CleanupClientData() 148 | Client 0x7f57ccfc is closed !!!
Jan 6 00:03:19 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 576 | UHDCP Output = udhcpc (v1.24.1) started
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | /usr/share/udhcpc/default.script:
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | exec:
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | line 3:
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | run-parts: not found
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] |
Jan 6 00:03:19 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 576 | UHDCP Output = Sending discover…
Jan 6 00:03:19 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 576 | UHDCP Output = Sending select for 192.168.43.94…
Jan 6 00:03:19 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 576 | UHDCP Output = Lease of 192.168.43.94 obtained, lease time 3599
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | /usr/share/udhcpc/default.script:
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | exec:
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | line 3:
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] | run-parts: not found
Jan 6 00:03:19 swi-mdm9x28-wp user.err Legato: =ERR= | atServerWifiStart[913] |
Jan 6 00:03:19 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 581 | FOUND wlan id =Lease of 192.168.43.94 obtained, lease time 3599
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = wlan0 Link encap:Ethernet HWaddr F8:33:31:4B:44:73
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = inet6 addr: fe80::fa33:31ff:fe4b:4473/64 Scope:Link
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = RX packets:4 errors:0 dropped:0 overruns:0 frame:0
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = collisions:0 txqueuelen:1000
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output = RX bytes:986 (986.0 B) TX bytes:1530 (1.4 KiB)
Jan 6 00:03:21 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiConnect_Handler() 610 | ifconifg Output =
Jan 6 00:03:22 swi-mdm9x28-wp user.info Legato: INFO | atServerTest@0[1716]/atServerTestComp T=main | atServerTest.c Prepare_wifiRoute_Enable_Handler() 374 | WIFI Routing complete
fail.txt (56.8 KB)

FOUND wlan id =Lease of 192.168.43.94 obtained, lease time 3599

Didn’t this mean working fine?

Yes i did think it worked, but then after than udhcpc is run to assign wlan0 ip.

Thats when the run-tests not found error is got. After this, the wlan0 has no ip.

I don’t see problem, please see the log below:


root@swi-mdm9x28-wp:~# wifi client start
successfully called start.
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# cm info
Device: WP7605
IMEI: 353532100020465
IMEISV: 6
FSN: 2A917285070404
Firmware Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
Bootloader Version: SWI9X07Y_02.28.03.05 000000 jenkins 2019/07/08 11:04:16
MCU Version:
PRI Part Number (PN): 9908705
PRI Revision: 002.006
Carrier PRI Name: SIERRA
Carrier PRI Revision: 001.032_000
SKU: 1104208
Last Reset Cause: Power Down
Resets Count: Expected: 44 Unexpected: 0
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# wifi client scan
starting scan.
Found: SSID: “SWI-MOBILE” BSSID: “94:b4:0f:b9:04:61” Strength:-67 Ref:0x10000003
Found: SSID: “” BSSID: “94:b4:0f:d2:47:63” Strength:-71 Ref:0x1000000b
Found: SSID: “SWI-WLAN” BSSID: “94:b4:0f:b9:04:60” Strength:-64 Ref:0x10000001
Found: SSID: “SWI-MOBILE” BSSID: “94:b4:0f:d2:47:61” Strength:-71 Ref:0x10000009
Found: SSID: “SWI-GUEST” BSSID: “94:b4:0f:b8:fa:22” Strength:-57 Ref:0x10000011
Found: SSID: “SWI-WLAN” BSSID: “94:b4:0f:d2:47:60” Strength:-71 Ref:0x10000007
Found: SSID: “” BSSID: “94:b4:0f:b8:fa:23” Strength:-56 Ref:0x10000013
Found: SSID: “SWI-MOBILE” BSSID: “94:b4:0f:b8:fa:21” Strength:-57 Ref:0x1000000f
Found: SSID: “SWI-GUEST” BSSID: “94:b4:0f:b9:04:62” Strength:-67 Ref:0x10000005
Found: SSID: “SWI-WLAN” BSSID: “94:b4:0f:b8:fa:20” Strength:-57 Ref:0x1000000d
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# ^C
root@swi-mdm9x28-wp:~# wifi client setsecurityproto 0x10000003 3
Successfully set security protocol.
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# wifi client setpassphrase 0x10000003 password
Successfully set passphrase.
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# wifi client connect 0x10000003
Connecting…
CONNECTED.
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr D0:B5:C2:F1:F5:5B
inet6 addr: fe80::d2b5:c2ff:fef1:f55b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:364 (364.0 B) TX bytes:888 (888.0 B)

root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# app status
[running] atAirVantage
[running] atQmiLinker
[running] atService
[running] audioService
[running] avcService
[running] cellNetService
[running] dataConnectionService
[running] fwupdateService
[running] gpioService
[running] modemService
[running] portService
[running] positioningService
[running] powerMgr
[running] qmiAirVantage
[running] secStore
[stopped] smsInboxService
[stopped] spiService
[stopped] tools
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[stopped] hello6
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# app start hello6
root@swi-mdm9x28-wp:~#
root@swi-mdm9x28-wp:~# ifconfig wlan0
wlan0 Link encap:Ethernet HWaddr D0:B5:C2:F1:F5:5B
inet addr:192.168.23.251 Bcast:192.168.23.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:51 errors:0 dropped:0 overruns:0 frame:0
TX packets:14 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4106 (4.0 KiB) TX bytes:2556 (2.4 KiB)

Nov 12 10:26:49 | hello6[3949]/hello6_exe T=main | _main.c main() 62 | == Starting Event Processing Loop ==
Nov 12 10:26:49 | hello6[3949]/hello6Component T=main | hello6Component.c _hello6Component_COMPONENT_INIT() 9 | Hello, world.
Nov 12 10:26:49 | hello6[3949] | | udhcpc: started, v1.27.2
Nov 12 10:26:49 | hello6[3949] | | udhcpc: sending discover
Nov 12 10:26:52 | hello6[3949] | | udhcpc: sending discover
Nov 12 10:26:55 | hello6[3949] | | udhcpc: sending discover
Nov 12 10:26:56 | hello6[3949] | | udhcpc: sending select for 192.168.23.251
Nov 12 10:26:56 | hello6[3949] | | udhcpc: lease of 192.168.23.251 obtained, lease time 86400
Nov 12 10:26:56 | hello6[3949] | | /etc/udhcpc.d/50default: Adding DNS 8.8.8.8


Attached hello6.rar is the application I am using.

hello6.rar (287.2 KB)

Below are the problems found -

  1. Some how few of the commands in the default.script for udhcpc are not taking the absolute path / the envs are not set correctly when popen() is used from custom application. Somehow this is messing with the whole app written.

  2. Also, when GobiSerial.c is used, few of the sierra ril libs are not getting loaded. So removed the GobiSerial.c and trying to retain, USB modem only.

Now trying to get atServerIntegrationTest to run usign sockets.
Executed, “app runProc atServerIntegrationTest --exe=atServerTest
– socket”.

From ubuntu tried to login to using ssh root@192.168.2.2 -p 1235 ,
but did not work. Probably a wrong command. can u correct it ?

Did you try my app above?

yes, the one u have attached in the same thread.

Then can it run udhcpc to get ip address from wlan0?

Yes, was able to correct few of the scripts on the custom hw using the application attached above. But issue is to get the RawIP port up on Android, i used GobiSerial drivers. Able to communicate with the RawIP port of WP. But for the modem part, where sierra ril libs were used, the ril libs are not working.
So wanted to try if sockets works on the app attached, instead of using RawIP port, wanted to use sockets from Android and try.

do you need NMEA port?
If no, you can disable the NMEA port so that the port will become RawIP port.

Yes, need NMEA port. Else the Android and WP would not work.

Trying to get Socket working on WP and then will try on Android. So wanted the right command to connect to the atServerIntegrationTest app on WP